diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-03 20:41:19 +0200 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-03 20:41:19 +0200 |
commit | 386d58b5862d8b76925c6523721594887606e82a (patch) | |
tree | ef073e7a843f4b75a4008d4b7383f7cdf08ceee5 /source/cGroup.h | |
parent | Visual Studio 2010 solution and project files (diff) | |
download | cuberite-386d58b5862d8b76925c6523721594887606e82a.tar cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.gz cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.bz2 cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.lz cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.xz cuberite-386d58b5862d8b76925c6523721594887606e82a.tar.zst cuberite-386d58b5862d8b76925c6523721594887606e82a.zip |
Diffstat (limited to 'source/cGroup.h')
-rw-r--r-- | source/cGroup.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/source/cGroup.h b/source/cGroup.h new file mode 100644 index 000000000..303df85fa --- /dev/null +++ b/source/cGroup.h @@ -0,0 +1,39 @@ +#pragma once
+
+#include <string>
+#include <map>
+#include <list>
+
+class cGroup //tolua_export
+{ //tolua_export
+public: //tolua_export
+ cGroup() {}
+ ~cGroup() {}
+
+ void SetName( std::string a_Name ) { m_Name = a_Name; } //tolua_export
+ const std::string & GetName() const { return m_Name; } //tolua_export
+ void SetColor( std::string a_Color ) { m_Color = a_Color; } //tolua_export
+ void AddCommand( std::string a_Command ); //tolua_export
+ void AddPermission( std::string a_Permission ); //tolua_export
+ void InheritFrom( cGroup* a_Group ); //tolua_export
+
+ bool HasCommand( std::string a_Command ); //tolua_export
+
+ typedef std::map< std::string, bool > PermissionMap;
+ const PermissionMap & GetPermissions() const { return m_Permissions; }
+
+ typedef std::map< std::string, bool > CommandMap;
+ const CommandMap & GetCommands() const { return m_Commands; }
+
+ std::string GetColor() const { return m_Color; } //tolua_export
+
+ typedef std::list< cGroup* > GroupList;
+ const GroupList & GetInherits() const { return m_Inherits; }
+private:
+ std::string m_Name;
+ std::string m_Color;
+
+ PermissionMap m_Permissions;
+ CommandMap m_Commands;
+ GroupList m_Inherits;
+};//tolua_export
\ No newline at end of file |