tsc_ListAttribute

This class is a subclass of tsc_Attribute that is used for attributes whose data type is a list of choices.  The choices themselves are represented as a list of strings, however this list is only available from a feature code library.  The tsc_ListAttribute contains only the selected item number and the string that corresponds to the number.

Public constructors

tsc_ListAttribute ();

Constructs an empty list attribute object.

tsc_ListAttribute (const char* name, const char* itemText, int value);

Constructs a list attribute with the given name, text, and item number. To make a valid matching item number and text it is necessary to use a feature library.

tsc_ListAttribute (const tsc_Attribute& attributeBase);

Constructs a list attribute from the base class.  An exception is raised if the base instance is not a list attribute.

Public methods

int Value () const;

Gets the selected item number.

tsc_String StringValue () const;

Gets the text of the selected item.

void Value (int item, const char* text);

Sets the selected item number and text.  To make a valid matching pair of values it is necessary to use a feature library.

Inherited methods

tsc_String Name () const;

Returns the name of the attribute.

tsc_AttributeType Type () const;

Returns the type of the attribute value.

bool IsNull () const;

Returns true if the attribute is null, probably as a result of a failed operation.

virtual tsc_String ToString () const;

Returns a string representation of the attribute's value.