class os_enum_type : public os_typeThis class is part of the ObjectStore metaobject protocol, which provides access to ObjectStore schemas. An instance of this class represents a C++ enumeration type. This class is derived from os_type.
The types os_int32 and os_boolean, used throughout this manual, are each defined as a signed 32-bit integer type. The type os_unsigned_int32 is defined as an unsigned 32-bit integer type.
Programs using this class must include <ostore/ostore.hh>, followed by <ostore/coll.hh> (if used), followed by <ostore/mop.hh>.
static os_enum_type &create( const char *name, os_List<os_enumerator_literal*>& );Creates an instance of os_enum_type named name. The specified list contains the enumerators of the created enumeration type.
const char *get_name() const;Returns the name of the specified enumeration. A zero-length string is returned for an anonymous enumeration.
const os_enumerator_literal *get_enumerator(os_int32) const;Returns the enumerator that names the specified integer. Returns 0 if there is no enumerator with the specified value. If there is more than one enumerator with the specified value, the first one is returned.
os_List<const os_enumerator_literal*> get_enumerators() const;Returns a list, in declaration order, of the enumerator literals defined by the enumeration.
os_List<os_pragma*> get_pragmas() const;Returns the pragmas associated with the specified enumeration.
void get_source_position ( const char* &file, os_unsigned_int32 &line ) const;Returns the source position associated with the specified enumeration.
void set_enumerators(os_List<os_enumerator_literal*>&);Specifies, in declaration order, the enumerator literals defined by the specified enumeration.
void set_name(const char *);Sets the name of the specified enumeration.
void set_pragmas(os_List<os_pragma*>);Sets the pragmas associated with the specified enumeration.
void set_source_position( const char* file, os_unsigned_int32 line );Sets the source position associated with the specified enumeration.
Updated: 03/31/98 17:25:09