Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

amire::property::StructPropertyType Class Reference

Inheritance diagram for amire::property::StructPropertyType:

amire::property::PropertyType List of all members.

Public Member Functions

 StructPropertyType (const std::string &structName, PropertyTypeManager *propertyTypeManager)
 StructPropertyType (const std::string &structName, const std::string &baseStructName, PropertyTypeManager *propertyTypeManager)
virtual ~StructPropertyType ()
virtual bool isTypeOf (const osg::ref_ptr< const PropertyType > &type) const
const osg::ref_ptr< const
StructPropertyType > & 
getBaseType () const
bool isFieldDefined (const std::string &fieldName) const
const std::vector< std::string > & getFieldNames () const
const osg::ref_ptr< const
PropertyType > & 
getFieldType (const std::string &fieldName) const
const std::string & getSemanticHint (const std::string &fieldName) const
void addField (const std::string &fieldName, const std::string &fieldType, const std::string &semanticHint="")
void addField (const std::string &fieldName, const osg::ref_ptr< const PropertyType > &type, const std::string &semanticHint="")
void changeField (const std::string &fieldName, const std::string &fieldType, const std::string &semanticHint="")
void changeField (const std::string &fieldName, const osg::ref_ptr< const PropertyType > &type, const std::string &semanticHint="")
void removeField (const std::string &fieldName)
void clearFields ()

Detailed Description

An instance of the class StructPropertyType describes a structured property type by specifying all field names and types of the structured property type and its base structured property type. It provides interfaces to manipulate the structure and to access all field information.


Constructor & Destructor Documentation

amire::property::StructPropertyType::StructPropertyType const std::string &  structName,
PropertyTypeManager propertyTypeManager
 

amire::property::StructPropertyType::StructPropertyType const std::string &  structName,
const std::string &  baseStructName,
PropertyTypeManager propertyTypeManager
 

virtual amire::property::StructPropertyType::~StructPropertyType  )  [virtual]
 


Member Function Documentation

void amire::property::StructPropertyType::addField const std::string &  fieldName,
const osg::ref_ptr< const PropertyType > &  type,
const std::string &  semanticHint = ""
 

Adds a new field with the specified field name and type. An assert exception is thrown when the given type is null or the field is already defined in the structured property type.

void amire::property::StructPropertyType::addField const std::string &  fieldName,
const std::string &  fieldType,
const std::string &  semanticHint = ""
 

Adds a new field with the specified field name and type. An assert exception is thrown when the given type is null or the field is already defined in the structured property type.

void amire::property::StructPropertyType::changeField const std::string &  fieldName,
const osg::ref_ptr< const PropertyType > &  type,
const std::string &  semanticHint = ""
 

Changes the property type of the field specified by the field name to the given property type. An assert exception is thrown when the given type is null or the field is not defined in the structured property type.

void amire::property::StructPropertyType::changeField const std::string &  fieldName,
const std::string &  fieldType,
const std::string &  semanticHint = ""
 

Changes the property type of the field specified by the field name to the given property type. An assert exception is thrown when the given type is null or the field is not defined in the structured property type.

void amire::property::StructPropertyType::clearFields  ) 
 

Removes all fields from this structured property type.

const osg::ref_ptr<const StructPropertyType>& amire::property::StructPropertyType::getBaseType  )  const
 

The ‘const StructPropertyType *getBaseType() const’ method returns the base structured property type or null if no base structured property type is define.

const std::vector<std::string>& amire::property::StructPropertyType::getFieldNames  )  const
 

The ‘const vector<string> &getFieldNames() const’ method returns the field names that are defined in the structured property type.

const osg::ref_ptr<const PropertyType>& amire::property::StructPropertyType::getFieldType const std::string &  fieldName  )  const
 

The ‘const PropertyType *getFieldType(const string &fieldName) const’ method returns the property type of the field specified by the field name. An assert exception is thrown when the field is not defined in the structured property type.

const std::string& amire::property::StructPropertyType::getSemanticHint const std::string &  fieldName  )  const
 

Returns the sematic hint for the specified field. Semantic hint are used to extend the type by a semantic keyword. A string field with the semantic hint 'file' for example would be a hint to interprete the string as a filename. An exception is thrown, if the field is not defiend.

bool amire::property::StructPropertyType::isFieldDefined const std::string &  fieldName  )  const
 

The ‘const bool isFieldDefined(const string &fieldName) const’ method returns true when the field with the specified name is defined in the structured property type. Otherwise false is returned.

virtual bool amire::property::StructPropertyType::isTypeOf const osg::ref_ptr< const PropertyType > &  type  )  const [virtual]
 

Returns true when the given property type is the same property type as this one or a base property type of this one. Otherwise false is returned.

Reimplemented from amire::property::PropertyType.

void amire::property::StructPropertyType::removeField const std::string &  fieldName  ) 
 

The ‘void removeField(const string &fieldName)’ method removes the field definition specified by the field name from the structured property type. An assert exception is thrown when the field is not defined in the structured property type.


The documentation for this class was generated from the following file:
Generated on Tue May 20 17:23:59 2003 for AMIRE-Framework by doxygen1.3