X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fcommands.hxx;h=3f8a248fc7b76758c9ff08de1b4ff53a711e5d55;hb=9f88b077ee5294c4ad898016b7d66682466bbafb;hp=fa27ac7e8a66bd726d42e2ad916cd116798b0bd4;hpb=2ea2f1b4f29afe7d74e0474ca02874387526e804;p=simgear.git diff --git a/simgear/structure/commands.hxx b/simgear/structure/commands.hxx index fa27ac7e..3f8a248f 100644 --- a/simgear/structure/commands.hxx +++ b/simgear/structure/commands.hxx @@ -13,16 +13,14 @@ #include -#include STL_STRING +#include #include #include -#include - -SG_USING_STD(string); -SG_USING_STD(map); -SG_USING_STD(vector); +#include +#include +#include /** * Manage commands. @@ -63,7 +61,7 @@ public: * a bool result. The argument is always a const pointer to * an SGPropertyNode (which may contain multiple values). */ - virtual void addCommand (const string &name, command_t command); + virtual void addCommand (const std::string &name, command_t command); /** @@ -73,7 +71,7 @@ public: * @return A pointer to the command, or 0 if there is no registered * command with the name specified. */ - virtual command_t getCommand (const string &name) const; + virtual command_t getCommand (const std::string &name) const; /** @@ -82,7 +80,7 @@ public: * @return A (possibly empty) vector of the names of all registered * commands. */ - virtual vector getCommandNames () const; + virtual string_list getCommandNames () const; /** @@ -95,7 +93,7 @@ public: * @return true if the command is present and executes successfully, * false otherwise. */ - virtual bool execute (const string &name, const SGPropertyNode * arg) const; + virtual bool execute (const std::string &name, const SGPropertyNode * arg) const; protected: /** @@ -106,9 +104,11 @@ protected: private: - typedef map command_map; + typedef std::map command_map; command_map _commands; + static OpenThreads::Mutex _instanceMutex; + }; #endif // __COMMANDS_HXX