本文整理汇总了C++中TagParameterList类的典型用法代码示例。如果您正苦于以下问题:C++ TagParameterList类的具体用法?C++ TagParameterList怎么用?C++ TagParameterList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TagParameterList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}
示例15: assert
void ARTagBegin::setTagParameterList(TagParameterList& theTagParameterList)
{
assert(false);
// parcount = theTagParameterList.GetCount();
theTagParameterList.RemoveAll();
}