• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AddTag函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AddTag函数的典型用法代码示例。如果您正苦于以下问题:C++ AddTag函数的具体用法?C++ AddTag怎么用?C++ AddTag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AddTag函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: CECTag

CEC_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,代码来源:ECSpecialCoreTags.cpp


示例2: CECTag

CEC_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,代码来源:ECSpecialMuleTags.cpp


示例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,代码来源:fgeXML.cpp


示例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,代码来源:packet_mgr.c


示例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,代码来源:Pong.cpp


示例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,代码来源:RIFF_Support.cpp


示例7: addDataFieldFromNDfield

int 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,代码来源:NDskel_tags.c


示例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,代码来源:profile.c


示例9: SetSpawnWeight

void 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,代码来源:RoomTemplate.cpp


示例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,代码来源:RIFF_Support.cpp


示例11: AddTag

	//初期化
	void FixedBox::OnCreate() {
		auto PtrTransform = GetComponent<Transform>();

		PtrTransform->SetScale(m_Scale);
		PtrTransform->SetRotation(m_Rotation);
		PtrTransform->SetPosition(m_Position);
		//OBB衝突j判定を付ける
		auto PtrColl = AddComponent<CollisionObb>();
		PtrColl->SetFixed(true);

		//タグをつける
		AddTag(L"FixedBox");

		//影をつける
		auto ShadowPtr = AddComponent<Shadowmap>();
		ShadowPtr->SetMeshResource(L"DEFAULT_CUBE");

		auto PtrDraw = AddComponent<BcPNTStaticDraw>();
		PtrDraw->SetFogEnabled(true);
		PtrDraw->SetMeshResource(L"DEFAULT_CUBE");
		PtrDraw->SetOwnShadowActive(true);
		PtrDraw->SetTextureResource(L"SKY_TX");


	}
开发者ID:WiZFramework,项目名称:BaseCross,代码行数:26,代码来源:Character.cpp


示例12: Entity

	// T H E   P L A Y E R (entity)
	Player::Player(int x, int y) : Entity(), 
		FRICTION_GROUND(800),
		FRICTION_AIR(400),
		GRAVITY(300),
                JUMP(120.0f),
                MAXSPEED_GROUND(60.0f),
		MAXSPEED_AIR(100.0f),
		ACCELERATION(800),
                WALLJUMP(160.0f),
		doubleJump(false),
		cling(0),
		onGround(false)
	{
		position = Vector2(x, y);

		AddTag("PLAYER");
		SetCollider(new RectangleCollider(8, 8));

		sprite = new SpriteAnimation("player.png", FILTER_NONE, 8, 8);
		sprite->Add("stand", 0, 0, 0);
		sprite->Add("run", 0, 3, 12.0f);
		sprite->Add("jumpUp", 8, 8, 0);
		sprite->Add("jumpDown", 9, 9, 0);
		sprite->Play("run");

		SetLayer(-1);
		SetGraphic(sprite);

		direction = true;
	}
开发者ID:imaginationac,项目名称:Monocle-Engine,代码行数:31,代码来源:Ogmo.cpp


示例13: Node

void TurretManager::CreateNodes()
{
	for (int i = 0; i < 6; i++)
	{
		auto node = std::shared_ptr<Node>(new Node(1, i, orbit01Angle, node01Texture));
		nodes.emplace_back(node);
		AddChild(node);
		node->AddTag("Node");
	}
	for (int i = 0; i < 12; i++)
	{
		auto node = std::shared_ptr<Node>(new Node(2, i, orbit02Angle, node01Texture));
		nodes.emplace_back(node);
		AddChild(node);
		node->AddTag("Node2");
	}
}
开发者ID:Freeman117,项目名称:Orbital-DefenseRemade,代码行数:17,代码来源:TurretManager.cpp


示例14: AddTag

void CECTag::AddTag(ec_tagname_t name, uint64_t data, CValueMap* valuemap)
{
	if (valuemap) {
		valuemap->CreateTag(name, data, this);
	} else {
		AddTag(CECTag(name, data));
	}
}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:8,代码来源:ECTag.cpp


示例15: AddTag

	void Player::OnCreate() {
		vector<VertexPositionNormalTexture> vertices;
		vector<uint16_t> indices;
		MeshUtill::CreateSphere(1.0f, m_Division, vertices, indices);
		//メッシュの作成(変更できない)
		m_SphereMesh = MeshResource::CreateMeshResource(vertices, indices, false);
		//タグの追加
		AddTag(L"Player");
	}
开发者ID:WiZFramework,项目名称:BaseCross,代码行数:9,代码来源:Player.cpp


示例16: Entity

Wall::Wall(Vector2 pos, float w, float h)
    : Entity()
{
    position = pos;
    AddTag("Wall");
    SetCollider(new RectangleCollider(w, h));
    this->width = w;
    this->height = h;
}
开发者ID:lele85,项目名称:Monocle-Engine,代码行数:9,代码来源:Jumper.cpp


示例17: bHasParent

FDDCScopeStatHelper::FDDCScopeStatHelper(const TCHAR* CacheKey, const FName& FunctionName) : bHasParent(false)
{

	if (DDCStats::GetCookingStats() == nullptr)
		return;

	DDCStats::FDDCStatsTLSStore* TLSStore = (DDCStats::FDDCStatsTLSStore*)FPlatformTLS::GetTlsValue(DDCStats::CookStatsFDDCStatsTLSStore);
	if (TLSStore == nullptr)
	{
		TLSStore = new DDCStats::FDDCStatsTLSStore();
		FPlatformTLS::SetTlsValue(DDCStats::CookStatsFDDCStatsTLSStore, TLSStore);
	}

	TransactionGuid = TLSStore->GenerateNewTransactionName();


	FString Temp;
	AddTag(FunctionName, Temp);

	if (TLSStore->RootScope == nullptr)
	{
		TLSStore->RootScope = this;
		bHasParent = false;

		static const FName NAME_CacheKey = FName(TEXT("CacheKey"));
		AddTag(NAME_CacheKey, FString(CacheKey));
	}
	else
	{
		static const FName NAME_Parent = FName(TEXT("Parent"));
		AddTag(NAME_Parent, TLSStore->RootScope->TransactionGuid.ToString());

		bHasParent = true;
	}


	static const FName NAME_StartTime(TEXT("StartTime"));
	AddTag(NAME_StartTime, FDateTime::Now().ToString());

	StartTime = FPlatformTime::Seconds();

	// if there is a root scope then we want to put out stuff under a child key of the parent and link to the parent scope
}
开发者ID:PopCap,项目名称:GameIdea,代码行数:43,代码来源:DDCStatsHelper.cpp


示例18: AddTag

Triangle::Triangle () {
    AddTag("Triangle");
    SetType("Triangle");

    m_vertexColors[0] = Volt::Color::red;
    m_vertexColors[1] = Volt::Color::green;
    m_vertexColors[2] = Volt::Color::blue;
    m_textureCoords[0].Set(0, 0);
    m_textureCoords[1].Set(1, 0);
    m_textureCoords[2].Set(0, 1);
}
开发者ID:aquach,项目名称:volt,代码行数:11,代码来源:Triangle.cpp


示例19: setPosition

EnemyBulletObject::EnemyBulletObject(sf::Vector2f p_vPos, sf::Vector2f p_vDir, float p_fAcceleration){
	setPosition(p_vPos);
	m_vDir = p_vDir;

	m_fAcceleration = p_fAcceleration;

	m_xpSprite = SpriteMngr::GetSprite("EBullet");

	SetHitbox(CollisionMngr::NewHitbox(this, getPosition(), 4.f, 0));

	AddTag("EBullet");
}
开发者ID:Waluario,项目名称:GPSummer2014MartinMattson,代码行数:12,代码来源:EnemyBulletObject.cpp


示例20: SCOPE_CYCLE_COUNTER

void FGameplayTagContainer::AppendTags(FGameplayTagContainer const& Other)
{
	SCOPE_CYCLE_COUNTER(STAT_FGameplayTagContainer_AppendTags);

	GameplayTags.Reserve(Other.Num());

	//add all the tags
	for(TArray<FGameplayTag>::TConstIterator It(Other.GameplayTags); It; ++It)
	{
		AddTag(*It);
	}
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:12,代码来源:GameplayTagContainer.cpp



注:本文中的AddTag函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddTail函数代码示例发布时间:2022-05-30
下一篇:
C++ AddSymbol函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap