Home
Install
Use
Develop
Support
News
Credits
hosted by
|
11 #ifndef __ReferenceVector_h
12 #define __ReferenceVector_h
14 #include "ReferenceAble.h"
26 template< class Type, bool active = true> class Vector
37 { elements = v.elements; }
45 { elements = v.elements; return * this; }
49 { check (index); return elements[index]; }
53 { check (index); return elements[index]; }
56 void resize ( unsigned n)
57 { elements.resize (n); }
60 unsigned size () const
61 { return elements.size(); }
66 std::vector< Reference::To<Type,active> > elements;
69 void check ( unsigned index) const
71 if (index >= elements.size())
72 throw Error (InvalidParam, "Reference::Vector::check",
73 "index=%u >= size=%u", index, elements.size());
79 #endif // #ifndef __ReferenceVector_h
Contains two basic classes that simplify dynamic memory management. Definition: HeapTracked.h:17
Vector. Definition: Vector.h:22
A convenient exception handling class. Definition: Error.h:54
Template class manages Reference::Able objects. Definition: Reference.h:74
A smart pointer that gets invalidated when its target is destroyed. Definition: ReferenceVector.h:31
Generated using doxygen 1.8.17
|