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

C++ TagParameterList类代码示例

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

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



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

示例1: CreateListOfTPLs

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


示例2: CreateListOfTPLs

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


示例3: CreateListOfTPLs

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


示例4: CreateListOfTPLs

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


示例5: CreateListOfTPLs

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


示例6: CreateListOfTPLs

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: TagParameterList

// -----------------------------------------------------------------------------
TagParameterList * ARTremolo::getTagParameterList() const
{
	TagParameterList * tpl = new TagParameterList(1);

	if (fStyle && fStyle->TagIsSet())
		tpl->AddTail(fStyle->getCopy());

	if (fSpeed && fSpeed->TagIsSet())
		tpl->AddTail(fSpeed->getCopy());

	if (fPitch && fPitch->TagIsSet())
		tpl->AddTail(fPitch->getCopy());

	if (dx && dx->TagIsSet())
		tpl->AddTail(dx->getCopy());

	if (dy && dy->TagIsSet())
		tpl->AddTail(dy->getCopy());

	if (fThickness && fThickness->TagIsSet())
		tpl->AddTail(fThickness->getCopy());

	if (fText && fText->TagIsSet())
		tpl->AddTail(fText->getCopy());

	if (color && color->TagIsSet())
		tpl->AddTail(color->getCopy());

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


示例8: CreateListOfTPLs

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


示例9: CreateListOfTPLs

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


示例10: CreateListOfTPLs

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


示例11: CreateListOfTPLs

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


示例12: CreateListOfTPLs

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


示例13: CreateListOfTPLs

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

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(
			(
			""));
		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();

		}

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


示例14: CreateListOfTPLs

void ARRestFormat::setTagParameterList(TagParameterList &tpl)
{
    if (ltpls.empty())
    {
        // create a list of string ...

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

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

    if (ret >= 0 && rtpl)
    {
        delete rtpl;
    }
    else
    {
        // failure
    }

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


示例15: assert

void ARTagBegin::setTagParameterList(TagParameterList& theTagParameterList) 
{	
	assert(false);
	// parcount = theTagParameterList.GetCount();
	theTagParameterList.RemoveAll();

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


示例16: CreateListOfTPLs

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

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail((
			"I,dur,32,o"
			// "S,text,,r;U,dy,-1,o"
			));
		CreateListOfTPLs(ltpls,lstrs);
	}

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

	if (ret>=0 && rtpl)
	{
		// we found a match!
		if (ret == 0)
		{
		}

		delete rtpl;
	}
	else
	{
		// failure
	}

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


示例17: CreateListOfTPLs

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

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(
			(
			"I,inverse,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)
		{
			// then, we now the match for
			// the first ParameterList
			// w, h, ml, mt, mr, mb
			GuidoPos pos = rtpl->GetHeadPosition();

			TagParameterInt * tpi =TagParameterInt::cast(rtpl->GetNext(pos));
			assert(tpi);

			if (tpi->pflag != TagParameter::NOTSET)
			{
				inverse = tpi->getValue();
			}

		}

		delete rtpl;
	}
	else
	{
		// failure
	}

	tpl.RemoveAll();

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


示例18: CreateListOfTPLs

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

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(
			(
			"S,style,staff,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
			// w, h, ml, mt, mr, mb

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

			if( style->TagIsSet() == false )
			{
				delete style;
				style = NULL;
			}


		}

		delete rtpl;
	}
	else
	{
		// failure
	}

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


示例19: CreateListOfTPLs

// --------------------------------------------------------------------------
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


示例20: CreateListOfTPLs

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

		ListOfStrings lstrs; // (1); std::vector test impl
		lstrs.AddTail(( "S,type,,r;F,value,-1.0,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
			GuidoPos pos = rtpl->GetHeadPosition();

			TagParameterString * tps = TagParameterString::cast(rtpl->GetNext(pos));
			assert(tps);

			mIntensText = tps->getValue();

			TagParameterFloat * tpf = TagParameterFloat::cast(rtpl->GetNext(pos));
			assert(tpf);

			if (tpf->pflag != TagParameter::NOTSET)
			{
				value = tpf->getValue();
			}
		}

		delete rtpl;
	}
	else
	{
		// failure
	}

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ogre::TagPoint类代码示例发布时间:2022-05-31
下一篇:
C++ TagMap类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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