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

amire::property::StructVectorProperty Class Reference

Inheritance diagram for amire::property::StructVectorProperty:

amire::property::PersistentProperty amire::property::Property List of all members.

Public Member Functions

 StructVectorProperty (const std::string &structName, const PropertyTypeManager *propertyTypeManager)
 StructVectorProperty (const StructVectorProperty &property)
virtual ~StructVectorProperty ()
virtual bool equals (const osg::ref_ptr< const Property > &property) const
virtual osg::ref_ptr< Propertyclone () const
virtual void cloneFrom (const osg::ref_ptr< const Property > &property)
int size () const
void clear ()
osg::ref_ptr< StructProperty > & get (int index) const
void resize (int length)
void set (int index, const osg::ref_ptr< StructProperty > &value)
void insert (int index, const osg::ref_ptr< StructProperty > &value)
void remove (int index)
void push (const osg::ref_ptr< StructProperty > &value)
osg::ref_ptr< StructPropertypop ()

Detailed Description

Instances of the class StructVectorProperty contain several structured properties of a specified base type. Additionally to the derived interface it provides a set of methods to manipulate the elements contained in the structured vector property, a constructor for creating an empty structured vector property and a copy constructor, which creates a copy of a base property with the same class type.


Constructor & Destructor Documentation

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

amire::property::StructVectorProperty::StructVectorProperty const StructVectorProperty &  property  ) 
 

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


Member Function Documentation

void amire::property::StructVectorProperty::clear  ) 
 

Removes all elements of this structured vector property.

virtual osg::ref_ptr<Property> amire::property::StructVectorProperty::clone  )  const [virtual]
 

Creates a deep copy clone of the property. The returned property is equal to the original property and doesn't share any value references with it.

Implements amire::property::Property.

virtual void amire::property::StructVectorProperty::cloneFrom const osg::ref_ptr< const Property > &  property  )  [virtual]
 

Initializes this property with a deep copy of the given property. Afterware, this property is equal to the given and doesn't share any value references with it. An exception is thrown, if the deep copy is not possible.

Implements amire::property::Property.

virtual bool amire::property::StructVectorProperty::equals const osg::ref_ptr< const Property > &  property  )  const [virtual]
 

The ‘virtual bool equals(const Property *property) const’ method returns true when the as parameter property given property is equal to the this property instance and false otherwise. It also doesn’t modify the property instance and therefore it is const.

Implements amire::property::Property.

osg::ref_ptr<StructProperty>& amire::property::StructVectorProperty::get int  index  )  const
 

Returns the structured property at the specified index, which should be used when you want to modify the structured property otherwise you should use the get method. An assert exception is thrown when the index is out of range (index >= size).

void amire::property::StructVectorProperty::insert int  index,
const osg::ref_ptr< StructProperty > &  value
 

Inserts the given structured property value into the vector at the specified index. The insertion at the end of the vector (index = size) is allowed. An assert exception is thrown when: the index is out of range (index > size), the given value is null or the structured property type of the given value is not derived from the base structured property type of the vector.

osg::ref_ptr<StructProperty> amire::property::StructVectorProperty::pop  ) 
 

Removes the last structured property value from the vector and returns it. An assert exception is thrown when the vector is empty.

void amire::property::StructVectorProperty::push const osg::ref_ptr< StructProperty > &  value  ) 
 

Appends the given structured property value at the end of the vector like a push on a stack. An assert exception is thrown when: the given value is null or the structured property type of the given value is not derived from the base structured property type of the vector.

void amire::property::StructVectorProperty::remove int  index  ) 
 

Removes the structured property from the vector at the specified index. An assert exception is thrown when the index is out of range (index >= size).

void amire::property::StructVectorProperty::resize int  length  ) 
 

Resizes the structured vector property. Elements will be removed if the new size is smaller than the actual size. New elements will be added if the new size is greater than the actual size.

void amire::property::StructVectorProperty::set int  index,
const osg::ref_ptr< StructProperty > &  value
 

Sets the structured property at the specified index to the given value. An assert exception is thrown when: the index is out of range (index >= size), the given value is null or the structured property type of the given value is not derived from the base structured property type of the vector.

int amire::property::StructVectorProperty::size  )  const
 

The ‘int size() const’ method returns the number of structures properties that are currently contained in the vector.


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