当前位置: 首页>>代码示例>>C++>>正文


C++ TagParameterList::RemoveHead方法代码示例

本文整理汇总了C++中TagParameterList::RemoveHead方法的典型用法代码示例。如果您正苦于以下问题:C++ TagParameterList::RemoveHead方法的具体用法?C++ TagParameterList::RemoveHead怎么用?C++ TagParameterList::RemoveHead使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TagParameterList的用法示例。


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

示例1: setTagParameterList

void ARTitle::setTagParameterList(TagParameterList & tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...
		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail((
			"S,name,,r;"
			"S,pageformat,c2,o;S,textformat,cc,o"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList *rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			// then, we now the match for the first ParameterList name
			delete name;
			delete pageformat;
			delete textformat;

			name = TagParameterString::cast(rtpl->RemoveHead());
			assert(name);

			// pageformat
			pageformat = TagParameterString::cast(rtpl->RemoveHead());
			assert(pageformat);	

			textformat = TagParameterString::cast(rtpl->RemoveHead());
			assert(textformat);
		}

		if (fsize && fsize->TagIsNotSet())
		{
			fsize->setValue(24);
			fsize->setUnit("pt");
		}
		delete rtpl;
	}
	else
	{
		// failure
	}
	tpl.RemoveAll();
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:49,代码来源:ARTitle.cpp

示例2: setTagParameterList

void ARFermata::setTagParameterList(TagParameterList & tpl)
{
	if (ltpls.GetCount() == 0)
	{
		ListOfStrings lstrs;
		lstrs.AddTail("S,type,short,o;S,position,above,o");
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls, tpl, &rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			TagParameterString * str = TagParameterString::cast(rtpl->RemoveHead());
			assert(str);
			std::string shortstr ("short");
			std::string longstr ("long");
			std::string below ("below");
			if (str->TagIsSet())
			{
				if (shortstr == str->getValue())
					type = SHORT;
				else if (longstr == str->getValue())
					type = LONG;
				else type = REGULAR;
			}
			delete str;
		
			str = TagParameterString::cast(rtpl->RemoveHead());
			assert(str);
			if (str->TagIsSet() && (below == str->getValue()))
			{
				position = BELOW;
			}
			else  position = ABOVE;
			
			delete str;
		}

		delete rtpl;
	}

	tpl.RemoveAll();

}
开发者ID:iloveican,项目名称:AscoGraph,代码行数:49,代码来源:ARFermata.cpp

示例3: setTagParameterList

void ARStaffFormat::setTagParameterList(TagParameterList & tpl)
{
	if (ltpls.GetCount() == 0) {
		// create a list of string ...
		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail( ( "S,style,standard,o;U,size,3pt,o"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = 0;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);
	if (ret >= 0 && rtpl)
	{
		// we found a match!
		if (ret == 0) {
			// then, we now the match for the first ParameterList
			// w, h, ml, mt, mr, mb
			style = TagParameterString::cast(rtpl->RemoveHead());
			assert(style);
			if (style->TagIsSet() == false) {
				delete style;
				style = NULL;
			}

			size = TagParameterFloat::cast(rtpl->RemoveHead());
			assert(size);
			if (size->TagIsSet() == false) {
				delete size;
				size = NULL;
			}
			else
			{
				// one idea is to adjust the size, so that it matches an integer (internally)
				float intunits = size->getValue();		// per halfspace ...
				// Integer internal units 
				const int Iintunits = (int) (intunits + 0.5);
				const double cmunits = Iintunits * kVirtualToCm;
				const char * unit = size->getUnit();
				intunits = (float)gd_convertUnits(cmunits,"cm",unit);
				size->setValue( intunits );
			}
		}
		delete rtpl;
	}
	else {
		// failure
	}
	tpl.RemoveAll();
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:49,代码来源:ARStaffFormat.cpp

示例4: setTagParameterList

void ARStaff::setTagParameterList(TagParameterList& tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...
		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail( ("I,id,,r;U,dy,,o"));
		lstrs.AddTail( ("S,id,,r;U,dy,,o"));
		CreateListOfTPLs(ltpls,lstrs);

	}
	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			idi = TagParameterInt::cast(rtpl->RemoveHead());
			assert(idi);

			if (idi->getValue() < 1)
			{
				GuidoWarn("Staff-Parameter-Value smaller than 1");
				idi->setValue(1);
			}
			mDy = TagParameterFloat::cast(rtpl->RemoveHead());
			assert(mDy);
		}
		else if (ret==1)
		{
			// we have a match with the second parameter ...
			ids = TagParameterString::cast(rtpl->RemoveHead());
			assert(ids);

			mDy = TagParameterFloat::cast(rtpl->RemoveHead());
			assert(mDy);
		}
		delete rtpl;
	}
	else
	{
		// failure ...
	}
	if (idi && idi->getValue() < 0)
		idi->setValue(0);
	tpl.RemoveAll();
}
开发者ID:iloveican,项目名称:AscoGraph,代码行数:49,代码来源:ARStaff.cpp

