AlCharacterSpace
 
 
 

Basic Interface to Alias Character Network Space.

Synopsis

#include <AlCharacterSpace.h>
class AlCharacterSpace : public AlObject
AlCharacterSpace();
virtual ~AlCharacterSpace();
statusCode	create();
virtual statusCode	deleteObject();
virtual AlObject*	copyWrapper() const;
virtual AlObjectType	type() const;
// Character network methods.
AlCharacter*	createCharacter(const char *);
statusCode	deleteCharacter(AlCharacter *);
AlCharacter*	findCharacterByName(const char *);
AlCharacter*	firstCharacter(void);
AlCharacter*	nextCharacter(void);

Description

This class encapsulates the basic functionality for creating, iterating through, locating by name, and deleting Character Networks.

See the AlCharacter class for a description of a Character Network.

The Character Network Space is the set of all Character Networks.

AlCharacterSpace::AlCharacterSpace()

Description

Default constructor for AlCharacterSpace Wrapper object. Use the create() method to initialize an AlCharacterSpace object.

AlCharacterSpace::~AlCharacterSpace()

Description

Deletes an AlCharacterSpace wrapper object.

statusCode AlCharacterSpace::deleteObject()

Description

Delete all the Alias Character Network objects in the Alias Character Network space. For each Character Network in the Character Network space, the deleteObject() method will be invoked for that Character Network. See the AlCharacter class for more information on Character Networks. This method deletes all the Character Network object data. Upon return there will be no Character Networks.

Return Codes

sSuccess - all Character Networks have been deleted from the Character Network Space

sInvalidObject - the Character Network Space was not valid

AlObject* AlCharacterSpace::copyWrapper() const

Description

Makes an exact copy of the AlCharacterSpace wrapper.

Return Values

NULL - unable to create new wrapper due to lack of memory

non NULL - new Character Network Space wrapper

statusCode AlCharacterSpace::create()

Description

Initializes the AlCharacterSpace object.

Return Codes

sSuccess - the Character Network Space has been initialized

sInsufficientMemory - not enough memory available

AlObjectType AlCharacterSpace::type() const

Description

Returns the class identifier kCharacterSpaceType.

AlCharacterSpace* AlCharacterSpace::asCharacterSpacePtr()

Description

This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class.

AlCharacter* AlCharacterSpace::createCharacter(const char *characterName)

Description

Creates a new Character Network in the Character Network Space and returns a pointer to the AlCharacter wrapper. If a Character Network object with the requested name already exists then a new unique name is used for the new Character Network. Uses the AlCharacter::name() method to determine the actual name of a Character Network. See the AlCharacter class for more information on Character Networks.

Arguments

< characterName - name of the object

Return Values

NULL - unable to create new Character Network due to lack of memory

non NULL - new Character Network wrapper

statusCode AlCharacterSpace::deleteCharacter(AlCharacter *character)

Description

Deletes the specified Character Network object from the Character Network Space. See the AlCharacter class for more information on Character Networks.

Arguments

< character - the AlCharacter wrapper of the Character Network object

Return Codes

sSuccess - the Character Network object has been deleted

sInvalidObject - the Character Network Space was not valid

AlCharacter* AlCharacterSpace::findCharacterByName(const char *characterName)

Description

Finds the named Character Network in the Character Network Space and returns a new wrapper for it.

Arguments

< characterName - name of the object

Return Values

NULL - wrapper not valid, unable locate the named Character Network or unable to construct the wrapper

non NULL - named Character Network wrapper

AlCharacter* AlCharacterSpace::firstCharacter(void)

Description

Returns a new wrapper to first Character Network in the Character Network Space.

Return Values

NULL - wrapper not valid, no Character Networks or unable to construct the wrapper

non NULL - first Character Network wrapper

AlCharacter* AlCharacterSpace::nextCharacter(void)

Description

Returns a new wrapper to next Character Network in the Character Network Space.

Return Values

NULL - wrapper not valid, no Character Networks or unable to construct the wrapper

non NULL - next Character Network wrapper