DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Private Types | Private Member Functions | Private Attributes
dabc::ReferencesVector Class Reference

Vector of dabc::Reference objects. More...

#include <dabc/ReferencesVector.h>

Public Member Functions

bool Add (Reference &ref) throw ()
 Add reference to the vector. More...
 
bool AddAt (Reference &ref, unsigned pos) throw ()
 Add reference to the vector at specified position. More...
 
bool Clear (bool asowner=false) throw ()
 Clear all references, if owner specified objects will be destroyed. More...
 
bool ExtractRef (Object *obj, Reference &ref)
 Remove reference at specified position. More...
 
bool ExtractRef (unsigned n, Reference &ref)
 Remove reference at specified position. More...
 
ObjectFindObject (const char *name, int len=-1) const
 Simple search of object by name, no any subfolder structures. More...
 
Reference Get (unsigned n) const
 Returns new reference on object with index n. More...
 
ObjectGetObject (unsigned n) const
 Returns pointer on the object. More...
 
unsigned GetSize () const
 Returns number of items in vector. More...
 
bool HasObject (Object *ptr)
 Return true if vector has pointer on the object. More...
 
Reference operator[] (unsigned n) const
 Returns new reference on object with index n. More...
 
 ReferencesVector () throw ()
 Constructor. More...
 
bool Remove (Object *obj) throw ()
 Remove reference on specified object
More...
 
void RemoveAt (unsigned n) throw ()
 Remove reference on specified object
More...
 
Reference TakeLast ()
 Remove last reference from vector. More...
 
Reference TakeRef (unsigned n)
 Remove reference from vector and return it to the user. More...
 
virtual ~ReferencesVector () throw ()
 Destructor. More...
 

Private Types

typedef std::vector< Referencerefs_vector
 

Private Member Functions

void ExpandVector ()
 

Private Attributes

refs_vectorfVector
 vector with references More...
 

Detailed Description

Vector of dabc::Reference objects.

Definition at line 32 of file ReferencesVector.h.

Member Typedef Documentation

◆ refs_vector

typedef std::vector<Reference> dabc::ReferencesVector::refs_vector
private

Definition at line 35 of file ReferencesVector.h.

Constructor & Destructor Documentation

◆ ReferencesVector()

dabc::ReferencesVector::ReferencesVector ( )
throw (
)

Constructor.

Definition at line 22 of file ReferencesVector.cxx.

◆ ~ReferencesVector()

dabc::ReferencesVector::~ReferencesVector ( )
throw (
)
virtual

Destructor.

Definition at line 28 of file ReferencesVector.cxx.

Member Function Documentation

◆ ExpandVector()

void dabc::ReferencesVector::ExpandVector ( )
private

Definition at line 35 of file ReferencesVector.cxx.

◆ Add()

bool dabc::ReferencesVector::Add ( Reference ref)
throw (
)

Add reference to the vector.

Definition at line 56 of file ReferencesVector.cxx.

◆ AddAt()

bool dabc::ReferencesVector::AddAt ( Reference ref,
unsigned  pos 
)
throw (
)

Add reference to the vector at specified position.

Definition at line 71 of file ReferencesVector.cxx.

◆ Remove()

bool dabc::ReferencesVector::Remove ( Object obj)
throw (
)

Remove reference on specified object

Definition at line 91 of file ReferencesVector.cxx.

◆ RemoveAt()

void dabc::ReferencesVector::RemoveAt ( unsigned  n)
throw (
)

Remove reference on specified object

Definition at line 103 of file ReferencesVector.cxx.

◆ Clear()

bool dabc::ReferencesVector::Clear ( bool  asowner = false)
throw (
)

Clear all references, if owner specified objects will be destroyed.

Definition at line 160 of file ReferencesVector.cxx.

◆ GetSize()

unsigned dabc::ReferencesVector::GetSize ( ) const
inline

Returns number of items in vector.

Definition at line 64 of file ReferencesVector.h.

◆ GetObject()

Object* dabc::ReferencesVector::GetObject ( unsigned  n) const
inline

Returns pointer on the object.

Definition at line 67 of file ReferencesVector.h.

◆ Get()

Reference dabc::ReferencesVector::Get ( unsigned  n) const
inline

Returns new reference on object with index n.

Definition at line 71 of file ReferencesVector.h.

◆ operator[]()

Reference dabc::ReferencesVector::operator[] ( unsigned  n) const
inline

Returns new reference on object with index n.

Definition at line 74 of file ReferencesVector.h.

◆ TakeRef()

dabc::Reference dabc::ReferencesVector::TakeRef ( unsigned  n)

Remove reference from vector and return it to the user.

Definition at line 117 of file ReferencesVector.cxx.

◆ TakeLast()

dabc::Reference dabc::ReferencesVector::TakeLast ( )

Remove last reference from vector.

Definition at line 147 of file ReferencesVector.cxx.

◆ ExtractRef() [1/2]

bool dabc::ReferencesVector::ExtractRef ( unsigned  n,
Reference ref 
)

Remove reference at specified position.

operator << is used to avoid child locking

Definition at line 127 of file ReferencesVector.cxx.

◆ ExtractRef() [2/2]

bool dabc::ReferencesVector::ExtractRef ( Object obj,
Reference ref 
)

Remove reference at specified position.

operator << is used to avoid child locking

Definition at line 137 of file ReferencesVector.cxx.

◆ FindObject()

dabc::Object * dabc::ReferencesVector::FindObject ( const char *  name,
int  len = -1 
) const

Simple search of object by name, no any subfolder structures.

Definition at line 174 of file ReferencesVector.cxx.

◆ HasObject()

bool dabc::ReferencesVector::HasObject ( Object ptr)

Return true if vector has pointer on the object.

Definition at line 183 of file ReferencesVector.cxx.

Field Documentation

◆ fVector

refs_vector* dabc::ReferencesVector::fVector
private

vector with references

Definition at line 37 of file ReferencesVector.h.


The documentation for this class was generated from the following files: