#include <Vector.h>
You may use this class in the same way you use std::vector, in fact you don't need to use it at all, but bear in mind something, the standard std::vector class does not include some methods added here like Vector::toString() or Vector::lock() and Vector::unlock()
Definition at line 30 of file Vector.h.
Public Member Functions | |
template<typename _InputIterator> | |
Vector (_InputIterator __first, _InputIterator __last, const _Alloc &__a=_Alloc()) | |
Builds a Vector from a range. | |
Vector (const Vector &__x) | |
Copy constructor, builds a vector from another. | |
Vector (size_t __n, const _Tp &__value=_Tp(), const _Alloc &__a=_Alloc()) | |
Instantites a fixed size vector. | |
Vector (const _Alloc &__a=_Alloc()) | |
Instantiates a Vector object with the given allocator. | |
std::string | toString () |
Converts the items list to an understadable array. | |
void | lock () |
Restricts access from another thread to whatever operations you're doing here look at: xvr2::Mutex::lock(). | |
void | unlock () |
Reenables access to other threads, this is the exact opposite of Vector::lock. | |
virtual const char * | getClassName () |
Returns the name of the current class. | |
Static Public Member Functions | |
static void | debugmsg (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Will print a debug message to the screen. | |
static void | debugmsgln (Object *obj, const char *msg, int linenumber=__LINE__, const char *srcfile=__FILE__) |
Protected Attributes | |
Mutex | mv |
std::string | __cls_name |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const Object &s) |
xvr2::Vector< _Tp, _Alloc >::Vector | ( | _InputIterator | __first, | |
_InputIterator | __last, | |||
const _Alloc & | __a = _Alloc() | |||
) | [inline] |
xvr2::Vector< _Tp, _Alloc >::Vector | ( | const Vector< _Tp, _Alloc > & | __x | ) | [inline] |
xvr2::Vector< _Tp, _Alloc >::Vector | ( | size_t | __n, | |
const _Tp & | __value = _Tp() , |
|||
const _Alloc & | __a = _Alloc() | |||
) | [inline] |
xvr2::Vector< _Tp, _Alloc >::Vector | ( | const _Alloc & | __a = _Alloc() |
) | [inline] |
std::string xvr2::Vector< _Tp, _Alloc >::toString | ( | ) | [inline, virtual] |
void xvr2::Vector< _Tp, _Alloc >::lock | ( | ) | [inline] |
Restricts access from another thread to whatever operations you're doing here look at: xvr2::Mutex::lock().
If for some reason you need to share this Vector between multiple threads you should make use of the provided locking mechanism to serialize read/write access. That being said you should call lock() first, then perform whatever you need to do with the Vector and finally call unlock().
void xvr2::Vector< _Tp, _Alloc >::unlock | ( | ) | [inline] |
Reenables access to other threads, this is the exact opposite of Vector::lock.
virtual const char* xvr2::Object::getClassName | ( | ) | [virtual, inherited] |
Returns the name of the current class.
static void xvr2::Object::debugmsg | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
Will print a debug message to the screen.
static void xvr2::Object::debugmsgln | ( | Object * | obj, | |
const char * | msg, | |||
int | linenumber = __LINE__ , |
|||
const char * | srcfile = __FILE__ | |||
) | [static, inherited] |
std::ostream& operator<< | ( | std::ostream & | stream, | |
const Object & | s | |||
) | [friend, inherited] |
Mutex xvr2::Vector< _Tp, _Alloc >::mv [protected] |
Definition at line 32 of file Vector.h.
Referenced by xvr2::Vector< xvr2::PipelineFilter * >::lock(), and xvr2::Vector< xvr2::PipelineFilter * >::unlock().
std::string xvr2::Object::__cls_name [protected, inherited] |