本文整理汇总了C++中CGPObject::GetNext方法的典型用法代码示例。如果您正苦于以下问题:C++ CGPObject::GetNext方法的具体用法?C++ CGPObject::GetNext怎么用?C++ CGPObject::GetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGPObject
的用法示例。
在下文中一共展示了CGPObject::GetNext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CGPValue
CGPValue *CGPValue::Duplicate(CTextPool **textPool)
{
CGPValue *newValue;
CGPObject *iterator;
char *name;
if (textPool)
{
name = (*textPool)->AllocText((char *)mName, true, textPool);
}
else
{
name = (char *)mName;
}
newValue = new CGPValue(name);
iterator = mList;
while(iterator)
{
if (textPool)
{
name = (*textPool)->AllocText((char *)iterator->GetName(), true, textPool);
}
else
{
name = (char *)iterator->GetName();
}
newValue->AddValue(name);
iterator = iterator->GetNext();
}
return newValue;
}
示例2: ParseEmitterFxStrings
//------------------------------------------------------
// ParseEmitterFxStrings
// Reads in a group of fx file names and registers them
//
// input:
// Parse group that contains the list of fx to parse
//
// return:
// success of parse operation.
//------------------------------------------------------
bool CPrimitiveTemplate::ParseEmitterFxStrings( CGPValue *grp )
{
const char *val;
int handle;
if ( grp->IsList() )
{
// If we are a list we have to do separate processing
CGPObject *list = grp->GetList();
while ( list )
{
// name is actually the value contained in the list
val = list->GetName();
handle = theFxScheduler.RegisterEffect( val );
if ( handle )
{
mEmitterFxHandles.AddHandle( handle );
}
else
{
theFxHelper.Print( "FxTemplate: Emitter effect file not found.\n" );
return false;
}
list = (CGPValue *)list->GetNext();
}
}
else
{
// Let's get a value
val = grp->GetTopValue();
if ( val )
{
handle = theFxScheduler.RegisterEffect( val );
if ( handle )
{
mEmitterFxHandles.AddHandle( handle );
}
else
{
theFxHelper.Print( "FxTemplate: Emitter effect file not found.\n" );
return false;
}
}
else
{
// empty "list"
theFxHelper.Print( "CPrimitiveTemplate::ParseEmitterFxStrings called with an empty list!\n" );
return false;
}
}
mFlags |= FX_EMIT_FX;
return true;
}
示例3: Write
bool CGPValue::Write(CTextPool **textPool, int depth)
{
int i;
CGPObject *next;
if (!mList)
{
return true;
}
for(i=0;i<depth;i++)
{
(*textPool)->AllocText("\t", false, textPool);
}
WriteText(textPool, mName);
if (!mList->GetNext())
{
(*textPool)->AllocText("\t\t", false, textPool);
mList->WriteText(textPool, mList->GetName());
(*textPool)->AllocText("\r\n", false, textPool);
}
else
{
(*textPool)->AllocText("\r\n", false, textPool);
for(i=0;i<depth;i++)
{
(*textPool)->AllocText("\t", false, textPool);
}
(*textPool)->AllocText("[\r\n", false, textPool);
next = mList;
while(next)
{
for(i=0;i<depth+1;i++)
{
(*textPool)->AllocText("\t", false, textPool);
}
mList->WriteText(textPool, next->GetName());
(*textPool)->AllocText("\r\n", false, textPool);
next = next->GetNext();
}
for(i=0;i<depth;i++)
{
(*textPool)->AllocText("\t", false, textPool);
}
(*textPool)->AllocText("]\r\n", false, textPool);
}
return true;
}
示例4: ParseModels
//------------------------------------------------------
// ParseModels
// Reads in a group of models and registers them
//
// input:
// Parse group that contains the list of models to parse
//
// return:
// success of parse operation.
//------------------------------------------------------
bool CPrimitiveTemplate::ParseModels( CGPValue *grp )
{
const char *val;
int handle;
if ( grp->IsList() )
{
// If we are a list we have to do separate processing
CGPObject *list = grp->GetList();
while ( list )
{
// name is actually the value contained in the list
val = list->GetName();
handle = theFxHelper.RegisterModel( val );
mMediaHandles.AddHandle( handle );
list = (CGPValue *)list->GetNext();
}
}
else
{
// Let's get a value
val = grp->GetTopValue();
if ( val )
{
handle = theFxHelper.RegisterModel( val );
mMediaHandles.AddHandle( handle );
}
else
{
// empty "list"
theFxHelper.Print( "CPrimitiveTemplate::ParseModels called with an empty list!\n" );
return false;
}
}
mFlags |= FX_ATTACHED_MODEL;
return true;
}