示例5: setTagParameterList

void ARABreak::setTagParameterList(TagParameterList & tpl)
{

	if (ltpls.empty())
	{
		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(("S,page,on,o;S,system,on,o"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			TagParameterString * str = TagParameterString::cast(rtpl->RemoveHead());
			assert(str);
			std::string off ("off");
			if (str->TagIsSet())
			{
				if (off == str->getValue())
					mPageBreakState = OFF;
			}
			delete str;

			str =  TagParameterString::cast(rtpl->RemoveHead());
			assert(str);
			if (str->TagIsSet())
			{
				if (off == str->getValue())
					mSystemBreakState = OFF;
			}
			delete str;

		}

		delete rtpl;
	}
	// all Parameters are ignored ...
	// issue warning...
	tpl.RemoveAll();
	return;


}
开发者ID:EQ4,项目名称:guido-engine,代码行数:48,代码来源:ARABreak.cpp

示例6: setTagParameterList

void ARNewSystem::setTagParameterList(TagParameterList & tpl)
{
		if (ltpls.GetCount() == 0)
	{
		// create a list of string ...

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail( ( "U,dy,0,o"));
		CreateListOfTPLs(ltpls,lstrs);

	}

	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
			mDy =  TagParameterFloat::cast(rtpl->RemoveHead());

		delete rtpl;
	}
	else
	{
		// failure
	}

	tpl.RemoveAll();

}
开发者ID:anttirt,项目名称:guidolib,代码行数:31,代码来源:ARNewSystem.cpp

示例7: setTagParameterList

void ARGrace::setTagParameterList(TagParameterList& tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(( "I,i,,o"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = 0;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			num = TagParameterInt::cast(rtpl->RemoveHead());
			assert(num);
		}

		delete rtpl;
	}
	else
	{
		// failure
	}

	tpl.RemoveAll();
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:32,代码来源:ARGrace.cpp

示例8: setTagParameterList

void ARClef::setTagParameterList(TagParameterList& tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail( (
			"S,type,treble,r")); // old:;F,size,1.0,o"
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			TagParameterString * tps =  TagParameterString::cast(rtpl->RemoveHead());
			assert(tps);
			setName(tps->getValue());
			delete tps;
		}
		delete rtpl;
	}
	else
	{
		// failure
	}
	tpl.RemoveAll();
}
开发者ID:anttirt,项目名称:guidolib,代码行数:33,代码来源:ARClef.cpp

示例9: setTagParameterList

