Interface to the Alias CharSnippet Network.
Synopsis
#include <AlCharSnippet.h>
class AlCharSnippet : public AlObject
enum AlCharSnippetIntegerInfo
{
kXPosition,
kYPosition,
kStart,
kEnd,
kPreviewMeasure,
kRunLoops,
kRunExit,
kRunFrames,
kLastStored,
kNodeNumber
};
enum AlCharSnippetStringInfo
{
kStageName,
kSetName,
kBlindData1,
kBlindData2,
kBlindData3,
kBlindData4
};
AlCharSnippet();
virtual ~AlCharSnippet();
virtual AlObject* copyWrapper() const;
AlCharSnippet* copyObject();
virtual statusCode deleteObject();
statusCode create(AlCharacter *, const char *);
virtual AlObjectType type() const;
virtual const char* name() const;
virtual statusCode setName(const char*);
AlCharTransition* firstTransition(void);
AlCharTransition* nextTransition(void);
int setTraversal(int);
statusCode charSnippetIntegerInfo(AlCharSnippetIntegerInfo, int&) const;
statusCode charSnippetStringInfo(AlCharSnippetStringInfo, const char *&) const;
statusCode setCharSnippetIntegerInfo(AlCharSnippetIntegerInfo, int);
statusCode setCharSnippetStringInfo(AlCharSnippetStringInfo, const char*);
Description
AlCharSnippet is the interface to the CharSnippet Network data of Alias’ Character Network objects.
A Snippet is a sequence or short linear pieces of animation. Snippets are connected by Transitions to form a Character Network.
See the AlCharacter class for more information Character Networks. See the AlCharTransition class for more information on transitions.
AlCharSnippet::AlCharSnippet()
Description
Default constructor for AlCharSnippet Wrapper object. Use the create() method to initialize an AlCharSnippet object.
AlCharSnippet::~AlCharSnippet()
Description
Deletes an AlCharSnippet wrapper object.
AlObject* AlCharSnippet::copyWrapper() const
Description
Makes an exact copy of the AlCharSnippet wrapper
Return Values
NULL - unable to create new wrapper due to lack of memory
non NULL - new Character Network Snippet wrapper
AlCharSnippet *AlCharSnippet::copyObject()
Description
Copies this AlCharSnippet returning a pointer to the new copy.
Return Values
NULL - unable to create new object or wrapper due to lack of memory
non NULL - new Character Network Snippet wrapper
statusCode AlCharSnippet::create(AlCharacter *character,const char *snippetName)
Description
Does any initialization and allocation of data for an AlCharSnippet. Allocates room for this AlCharSnippet and adds this Snippet
to the character.
Arguments
< character - Character Network to create the Snippet in
< snippetName - name of the Character Network Snippet object
Return Codes
sSuccess - named Character Network Snippet object created
sInsufficientMemory - not enough memory available
statusCode AlCharSnippet::deleteObject()
Description
Deletes an AlCharSnippet object. This method deletes the Character Network Snippet object data. Upon return there will be
no Character Network Snippet corresponding to this wrapper or any other wrapper that references the same Character Network
Snippet.
Return Codes
sSuccess - the Character Network Snippet has been deleted
sInvalidObject - the Character Network Snippet wrapper was not valid
AlObjectType AlCharSnippet::type() const
Description
Returns the class identifier kCharSnippetType.
AlCharSnippet* AlCharSnippet::asCharSnippetPtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class.
const char *AlCharSnippet::name(void) const
Description
Returns the name of the CharSnippet.
Return Values
NULL - invalid wrapper
non NULL - Character Network Snippet name
statusCode AlCharSnippet::setName(const char* newSnippetName)
Description
Renames a Character Network Snippet object. If the new name is already in use then a unique name will be generated. Use the
name() method to determine the actual name of the Character Network Snippet object.
Arguments
< newCharacterName - the new name of the Character Network object
Return Codes
sSuccess - the Character Network object has been renamed
sInvalidObject - the Character Network was not valid
AlCharTransition* AlCharSnippet::firstTransition(void)
Description
Returns a new wrapper to first transition of the Character Network Snippet.
Return Values
NULL - wrapper not valid, no transitions or unable to construct the wrapper
non NULL - first Snippet transition wrapper
AlCharTransition* AlCharSnippet::nextTransition(void)
Description
Returns a new wrapper to next transition in the Character Network Snippet.
Return Values
NULL - wrapper not valid, no more transitions or unable to construct the wrapper
non NULL - next Snippet transition wrapper
int AlCharSnippet::setTraversal(int traversalStatus)
Description
Sets the Snippet traversal status and returns the previous status.
Arguments
< traversalStatus - the new Snippet object traversal status
Return Values
the previous traversal status
statusCode AlCharSnippet::charSnippetIntegerInfo(AlCharSnippetIntegerInfo dataType,int& iValue) const
Description
Returns the specified integer valued Character Transition data.
Arguments
< dataType - the type of Character Transition data to return
> iValue - the value of the Character Transition data
Return Codes
sSuccess - the Character Transition data was returned in iValue
sInvalidArgument - the Character Transition dataType is not integer valued
statusCode AlCharSnippet::charSnippetStringInfo(AlCharSnippetStringInfo dataType,const char *& sValue) const
Description
Returns the specified string valued Character Transition data.
Arguments
< dataType - the type of Character Transition data to return
> sValue - the value of the Character Transition data
Return Codes
sSuccess - the Character Transition data was returned in sValue
sInvalidArgument - the Character Transition dataType is not string valued
statusCode AlCharSnippet::setCharSnippetIntegerInfo(AlCharSnippetIntegerInfo dataType,int iValue)
Description
Sets the specified integer valued Character Transition data.
Arguments
< dataType - the type of Character Transition data to return
< iValue - the new value of the Character Transition data
Return Codes
sSuccess - the Character Transition data was updated from iValue
sInvalidArgument - the Character Transition dataType is not integer valued
statusCode AlCharSnippet::setCharSnippetStringInfo(AlCharSnippetStringInfo dataType,const char* sValue)
Description
Sets the specified string valued Character Transition data.
Arguments
< dataType - the type of Character Transition data to return
< sValue - the new value of the Character Transition data
Return Codes
sSuccess - the Character Transition data was updated from sValue
sInvalidArgument - the Character Transition dataType is not string valued