2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
class cGroup // tolua_export
|
|
|
|
{ // tolua_export
|
|
|
|
public: // tolua_export
|
2012-06-14 09:06:06 -04:00
|
|
|
cGroup() {}
|
|
|
|
~cGroup() {}
|
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
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
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
bool HasCommand( std::string a_Command ); // tolua_export
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
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; }
|
|
|
|
|
2013-01-11 23:46:01 -05:00
|
|
|
const AString & GetColor() const { return m_Color; } // tolua_export
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
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;
|
2013-01-11 23:46:01 -05:00
|
|
|
};// tolua_export
|