这篇教程C++ AddTag函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AddTag函数的典型用法代码示例。如果您正苦于以下问题:C++ AddTag函数的具体用法?C++ AddTag怎么用?C++ AddTag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AddTag函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CECTagCEC_ConnState_Tag::CEC_ConnState_Tag(EC_DETAIL_LEVEL detail_level) : CECTag(EC_TAG_CONNSTATE, (uint8)( (theApp->IsConnectedED2K() ? 0x01 : 0x00) | (theApp->serverconnect->IsConnecting() ? 0x02 : 0x00) | (theApp->IsConnectedKad() ? 0x04 : 0x00) | (Kademlia::CKademlia::IsFirewalled() ? 0x08 : 0x00) | (Kademlia::CKademlia::IsRunning() ? 0x10 : 0x00) )){ if (theApp->IsConnectedED2K()) { if ( theApp->serverconnect->GetCurrentServer() ) { if (detail_level == EC_DETAIL_INC_UPDATE) { // Send no full server tag, just the ECID of the connected server AddTag(CECTag(EC_TAG_SERVER, theApp->serverconnect->GetCurrentServer()->ECID())); } else { AddTag(CEC_Server_Tag(theApp->serverconnect->GetCurrentServer(), detail_level)); } } AddTag(CECTag(EC_TAG_ED2K_ID, theApp->GetED2KID())); } else if (theApp->serverconnect->IsConnecting()) { AddTag(CECTag(EC_TAG_ED2K_ID, 0xffffffff)); } AddTag(CECTag(EC_TAG_CLIENT_ID, theApp->GetID())); }
开发者ID:0vermind,项目名称:hmule,代码行数:29,
示例2: CECTagCEC_Category_Tag::CEC_Category_Tag(uint32 cat_index, wxString name, wxString path, wxString comment, uint32 color, uint8 prio) : CECTag(EC_TAG_CATEGORY, cat_index){ AddTag(CECTag(EC_TAG_CATEGORY_PATH, path)); AddTag(CECTag(EC_TAG_CATEGORY_COMMENT, comment)); AddTag(CECTag(EC_TAG_CATEGORY_COLOR, color)); AddTag(CECTag(EC_TAG_CATEGORY_PRIO, prio)); AddTag(CECTag(EC_TAG_CATEGORY_TITLE, name));}
开发者ID:windreamer,项目名称:amule-dlp,代码行数:9,
示例3: AddTag STagGroup::STagGroup( ){ //AddTag("/>",&CXML::parseEndEmptyElment); AddTag("<![CDATA[",&CXML::parseCDataBegin); AddTag("<!--",&CXML::parseComment); AddTag("</",&CXML::parseEndElment); AddTag("<?",&CXML::parseDeclaration); AddTag("<",&CXML::parseLf); //AddTag(">",&CXML::parseRf); //AddTag("]]>",&CXML::parseCDataEnd); }
开发者ID:dengchao000,项目名称:fge,代码行数:10,
示例4: PACKET_MGR_Init/*----------------------------------------------------------------------------- Data Members------------------------------------------------------------------------------*/PROTECTED PacketMgrInputBufferInfo packetMgrInputBuffer;PROTECTED PacketMgrOutputBufferInfo packetMgrOutputBuffer;PROTECTED pLIB_ARRAY_LIST_List packetMgrTagListenerList;//*****************************************************************************//// Exported Functions////*****************************************************************************//****************************************************************************/PUBLIC Result PACKET_MGR_Init( void ){ Result result = PACKET_MGR_RESULT(SUCCESS); LOG_Printf("Initializing Packet Mgr component/n"); ZeroMemory(&packetMgrInputBuffer, sizeof(PacketMgrInputBufferInfo)); ZeroMemory(&packetMgrOutputBuffer, sizeof(PacketMgrOutputBufferInfo)); SetMemory(&packetMgrInputBuffer.PacketInfo, PACKET_NULL_INDEX, sizeof(PacketMgrPacketInfo)*PACKET_MGR_INPUT_MAX_PACKETS); packetMgrTagListenerList = NULL; if( RESULT_IS_ERROR(result, OS_CREATE_MUTEX(&packetMgrInputBuffer.Mutex)) ) { LOG_Printf("Failed to create read buffer mutex/n"); } else if( RESULT_IS_ERROR(result, OS_CREATE_MUTEX(&packetMgrOutputBuffer.Mutex)) ) { LOG_Printf("Failed to create write buffer mutex/n"); } else if( RESULT_IS_ERROR(result, COMPOSITE_USB_RegisterReadVirComCallback(VirComReadCallback)) ) { LOG_Printf("Failed to register virtual com read callback/n"); } else if( RESULT_IS_ERROR(result, PacketMgrCreateTask()) ) { LOG_Printf("Failed to create the packet mgr task/n"); } else if( (packetMgrTagListenerList = LIB_ARRAY_LIST_CreateList(sizeof(PacketMgrTagListenerInfo), 1)) == NULL ) { result = PACKET_MGR_RESULT(CREATE_LIS_LIST_FAIL); LOG_Printf("Failed to create array list/n"); } return result;}//****************************************************************************/PUBLIC Result PACKET_MGR_PowerUp( void ){ Result result = PACKET_MGR_RESULT_INIT(); return result;}//****************************************************************************/PUBLIC Result PACKET_MGR_PowerDown( void ){ Result result = PACKET_MGR_RESULT_INIT(); return result;}//****************************************************************************/PUBLIC Result PACKET_MGR_AddPacket(pLIB_XML_Tag PacketData, uint32 PacketId){ Result result = PACKET_MGR_RESULT(SUCCESS); uint32 packetSize, dataSize, pi, byteCount; dataSize = strnlen(PacketData->Data, PACKET_MGR_OUTPUT_BUFFER_SIZE); packetSize = strnlen(PacketData->Tag, LIB_XML_MAX_TAG_LEN)*2 + 5 + dataSize; pi = packetMgrOutputBuffer.NextPacketIndex; OS_TAKE_MUTEX(packetMgrOutputBuffer.Mutex); if( (packetMgrOutputBuffer.BytesUsed + packetSize <= PACKET_MGR_OUTPUT_BUFFER_SIZE) && (packetMgrOutputBuffer.PacketsAvailable < PACKET_MGR_OUTPUT_MAX_PACKETS)) { packetMgrOutputBuffer.PacketInfo[pi].StartIndex = packetMgrOutputBuffer.FirstFreeIndex; AddTag(PacketData->Tag, TRUE); if( packetMgrOutputBuffer.FirstFreeIndex + dataSize <= PACKET_MGR_OUTPUT_BUFFER_SIZE ) { CopyMemory(&packetMgrOutputBuffer.Buffer[packetMgrOutputBuffer.FirstFreeIndex], PacketData->Data, dataSize); } else//.........这里部分代码省略.........
开发者ID:t0mac0,项目名称:wiimouse,代码行数:101,
示例5: Entity Ball::Ball() : Entity(), texture(NULL) { AddTag("Ball"); SetCollider(new RectangleCollider(25.0f, 25.0f)); //Collision::AddRectangleCollider(this, 25.0f, 25.0f); velocity = Vector2::right * 200.0f; }
开发者ID:elmato,项目名称:Monocle-Engine,代码行数:7,
示例6: SubRead static long SubRead ( LFA_FileRef inFileRef, RiffState & inOutRiffState, long parentid, UInt32 parentlen, UInt64 & inOutPosition ) { long tag; long subtype = 0; long parentnum; UInt32 len, total, childlen; UInt64 oldpos; total = 0; parentnum = (long) inOutRiffState.tags.size() - 1; UInt64 maxOffset = inOutPosition + parentlen; while ( parentlen > 0 ) { oldpos = inOutPosition; ReadTag ( inFileRef, &tag, &len, &subtype, inOutPosition, maxOffset ); AddTag ( inOutRiffState, tag, len, inOutPosition, parentid, parentnum, subtype ); len += (len & 1); //padding byte if ( subtype == 0 ) { childlen = 8 + len; } else { childlen = 12 + SubRead ( inFileRef, inOutRiffState, subtype, len, inOutPosition ); } if ( parentlen < childlen ) parentlen = childlen; parentlen -= childlen; total += childlen; } return total; }
开发者ID:JJWTimmer,项目名称:Uforia,代码行数:35,
示例7: addDataFieldFromNDfieldint addDataFieldFromNDfield(NDskel *skl,NDfield *f, const char *name, int periodic){ int done=1; if (f->ndims==1) { if (f->dims[0] == skl->nnodes) AddTagFromVal(skl,NULL,f,name,periodic); else if (f->dims[0] == skl->nsegs) AddTagFromVal(skl,f,NULL,name,periodic); else done=0; } else if ((f->ndims==2)&&(f->dims[1]==2)&&(f->dims[0]==skl->nsegs)) { AddTagFromVal(skl,f,NULL,name,periodic); } else if (f->ndims==skl->ndims) { AddTag(skl,f,name,periodic); } else done=0; if (!done) { fprintf(stderr,"ERROR adding data field from NDfield./n"); fprintf(stderr," input field has wrong dimensions./n"); fprintf(stderr," should be a grid, with dims [%ld] [%ld] [%ld,%ld] or ndims=%ld./n", (long)skl->nnodes,(long)skl->nsegs,(long)skl->nsegs,(long)2,(long)skl->ndims); return -1; } return 0;}
开发者ID:thierry-sousbie,项目名称:dice,代码行数:32,
示例8: ProfileStart/* Starts timer for given tag. If it does not exist yet, it is added. Note: 1. The tag may not be nested with the same name 2. The tag may not equal "" */void ProfileStart (char* str_tag) { entry_t* p_entry ; /* One the first call, we must initialize the profiler. */ if (!g_init) { Init () ; } /* Test for "" */ if (*str_tag == '/0') { fprintf (stdout, "ERROR in ProfileStart: a tag may not be /"/". Call is denied.") ; return ; } /* Search the entry with the given name */ p_entry = LookupTag (str_tag) ; if (!p_entry) { /* New tag, add it*/ p_entry = AddTag (str_tag) ; if (!p_entry) { fprintf (stdout, "WARNING in ProfileStart: no more space to store the tag (/"%s/"). Increase NUM_TAGS in /"profile.h/". Call is denied./n", str_tag) ; return ; } } /* Check for nesting of equal tag.*/ if (Nested (str_tag)) { fprintf (stdout, "ERROR in ProfileStart: nesting of equal tags not allowed (/"%s/"). Call is denied./n", str_tag) ; return ; } /* Increase the number of hits */ ++p_entry->i_calls ; /* Set the start time */ p_entry->start_time = clock () ; p_entry->i_stopped = 0 ;}
开发者ID:Miinky-Arcade,项目名称:yabause,代码行数:37,
示例9: SetSpawnWeightvoid CRoomTemplate::LoadFromKeyValues( const char *pRoomName, KeyValues *pKeyValues ){ m_nTilesX = pKeyValues->GetInt( "TilesX", 1 ); m_nTilesY = pKeyValues->GetInt( "TilesY", 1 ); SetSpawnWeight( pKeyValues->GetInt( "SpawnWeight", MIN_SPAWN_WEIGHT ) ); SetFullName( pRoomName ); Q_strncpy( m_Description, pKeyValues->GetString( "RoomTemplateDescription", "" ), m_nMaxDescriptionLength ); Q_strncpy( m_Soundscape, pKeyValues->GetString( "Soundscape", "" ), m_nMaxSoundscapeLength ); SetTileType( pKeyValues->GetInt( "TileType", ASW_TILETYPE_UNKNOWN ) ); m_Tags.RemoveAll(); // search through all the exit subsections KeyValues *pkvSubSection = pKeyValues->GetFirstSubKey(); bool bClearedExits = false; while ( pkvSubSection ) { // mission details if ( Q_stricmp(pkvSubSection->GetName(), "EXIT")==0 ) { if ( !bClearedExits ) { // if we haven't cleared previous exits yet then do so now m_Exits.PurgeAndDeleteElements(); bClearedExits = true; } CRoomTemplateExit *pExit = new CRoomTemplateExit(); pExit->m_iXPos = pkvSubSection->GetInt("XPos"); pExit->m_iYPos = pkvSubSection->GetInt("YPos"); pExit->m_ExitDirection = (ExitDirection_t) pkvSubSection->GetInt("ExitDirection"); pExit->m_iZChange = pkvSubSection->GetInt("ZChange"); Q_strncpy( pExit->m_szExitTag, pkvSubSection->GetString( "ExitTag" ), sizeof( pExit->m_szExitTag ) ); pExit->m_bChokepointGrowSource = !!pkvSubSection->GetInt("ChokeGrow", 0); // discard exits outside the room bounds if ( pExit->m_iXPos < 0 || pExit->m_iYPos < 0 || pExit->m_iXPos >= m_nTilesX || pExit->m_iYPos >= m_nTilesY ) { delete pExit; } else { m_Exits.AddToTail(pExit); } } else if ( Q_stricmp(pkvSubSection->GetName(), "Tags")==0 && TagList() ) { for ( KeyValues *sub = pkvSubSection->GetFirstSubKey(); sub != NULL; sub = sub->GetNextKey() ) { if ( !Q_stricmp( sub->GetName(), "tag" ) ) { AddTag( sub->GetString() ); } } } pkvSubSection = pkvSubSection->GetNextKey(); }}
开发者ID:Cre3per,项目名称:hl2sdk-csgo,代码行数:60,
示例10: MarkChunkAsPadding bool MarkChunkAsPadding ( LFA_FileRef inFileRef, RiffState & inOutRiffState, long riffType, long tagID, long subtypeID ) { UInt32 len; UInt64 pos; atag tag; try { bool found = FindChunk ( inOutRiffState, tagID, riffType, subtypeID, NULL, &len, &pos ); if ( ! found ) return false; if ( subtypeID != 0 ) { pos -= 12; } else { pos -= 8; } tag.id = MakeUns32LE ( ckidPremierePadding ); LFA_Seek ( inFileRef, pos, SEEK_SET ); LFA_Write ( inFileRef, &tag, 4 ); pos += 8; AddTag ( inOutRiffState, ckidPremierePadding, len, pos, 0, 0, 0 ); } catch(...) { return false; // If a write fails, it throws, so we return false. } return true; }
开发者ID:JJWTimmer,项目名称:Uforia,代码行数:32,
示例11: AddTag //初期化 void FixedBox::OnCreate() { auto PtrTransform = GetComponent<Transform>(); PtrTransform->SetScale(m_Scale); PtrTransform->SetRotation(m_Rotation); PtrTransform->SetPosition(m_Position); //OBB C++ AddTail函数代码示例 C++ AddSymbol函数代码示例
|