Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
   Copyright (c) 2014 DIVIDE-Studio
   Copyright (c) 2009 Ionut Cava

   This file is part of DIVIDE Framework.

   Permission is hereby granted, free of charge, to any person obtaining a copy of this software
   and associated documentation files (the "Software"), to deal in the Software without restriction,
   including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
   subject to the following conditions:

   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

 */

#ifndef _COMMAND_PARSER_H_
#define _COMMAND_PARSER_H_

#include "HashMap.h"
#include <functional>

namespace Divide {

///A utility class used to process a string input
class CommandParser {
public:
    CommandParser();  //< Constructor
    virtual ~CommandParser(); //< Destructor
    ///If we need a parser , just override this
    virtual bool processCommand(const stringImpl& commandString) = 0;

protected:
    hashMapImpl<stringImpl/*command name*/, std::function<void (stringImpl /*args*/) > > _commandMap;
};

};

#endif

Commits for Divide-Framework/trunk/Source Code/Utility/Headers/CommandParser.h

Diff revisions: vs.
Revision Author Commited Message
337 Diff Diff IonutCava picture IonutCava Wed 17 Dec, 2014 17:25:16 +0000

[Ionut]
- Replaced all tabs with 4 spaces (some spacing may be off now. no way to check all the files.)
- Moved implementation details for ParamHandler, BoundingBox, BoundingSphere and ProfileTimer to proper .inl and .cpp files. (more to follow)
- Update all forward declared enums with the required storage type (as requested by the C++11 standard)

333 Diff Diff IonutCava picture IonutCava Tue 09 Dec, 2014 16:15:44 +0000

[Ionut]
- Removed “core.h” and moved everything to their appropriate header files
- Renamed MathClasses to MathMatrices (finally)
- Renamed “-Inl.h” files to ".inl"
- Some String wrapper refactoring
- Update “InstallLibraries.bat” so that it still offers valid options

326 Diff Diff IonutCava picture IonutCava Tue 30 Sep, 2014 21:11:32 +0000

[Ionut]
- Fixed more memory leaks
- Simplified Task interface and timing System
- Improved compatibility between Boost, STL and EASTL with random combinations of vectors, strings and maps
- Simplified Light class by removing the “slot” member
- Random optimizations

322 Diff Diff IonutCava picture IonutCava Sat 06 Sep, 2014 20:33:47 +0000

[Ionut]
- Refactored most of Boost related code to be C++11 based
— Boost is only used for ThreadPool, Mutex handling, XML parsing and networking (ASIO)
— Function binds, threads, regex, NonCopyable base, Hashing algorithms and more are now using C++11 libraries
- Replaced all FOR_EACH calls with standard, range, “for” calls

321 Diff Diff IonutCava picture IonutCava Wed 03 Sep, 2014 22:05:15 +0000

[Ionut]
- Added support (and enabled by default) for the EASTL library (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html / https://github.com/paulhodge/EASTL)
— Strings, vectors and hash_maps can be combined from EASTL, STL and Boost (not all combinations work. e.g. EASTL strings with STL/Boost containers due to the lack of a proper hash function)

318 Diff Diff IonutCava picture IonutCava Sat 30 Aug, 2014 17:35:53 +0000

[Ionut]
- Wrapped the entire code in a “Divide” namespace
- VertexBuffers now call “shrink_to_fit” on all internal data storage
- Improved some vector performance by preferring “emplace_back” instead of “push_back” + proepr usage of reserve / resize
- Wrapped OIS specific types and classes in Divide::Input namespace
- Added the messageBox.layout file (forgot it in the previous few commits)

152 Diff Diff k1ngp1n picture k1ngp1n Thu 20 Jun, 2013 14:23:31 +0000

[Ionut] [[BR]]
- New rendering pipeline (experimental and unstable): [[BR]]
— OpenGL 3.x clean context (glLight commands are still used for now, but UBO support is there, but not used yet) [[BR]]
— Custom matrix stacks and UBO based shader data (UBOs cause some link errors on some nVidia cards)[[BR]]
— Multi-threaded texture loading and shader compilation (mt shader compilation disabled for now. needs more tests) [[BR]]
— VAO rendering is self contained (no more enable/disable calls before a draw request) [[BR]]
— Render instance class used for rendering information [[BR]]
[[BR]]
- New unique ID generation base class: GUIDWrapper. Each class that derives from this, gets an application wide unique id on construction [[BR]]
- Added base code for an in-game editor using CEGUI [[BR]]
- Replaced some mutex locks with lockless data structures or atomic data [[BR]]
- CEGUI 0.8.2, FTGL-GL3 and GLIM 0.4 modified to support GLEW_MX if defined [[BR]]
- Dropped VS2008 support [[BR]]
- Networking library, server framework and ReCast files are now projects inside the Divide Framework solution [[BR]]
- New console command “setFov” that modifies the horizontal FoV value in realtime [[BR]]
- New console command “recompileShader” that reparses shader files, recompiles shaders and relinks shader programs who’s names match or contain the argument string [[BR]]
- New debug utility: axis angle drawn in corner of the screen if needed [[BR]]
- More ‘const’-s pasted around the code, more loop performance tweaks (allocations before a loop, tighter loops, etc), more utility member functions added to various classes [[BR]]

150 Diff Diff k1ngp1n picture k1ngp1n Mon 22 Apr, 2013 21:45:43 +0000

[Ionut] [[BR]]
- Fixed AudioDescriptor class (used ResourceDescriptor’s name instead of location for file lookup) [[BR]]
- Added a GUIConsoleCommandParser that stores a function pointer for each command [[BR]]
- Added console command history navigation with the Up and Down arrow keys [[BR]]
- Added playSound (sounds or music) console command [[BR]]
- Added help command argument support (show help for a specific command) [[BR]]
- Added quit command argument that will print a message before exiting the application [[BR]]
- Initial code for ParamHandler type storage (memorize each param’s type and allow it to be looked up) [[BR]]

149 k1ngp1n picture k1ngp1n Sun 21 Apr, 2013 21:38:05 +0000

[Ionut] [[BR]]
- Major GUI revamp: [[BR]]
— Fixed CEGUI rendering (invalid state reset after VBO/VAO unbind) [[BR]]
— Added a working Console window with a basic command parser [[BR]]
— GUI inputs take priority over scene (e.g. pressing a key in the console, does not affect the scene)[[BR]]
— Added AutoKey repeat [[BR]]
— Added config options for the GUI [[BR]]
- Revamped OpenGL Vertex Array Object class [[BR]]
— VBO’s without a shader attached will not use VAO’s [[BR]]
— VAO’s and VBO’s cleanup all states after them [[BR]]
- Added multiple Joystick support [[BR]]
- FrameBufferObject take in account the combination of texture id and bind slot when checking for double binds [[BR]]
- Upgraded Framerate/timing system [[BR]]
- Fixed Deferred rendering (typo in normal buffer creation) [[BR]]
- Fixed initial camera placement via scene config (RotateX(Y) replace with setAngleX(Y)) on camera init) [[BR]]
- Added better thread deletion in Event class [[BR]]
- Major mutex/semaphore/shared_lock rework in threaded classes [[BR]]
- Better A.I. initialization/destruction [[BR]]
- Fixed a typo in window positioning [[BR]]
- Better Unit movement code [[BR]]