void ARStaccato::setTagParameterList(TagParameterList& tpl)
{
    if (ltpls.GetCount() == 0)
    {
        // create a list of string ...

        ListOfStrings lstrs; // (1); std::vector test impl
        lstrs.AddTail(("S,type,,o"));
        CreateListOfTPLs(ltpls,lstrs);
    }

    TagParameterList *rtpl = NULL;
    int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

    if (ret>=0 && rtpl)
    {
        // we found a match!
        if (ret == 0)
        {
            TagParameterString * str = TagParameterString::cast(rtpl->RemoveHead());
            assert(str);
            if (str->TagIsSet())
            {
                if (str->getValue() == std::string("heavy"))
                    type = HEAVY;
                else type = REGULAR;
            }
            delete str;
        }
        delete rtpl;
    }
    tpl.RemoveAll();
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:33,代码来源:ARStaccato.cpp

示例10: setTagParameterList

void ARMark::setTagParameterList(TagParameterList & tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(
			(
			"S,text,,r"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList *rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			text = TagParameterString::cast(rtpl->RemoveHead());
			assert(text);

		}

		delete rtpl;
	}
	else
	{
		// failure
	}

	tpl.RemoveAll();
}
开发者ID:iloveican,项目名称:AscoGraph,代码行数:35,代码来源:ARMark.cpp

示例11: setTagParameterList

void ARTStem::setTagParameterList(TagParameterList & tpl)
{
    if (ltpls.GetCount() == 0)
    {
        // create a list of string ...

        ListOfStrings lstrs; // (1); std::vector test impl
        lstrs.AddTail(( "U,length,7.0,o"));
        CreateListOfTPLs(ltpls,lstrs);
    }

    TagParameterList * rtpl = NULL;
    const int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

    if (ret>=0 && rtpl)
    {
        // we found a match!
        if (ret == 0)
        {
            // then, we now the match for
            // the first ParameterList
            // w, h, ml, mt, mr, mb
            //GuidoPos pos = rtpl->GetHeadPosition();

            mTpfLength = TagParameterFloat::cast( rtpl->RemoveHead());
        }
        delete rtpl;
    }
    else
    {
        // failure...
    }

    tpl.RemoveAll();
}
开发者ID:anttirt,项目名称:guidolib,代码行数:35,代码来源:ARTStem.cpp

示例12: MatchListOfTPLsWithTPL

// --------------------------------------------------------------------------
void
ARTempo::setTagParameterList( TagParameterList & tpl )
{
	if( ltpls.GetCount() == 0 ) {
		ListOfStrings lstrs;
		// A required tempo string and an optional bpm string.
		lstrs.AddTail( "S,tempo,,r;S,bpm,,o;U,dy,0,o" );
		CreateListOfTPLs( ltpls, lstrs );
	}

	TagParameterList * rtpl = 0;
	const int ret = MatchListOfTPLsWithTPL( ltpls, tpl, &rtpl );

	/*
		We may have :
		\tempo <s1, s2>		// s1 is pure graphical, s2 (optional) pure musical
		\tempo <"Andante [1/4]=60">					will be the kString type
		\tempo <"Andante","1/4=60">					will be the kBPM type
		\tempo <"Andante [1/4]=[1/8]","1/4=1/8">	will be the kNoteEquiv type
	*/
	if( ret >= 0 && rtpl )
	{
		// we found a match!
		if( ret == 0 )
		{
			// - extract tempo mark informations.
			TagParameterString * tps = TagParameterString::cast(rtpl->RemoveHead());
			if (tps && strlen(tps->getValue())) {
				FormatStringParser p;
				mTempoMark.clear();
				p.parse (tps->getValue(), mTempoMark);
			}
			delete tps;
//			ParseTempoMark( tps );

			// - extract bpm informations
			tps = TagParameterString::cast(rtpl->RemoveHead());
			ParseBpm( tps );
			delete tps;

			delete mDy;
			mDy = TagParameterFloat::cast(rtpl->RemoveHead());
		}
		delete rtpl;
	}
	tpl.RemoveAll();
}
开发者ID:EQ4,项目名称:guido-engine,代码行数:48,代码来源:ARTempo.cpp

示例13: setTagParameterList

void ARChordTag::setTagParameterList(TagParameterList & tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(
			(
			"S,label,,o"));
		lstrs.AddTail(
			(
			"I,label,,o"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			// then, we now the match for
			// the first ParameterList
			// GuidoPos pos = rtpl->GetHeadPosition();

			labels = TagParameterString::cast(rtpl->RemoveHead());
		}

		else if (ret == 1)
		{
			// we have a label-number
			labeli = TagParameterInt::cast(rtpl->RemoveHead());
		}

		delete rtpl;
	}
		
	
	tpl.RemoveAll();
}
开发者ID:iloveican,项目名称:AscoGraph,代码行数:43,代码来源:ARChordTag.cpp

示例14: setTagParameterList

void ARAlter::setTagParameterList(TagParameterList & tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...
		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(( "F,detune,0.0,r;S,text,,o"));
		CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = 0;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
			delete altervalue;
			altervalue = TagParameterFloat::cast(rtpl->RemoveHead());
			assert(altervalue);

			delete alterstring;
			alterstring = TagParameterString::cast(rtpl->RemoveHead());
			assert(alterstring);
	
			if (alterstring->TagIsNotSet())
			{
				// then we can set it to the value ...
				char tmp[10];
				snprintf(tmp, 10, "%.2f", altervalue->getValue());
				alterstring->setValue(tmp);
			}
		}

		delete rtpl;
	}
	else
	{
		// failure
	}
	tpl.RemoveAll();
}
开发者ID:iloveican,项目名称:AscoGraph,代码行数:43,代码来源:ARAlter.cpp

示例15: setTagParameterList

void ARMarcato::setTagParameterList(TagParameterList& tpl)
{
	if (ltpls.GetCount() == 0)
	{
		// create a list of string ...

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail("S,position,,o");
        CreateListOfTPLs(ltpls,lstrs);
	}

	TagParameterList * rtpl = NULL;
	int ret = MatchListOfTPLsWithTPL(ltpls,tpl,&rtpl);

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
            TagParameterString * str = TagParameterString::cast(rtpl->RemoveHead());
            assert(str);

            std::string below ("below");
            std::string above ("above");

            if (str->TagIsSet() && (below == str->getValue()))
			{
				position = BELOW;
			}
			else if (str->TagIsSet() && (above == str->getValue()))
            {
                position = ABOVE;
            }

            delete str;

			// Get The TagParameters ...
			// text = 
			//	TagParameterString::cast(rtpl->RemoveHead());
			//assert(text);

		}

		delete rtpl;
	}
	else
	{
		// failure
	}

	tpl.RemoveAll();
}
开发者ID:iloveican,项目名称:AscoGraph,代码行数:52,代码来源:ARMarcato.cpp


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