本文整理汇总了C++中CAccessControlListGroup::GetGroupName方法的典型用法代码示例。如果您正苦于以下问题:C++ CAccessControlListGroup::GetGroupName方法的具体用法?C++ CAccessControlListGroup::GetGroupName怎么用?C++ CAccessControlListGroup::GetGroupName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAccessControlListGroup
的用法示例。
在下文中一共展示了CAccessControlListGroup::GetGroupName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: aclDestroyGroup
int CLuaACLDefs::aclDestroyGroup ( lua_State* luaVM )
{
// bool aclDestroyGroup ( aclgroup aclGroup )
CAccessControlListGroup* pGroup;
CScriptArgReader argStream ( luaVM );
argStream.ReadUserData ( pGroup );
if ( !argStream.HasErrors () )
{
// Delete it
CLogger::LogPrintf ( "ACL: %s: Group '%s' deleted\n", GetResourceName ( luaVM ), pGroup->GetGroupName () );
m_pACLManager->DeleteGroup ( pGroup );
// Return success
lua_pushboolean ( luaVM, true );
return 1;
}
else
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
lua_pushboolean ( luaVM, false );
return 1;
}
示例2: aclCreateGroup
int CLuaACLDefs::aclCreateGroup ( lua_State* luaVM )
{
// aclgroup aclCreateGroup ( string groupName )
SString strGroup;
CScriptArgReader argStream ( luaVM );
argStream.ReadString ( strGroup );
if ( !argStream.HasErrors () )
{
// Find the ACL specified
CAccessControlListGroup* pGroup = m_pACLManager->GetGroup ( strGroup );
if ( !pGroup )
{
// Create the group
pGroup = m_pACLManager->AddGroup ( strGroup );
CLogger::LogPrintf ( "ACL: %s: Group '%s' created\n", GetResourceName ( luaVM ), pGroup->GetGroupName () );
// And return it
lua_pushaclgroup ( luaVM, pGroup );
return 1;
}
}
else
m_pScriptDebugging->LogCustom ( luaVM, argStream.GetFullErrorMessage () );
lua_pushboolean ( luaVM, false );
return 1;
}