Enumeration Lists and List Elements: adco_cEnumeration & adco_cEnumElem
class adco_cEnumeration
Description
This class contains a collection of adco_cEnumElem items. Each list additionally has a name and a descriptive string. Enumerations are used to expose the list of models recognized by a model factory, parameters recognized by each specific subclass of CAdppmdl, return lists of warnings, and record the valid members of an enumerated parameter type. There is a special NullList with zero elements referred to by the exported global pNullList. The special exported global list element NULL_ELEM is a member of this list, but has no index.
Methods
Construction/Destruction
Construction/Destruction is handled by sub-class methods which are not exposed. References to the Enumerations internal to various classes can be created using methods of the owning class.
virtual void Initialize( void ) const
Used internally to avoid the chicken/egg problem for interdependent constants.
Descriptive
virtual const char* name() const
Retrieve the name of the list. If the list is referrenced via another list, this name will match the name of the referring element.
Return the classification (see adco_cEnumElem) of the element with the specified name. Throws an error if the name is not in the list.
virtual unsigned int idx( const adco_CParam& ParamElem ) const
For numeric parameters, returns the unsigned int value if the value is positive and less than the number of elements in the list. For string parameters, returns the index of element with the specified name. For enumerated parameters, returns the index of the element if it is from this list. Throws errors for values not found or out of bounds.
class adco_cEnumElem
Description
This class represents an element of a adco_cEnumeration list. Each element has a name, a descriptive string, and a classification, which is itself an adco_cEnumElem. List elements can be encapsulated in adco_CParam instances. The link-list of element classifications is terminated with the special element NULL_ELEM, a member of the Null_List.
Methods
Construction/Destruction
adco_cEnumElem( const adco_cEnumeration& elist, unsigned int elem_idx )
Construct an element referring to the elem_idxth element of elist. Throws an error if elem_idx is equal or greater than the size of the list.
API INTEGRATION CODING FOR DEVELOPERS
Enumeration Lists and List Elements: adco_cEnumeration & adco_cEnumElem
class adco_cEnumeration
Description
This class contains a collection of adco_cEnumElem items. Each list additionally has a name and a descriptive string. Enumerations are used to expose the list of models recognized by a model factory, parameters recognized by each specific subclass of CAdppmdl, return lists of warnings, and record the valid members of an enumerated parameter type. There is a special NullList with zero elements referred to by the exported global pNullList. The special exported global list element NULL_ELEM is a member of this list, but has no index.
Methods
Construction/Destruction
Descriptive
Returns true if the list is NOT identical to the specified list.
Contents
class adco_cEnumElem
Description
This class represents an element of a adco_cEnumeration list. Each element has a name, a descriptive string, and a classification, which is itself an adco_cEnumElem. List elements can be encapsulated in adco_CParam instances. The link-list of element classifications is terminated with the special element NULL_ELEM, a member of the Null_List.
Methods
Construction/Destruction
Relation to containing adco_cEnumeration list
Descriptive