1 #ifndef GAUDIKERNEL_SHAREDOBJECTSCONTAINER_H 2 #define GAUDIKERNEL_SHAREDOBJECTSCONTAINER_H 1 40 typedef typename ConstVector::iterator
iterator;
87 template <
class DATA,
class PREDICATE>
90 insert( first, last, cut );
100 static const CLID s_clid = ( (
static_cast<CLID>( -1 ) << 16 )
103 & !
static_cast<CLID>( 0x00030000 )
104 & !static_cast<CLID>( 0x00040000 ) )
115 operator const ConstVector&()
const {
return data(); }
135 template <
class DATA>
166 template <
class DATA,
class PREDICATE>
167 void insert( DATA first, DATA last,
const PREDICATE& cut )
196 template <
class OUTPUT,
class PREDICATE>
197 OUTPUT
get(
const PREDICATE& cut, OUTPUT
output )
const 220 template <
class PREDICATE>
310 return end() != _i ? ( _i -
begin() ) : -1;
318 if ( 0 > index || !( index < (
long)
size() ) ) {
335 TYPE* _obj =
dynamic_cast<TYPE*
>( object );
339 const size_type pos =
size();
353 const size_type pos = _i -
begin();
367 #endif // GAUDIKERNEL_SHAREDOBJECTSCONTAINER_H bool erase(const TYPE *object)
erase the first occurance of the certain element
reference front()
the first element (only for non-empty vectors)
Very simple class to represent the container of objects which are not owned by this container...
ContainedObject * containedObject(long index) const override
Pointer to an object of a given distance.
const_reference at(size_type index) const
checked access (const-version)
bool operator==(const ConstVector &right) const
equal content with corresponding vector ?
reference operator()(size_type index)
'functional'-access
const_iterator begin() const
void erase(const PREDICATE &cut)
erase the objects which satisfy the criteria
bool operator==(const SharedObjectsContainer &right) const
equal content with other container ?
void push_back(const TYPE *object)
insert one object into the container
bool operator<(const SharedObjectsContainer &right) const
comparisons with other container
ConstVector::size_type size_type
ConstVector::reverse_iterator reverse_iterator
size_type size() const
get the actual size of the container
size_type numberOfObjects() const override
Number of objects in the container.
SharedObjectsContainer(DATA first, DATA last, const PREDICATE &cut)
the templated constructor from the pair of iterators and the predicate.
void insert(DATA first, DATA last, const PREDICATE &cut)
add the sequence of 'good'objects into the container
reverse_iterator rbegin()
ConstVector::iterator iterator
ConstVector::const_reference const_reference
void insert(const TYPE *object)
insert one object into the container
const_reference front() const
the first element (only for non-empty vectors) (const-version)
const_iterator end() const
const_reverse_iterator rbegin() const
ConstVector::const_iterator const_iterator
const_reference operator()(size_type index) const
'functional'-access (const version)
SharedObjectsContainer(const ConstVector &data)
const_reference back() const
the last element (only for non-empty vectors) (const-version)
const_reference operator[](size_type index) const
index access (const-version)
const ConstVector & data() const
get the access to the underlying container (const)
reference at(size_type index)
checked access
long index(const ContainedObject *object) const override
Distance of a given object from the beginning of its container.
long add(ContainedObject *object) override
Virtual functions (forwards to the concrete container definitions) Add an object to the container...
unsigned int CLID
Class ID definition.
SharedObjectsContainer()=default
bool empty() const
empty container?
reference operator[](size_type index)
index access
SharedObjectsContainer & operator=(SharedObjectsContainer &&)=default
std::vector< const TYPE * > ConstVector
the actual container type
All classes that their objects may be contained in an LHCb ObjectContainer (e.g.
const_reverse_iterator rend() const
SharedObjectsContainer(ConstVector &&data)
T back_inserter(T...args)
static const CLID & classID()
Retrieve the unuqie class ID (static)
ConstVector::reference reference
reference back()
the last element (only for non-empty vectors)
ObjectContainerBase is the base class for Gaudi container classes.
void insert(DATA first, DATA last)
add the sequence of objects into the container
bool operator<(const ConstVector &right) const
comparisons with corresponding vector
const CLID & clID() const override
Retrieve the unique class ID (virtual)
SharedObjectsContainer(DATA first, DATA last)
the templated constructor from the pair of iterators
void erase(iterator i)
erase the object by iterator
ConstVector::const_reverse_iterator const_reverse_iterator
ConstVector::value_type value_type
various types (to make STL happy)