Patate Lib  0.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
PatateCommon::PropertyArray< T > Class Template Reference

Inherits PatateCommon::BasePropertyArray.

Public Types

typedef T ValueType
typedef std::vector< ValueType > VectorType
typedef VectorType::reference Reference
typedef VectorType::const_reference ConstReference

Public Member Functions

 PropertyArray (const std::string &name, T t=T())
virtual void reserve (size_t n)
 Reserve memory for n elements.
virtual void resize (size_t n)
 Resize storage to hold n elements.
virtual void pushBack ()
 Extend the number of elements by one.
virtual void freeMemory ()
 Free unused memory.
virtual void swap (size_t i0, size_t i1)
 Let two elements swap their storage place.
virtual BasePropertyArrayclone () const
 Return a deep copy of self.
virtual const std::type_info & type ()
 Return the type_info of the property.
const T * data () const
 Get pointer to array (does not work for T==bool)
std::vector< T > & vector ()
 Get reference to the underlying vector.
Reference operator[] (int _idx)
 Access the i'th element. No range check is performed!
ConstReference operator[] (int _idx) const
 Const access to the i'th element. No range check is performed!
const bool * data () const
- Public Member Functions inherited from PatateCommon::BasePropertyArray
 BasePropertyArray (const std::string &name)
 Default constructor.
virtual ~BasePropertyArray ()
const std::string & name () const
 Return the name of the property.

Additional Inherited Members

- Protected Attributes inherited from PatateCommon::BasePropertyArray
std::string name_