AlCategory
 
 
 

Interface to Alias category objects.

Synopsis

#include <AlCategory.h>
class AlCategory : public AlObject
virtual	~AlCategory();
AlCategory();
virtual AlObject*	copyWrapper() const;
virtual statusCode	deleteObject();
virtual AlObjectType	type() const;
statusCode	create(const char * = NULL);
statusCode	addMember(int);
statusCode	removeMember(int);
int	numberOfMembers() const;
statusCode	members(int numMembers, int members[]);
const char *	name() const;
statusCode	setName( const char*);
const char *	description() const;
statusCode	setDescription( const char*);
statusCode	pick(int);
int	isPicked() const;

Description

Categories are a way of organizing lists of layers. This organization simplifies changing the attributes of associated layers. Each AlCategory has a non unique name, picked status, description and a list of associated layers. The layer list contains layer numbers.

Notes:

1) Attempting to add a layer to a category that is already in the list will fail.

2) Layers can belong to multiple categories.

3) All functions will fail if layers are not enabled.

4) AlCategory is available through OpenModel

AlCategory::AlCategory(void)

Description

Constructs an AlCategory wrapper object.

AlCategory::~AlCategory()

Description

Deletes an AlCategory wrapper object.

statusCode AlCategory::deleteObject()

Description

Deletes the category.

Return Codes

sSuccess - the object was deleted

sFailure - layers functionality turned off or internal failure

sInvalidObject - the object was invalid

AlObject* AlCategory::copyWrapper() const

Description

Returns an exact copy of the AlCategory wrapper.

AlObjectType AlCategory::type() const

Description

Returns the class identifier kCategoryType.

statusCode AlCategory::create( const char* name )

Description

Create a new category.

Arguments

< name - the name of the new category, default parameter name is NULL if not specified

Return Codes

sSuccess - the category was created

sFailure - the category was not created because the layer functionality is turned off.

sAlreadyCreated - object has already been created

const char * AlCategory::name() const

Description

Returns the name of the object.

statusCode AlCategory::setName( const char *newName )

Description

Sets the name of the category

Arguments

< newName - new name of category

Return Codes

sSuccess - the name was set

sFailure - the name length exceed 255 characters or layers functionality is disabled.

sInvalidArgument - newName was NULL

sInvalidObject - the object is not valid

const char * AlCategory::description() const

Description

Returns the description of the object.

statusCode AlCategory::setDescription( const char *newDesc )

Description

Sets the description of the category

Arguments

< newDesc - new description of the category

Return Codes

sSuccess - the description was set

sFailure - the description length exceed 255 characters or layers functionality is disabled.

sInvalidArgument - newDesc was NULL

sInvalidObject - the object is not valid

statusCode AlCategory::addMember(int layerID)

Description

Adds a layer to the current category.

Arguments

< layerID- Numerical ID of the Layer to be added

Return Codes

sSuccess - the layer id was added

sFailure - layers functionality turned off or internal failure or the layer id has already been added

sInvalidObject - the object was invalid

sInvalidArgument - the layer ID was invalid

statusCode AlCategory::removeMember(int layerID )

Description

Removes a layer from the current category

Arguments

< layerID- numerical ID of the layer to be removed

Return Codes

sSuccess - the layer id was removed

sFailure - layers functionality turned off or internal failure or the layer id does not exist in the category

sInvalidObject - the object was invalid

sInvalidArgument - the layer ID was invalid

int AlCategory::numberOfMembers() const

Description

Returns the member count of the category. If this method fails, -1 is returned.

statusCode AlCategory::members(int numMembers, int members[])

Description

Returns the members of the category

Arguments

< numMembers- size of array members

> members - array of size numMembers, to return the member list in

Return Codes

sSuccess - the number of members is returned can legally be zero

sFailure - layers functionality turned off or internal failure

sInvalidObject - the object was invalid

sInvalidArgument - the value numMembers was not within layer range or the numMembers was greater then the numberOfMembers() in the category

boolean AlCategory::isPicked() const

Description

Returns the pick status of the category;

Return Codes

true - if the category is picked

false - if it is not picked, the object is invalid or layer functionality is turned off.

statusCode AlCategory::pick (boolean state)

Description

Sets the pick status of the category

Arguments

< state - new state of the category, a value of true makes the category picked and false sets it to unpicked

Return Codes

sSuccess - the state was set

sFailure - layers functionality is disabled.

sInvalidObject - the object is not valid