diff options
author | worktycho <work.tycho@gmail.com> | 2013-12-09 18:51:12 +0100 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2013-12-09 18:51:12 +0100 |
commit | 843605d59ebc128be0a578dc6f45ef8c05da6e79 (patch) | |
tree | 3ffebc6ba27baf7a9e1d4bc51501ffeea9b14226 /src/Group.h | |
parent | merged makefile changes (diff) | |
parent | Fix Undefined behavior at Bindings/LuaWindow line 32 (diff) | |
download | cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.gz cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.bz2 cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.lz cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.xz cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.tar.zst cuberite-843605d59ebc128be0a578dc6f45ef8c05da6e79.zip |
Diffstat (limited to 'src/Group.h')
-rw-r--r-- | src/Group.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/Group.h b/src/Group.h new file mode 100644 index 000000000..65ee1a60a --- /dev/null +++ b/src/Group.h @@ -0,0 +1,40 @@ + +#pragma once + + + + + +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; } + + const AString & 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 |