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

amire::property::TBaseVectorProperty< type > Class Template Reference

Inheritance diagram for amire::property::TBaseVectorProperty< type >:

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

Public Member Functions

 TBaseVectorProperty (const PropertyTypeManager *propertyTypeManager)
 TBaseVectorProperty (int length, const PropertyTypeManager *propertyTypeManager)
 TBaseVectorProperty (int length, const type *pvalues, const PropertyTypeManager *propertyTypeManager)
 TBaseVectorProperty (const TBaseVectorProperty< type > &property)
virtual ~TBaseVectorProperty ()
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
const type & get (int index) const
void clear ()
void replace (int length, const type *values)
void set (int index, const type &value)
void insert (int index, type value)
void remove (int index)
void push (type value)
type pop ()

Detailed Description

template<class type>
class amire::property::TBaseVectorProperty< type >

The template implementation class TBaseVectorProperty<type> is the implementation of all persistent base vector properties. Additionally to the derived interface it provides a set of methods to manipulate the elements contained in the base vector property, a constructor for creating a new base vector property with a given list of values and a copy constructor which creates a copy of a base property with the same class type.


Constructor & Destructor Documentation

template<class type>
amire::property::TBaseVectorProperty< type >::TBaseVectorProperty const PropertyTypeManager propertyTypeManager  )  [inline]
 

template<class type>
amire::property::TBaseVectorProperty< type >::TBaseVectorProperty int  length,
const PropertyTypeManager propertyTypeManager
[inline]
 

template<class type>
amire::property::TBaseVectorProperty< type >::TBaseVectorProperty int  length,
const type *  pvalues,
const PropertyTypeManager propertyTypeManager
[inline]
 

template<class type>
amire::property::TBaseVectorProperty< type >::TBaseVectorProperty const TBaseVectorProperty< type > &  property  )  [inline]
 

template<class type>
virtual amire::property::TBaseVectorProperty< type >::~TBaseVectorProperty  )  [inline, virtual]
 


Member Function Documentation

template<class type>
void amire::property::TBaseVectorProperty< type >::clear  )  [inline]
 

Removes all elements from the base vector property.

template<class type>
virtual osg::ref_ptr<Property> amire::property::TBaseVectorProperty< type >::clone  )  const [inline, 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.

template<class type>
virtual void amire::property::TBaseVectorProperty< type >::cloneFrom const osg::ref_ptr< const Property > &  property  )  [inline, 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.

template<class type>
virtual bool amire::property::TBaseVectorProperty< type >::equals const osg::ref_ptr< const Property > &  property  )  const [inline, 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.

template<class type>
const type& amire::property::TBaseVectorProperty< type >::get int  index  )  const [inline]
 

The ‘const type &get(int index) const’ method returns a const reference of the value contained in the vector at the position specified by the given index. The allowed index range is from 0 to one below the number of values in the vector (0 .. size – 1). An assert exception is thrown when the given index is out of range.

template<class type>
void amire::property::TBaseVectorProperty< type >::insert int  index,
type  value
[inline]
 

The ‘void insert(int index, type value)’ method inserts the given value of the specified index into the value array of the vector. The allowed index range is from 0 to the number of values in the vector (0 .. size). This means you also can insert at the end of the vector. An assert exception is thrown when the given index is out of range.

template<class type>
type amire::property::TBaseVectorProperty< type >::pop  )  [inline]
 

The ‘type pop()’ method removes the last value from the vector and returns the removed value. An assert exception is thrown when the vector is empty.

template<class type>
void amire::property::TBaseVectorProperty< type >::push type  value  )  [inline]
 

The ‘void push(type value)’ method adds the given value to the end of the vector like a push operation on a stack.

template<class type>
void amire::property::TBaseVectorProperty< type >::remove int  index  )  [inline]
 

The ‘void remove(int index)’ method removes the value in the vector at the specified position. The allowed index range is from 0 to one below the number of values in the vector (0 .. size – 1). An assert exception is thrown when the given index is out of range.

template<class type>
void amire::property::TBaseVectorProperty< type >::replace int  length,
const type *  values
[inline]
 

Replaces the elements with the given elements, which are specified by the given array and the length of this array.

template<class type>
void amire::property::TBaseVectorProperty< type >::set int  index,
const type &  value
[inline]
 

The ‘void set(int index, const type &value)’ method sets the value in the vector at the specified index to the given value. The allowed index range is from 0 to one below the number of values in the vector (0 .. size – 1). An assert exception is thrown when the given index is out of range.

template<class type>
int amire::property::TBaseVectorProperty< type >::size  )  const [inline]
 

The ‘int size() const’ method returns the actual number of the values 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