本文整理匯總了C++中AddFlag函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddFlag函數的具體用法?C++ AddFlag怎麽用?C++ AddFlag使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AddFlag函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: Precache
void CBaseTurret::Spawn()
{
Precache( );
SetNextThink( gpGlobals->curtime + 1 );
SetMoveType( MOVETYPE_FLY );
m_nSequence = 0;
m_flCycle = 0;
SetSolid( SOLID_SLIDEBOX );
m_takedamage = DAMAGE_YES;
AddFlag( FL_AIMTARGET );
m_iAmmoType = g_pGameRules->GetAmmoDef()->Index("SMG1");
AddFlag( FL_NPC );
if (( m_spawnflags & SF_NPC_TURRET_AUTOACTIVATE ) && !( m_spawnflags & SF_NPC_TURRET_STARTINACTIVE ))
{
m_iAutoStart = true;
}
ResetSequenceInfo( );
SetPoseParameter( TURRET_BC_YAW, 0 );
SetPoseParameter( TURRET_BC_PITCH, 0 );
// Activities
ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_OPEN );
ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_CLOSE );
ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_CLOSED_IDLE );
ADD_CUSTOM_ACTIVITY( CBase`matTurret, ACT_TURRET_OPEN_IDLE );
ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_FIRE );
ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_RELOAD );
}
示例2: TemplateCommand
TemplateCommand :: TemplateCommand( const string & name,
const string & desc )
: Command( name, desc, TPL_HELP ) {
AddFlag( ALib::CommandLineFlag( FLAG_TFILE, true, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_FNAMES, false, 1 ) );
}
示例3: DateFormatCommand
DateFormatCommand :: DateFormatCommand( const string & name,
const string & desc )
: Command( name, desc, DFMT_HELP ) {
AddFlag( ALib::CommandLineFlag( FLAG_COLS, true, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_FMT, true, 1 ) );
}
示例4: Command
EditCommand ::EditCommand( const string & name,
const string & desc )
: Command( name, desc, EDIT_HELP ) {
AddFlag( ALib::CommandLineFlag( FLAG_EDIT, true, 1, true ) );
AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1, false ) );
}
示例5: ValidateCommand
ValidateCommand :: ValidateCommand( const string & name,
const string & desc )
: Command( name, desc, VALID_HELP ), mOutMode( Reports ) {
AddFlag( ALib::CommandLineFlag( FLAG_VFILE, true, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_OMODE, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_ERRCODE, false, 0 ) );
}
示例6: memcpy
CWarMap::CWarMap(long lMapIndex, const TGuildWarInfo & r_info, TWarMapInfo * pkWarMapInfo, DWORD dwGuildID1, DWORD dwGuildID2)
{
m_kMapInfo = *pkWarMapInfo;
m_kMapInfo.lMapIndex = lMapIndex;
memcpy(&m_WarInfo, &r_info, sizeof(TGuildWarInfo));
m_TeamData[0].Initialize();
m_TeamData[0].dwID = dwGuildID1;
m_TeamData[0].pkGuild = CGuildManager::instance().TouchGuild(dwGuildID1);
m_TeamData[1].Initialize();
m_TeamData[1].dwID = dwGuildID2;
m_TeamData[1].pkGuild = CGuildManager::instance().TouchGuild(dwGuildID2);
m_iObserverCount = 0;
war_map_info* info = AllocEventInfo<war_map_info>();
info->pWarMap = this;
SetBeginEvent(event_create(war_begin_event, info, PASSES_PER_SEC(60)));
m_pkEndEvent = NULL;
m_pkTimeoutEvent = NULL;
m_pkResetFlagEvent = NULL;
m_bTimeout = false;
m_dwStartTime = get_dword_time();
m_bEnded = false;
if (GetType() == WAR_MAP_TYPE_FLAG)
{
AddFlagBase(0);
AddFlagBase(1);
AddFlag(0);
AddFlag(1);
}
}
示例7: SQLUpdateCommand
SQLUpdateCommand :: SQLUpdateCommand( const string & name,
const string & desc )
: SQLCommand( name, desc, UPD_HELP ) {
AddFlag( ALib::CommandLineFlag( FLAG_COLS, true, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_WHERE, true, 1 ) );
}
示例8: Command
ExcludeCommand ::ExcludeCommand( const string & name,
const string & desc )
: Command( name, desc, EXCL_HELP ), mReverse( false ) {
AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_REVCOLS, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_IF, false, 1 ) );
}
示例9: RemoveNewlineCommand
RemoveNewlineCommand :: RemoveNewlineCommand( const string & name,
const string & desc )
: Command( name, desc, RMNEW_HELP ), mSep( "" ) {
AddFlag( ALib::CommandLineFlag( FLAG_STR, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_EXCLNL, false, 0 ) );
AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
}
示例10: Command
ShuffleCommand ::ShuffleCommand( const string & name,
const string & desc )
: Command( name, desc, SHUFFLE_HELP ) {
AddFlag( ALib::CommandLineFlag( FLAG_NUM, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_RSEED, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
}
示例11: FileInfoCommand
FileInfoCommand :: FileInfoCommand( const string & name,
const string & desc )
: Command( name, desc, INFO_HELP ),
mBasename( false ), mTwoCols( false ) {
AddFlag( ALib::CommandLineFlag( FLAG_TWOC, false, false ) );
AddFlag( ALib::CommandLineFlag( FLAG_BASEN, false, false ) );
}
示例12: EvalCommand
EvalCommand :: EvalCommand( const string & name,
const string & desc )
: Command( name, desc, EVAL_HELP ), mDiscardInput( false ) {
AddFlag( ALib::CommandLineFlag( FLAG_EXPR, false, 1, true ) );
AddFlag( ALib::CommandLineFlag( FLAG_REMOVE, false, 1, true ) );
AddFlag( ALib::CommandLineFlag( FLAG_DISCARD, false, 0, true) );
AddFlag( ALib::CommandLineFlag( FLAG_IF, false, 1, true) );
}
示例13: DSVReadCommand
DSVReadCommand :: DSVReadCommand( const string & name,
const string & desc )
: DSVBase( name, desc, DSVR_HELP ), mIsCSV( false ), mCollapseSep( false ) {
AddFlag( ALib::CommandLineFlag( FLAG_CSV, false, 0 ) );
AddFlag( ALib::CommandLineFlag( FLAG_CMULTI, false, 0 ) );
}
示例14: AsciiTableCommand
AsciiTableCommand :: AsciiTableCommand( const string & name,
const string & desc )
: Command( name, desc, ATABLE_HELP ), mUseLineSep( false ) {
AddFlag( ALib::CommandLineFlag( FLAG_HEADER, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_RALIGN, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_SEP, false, 0 ) );
}
示例15: CallCommand
CallCommand :: CallCommand( const string & name, const string & desc )
: Command( name, desc, CALL_HELP ),
mOutBufSize( DEF_OUTBUF_SIZE ) {
AddFlag( ALib::CommandLineFlag( FLAG_DLL, true, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_FUNC, true, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
AddFlag( ALib::CommandLineFlag( FLAG_BSIZE, false, 1 ) );
}