Gazebo Rendering

API Reference

6.6.3
BaseCompositeStore< T > Class Template Reference

#include <BaseStorage.hh>

Public Member Functions

 BaseCompositeStore ()
 
virtual ~BaseCompositeStore ()
 
virtual bool Add (TPtr _object)
 Add given element. If the element has already been added or its name or ID conflict with other existing elements, then no work will be done. More...
 
virtual bool AddStore (TStorePtr _store)
 Add the given store. If the given store already exists, then no work will be done. More...
 
virtual bool Contains (ConstTPtr _object) const
 Determine if store contains the given element. More...
 
virtual bool ContainsId (unsigned int _id) const
 Determine if store contains the element with the given ID. More...
 
virtual bool ContainsName (const std::string &_name) const
 Determine if store contains the element with the given name. More...
 
virtual bool ContainsStore (ConstTStorePtr _store) const
 Determine if given store exists. More...
 
virtual void Destroy (TPtr _object)
 Remove and destroy given element. If the given element does not exists, in this store, then no work will be done. More...
 
virtual void DestroyAll ()
 Remove and destroy all elements in store. More...
 
virtual void DestroyById (unsigned int _id)
 Remove and destroy element with the given ID. If the specified element does not exists in this store, then no work will be done. More...
 
virtual void DestroyByIndex (unsigned int _index)
 Remove and destroy element at the given index. If the specified element does not exists in this store, then no work will be done. More...
 
virtual void DestroyByName (const std::string &_name)
 Remove and destroy element with the given name. If the specified element does not exists in this store, then no work will be done. More...
 
virtual TPtr GetById (unsigned int _id) const
 Get element with the given ID. More...
 
virtual TPtr GetByIndex (unsigned int _index) const
 Get element at the given index. More...
 
virtual TPtr GetByName (const std::string &_name) const
 Get element with the given name. More...
 
virtual TStorePtr GetStore (unsigned int _index) const
 Get store at the given index. If no such store exists NULL will be returned. More...
 
virtual unsigned int GetStoreCount () const
 Get number of Stores. More...
 
virtual TPtr Remove (TPtr _object)
 Remove given element. If the given element does not exists in this store, then no work will be done. More...
 
virtual void RemoveAll ()
 Remove all elements from store. More...
 
virtual TPtr RemoveById (unsigned int _id)
 Remove element with the given ID. If the specified element does not exists in this store, then no work will be done. More...
 
virtual TPtr RemoveByIndex (unsigned int _index)
 Remove element at the given index. If the specified element does not exists in this store, then no work will be done. More...
 
virtual TPtr RemoveByName (const std::string &_name)
 Remove element with the given name. If the specified element does not exists in this store, then no work will be done. More...
 
virtual TStorePtr RemoveStore (TStorePtr _store)
 Remove given store. If no such store exists no work will be done and NULL will be returned. More...
 
virtual TStorePtr RemoveStore (unsigned int _index)
 Remove store at the given index. If no such store exists no work will be done and NULL will be returned. More...
 
virtual TStorePtr RemoveStoreImpl (TStoreIter _iter)
 
virtual unsigned int Size () const
 Get number of elements in this store. More...
 
- Public Member Functions inherited from CompositeStore< T >
virtual ~CompositeStore ()
 Deconstructor. More...
 
- Public Member Functions inherited from Store< T >
virtual ~Store ()
 Deconstructor. More...
 

Protected Attributes

TStoreList stores
 

Constructor & Destructor Documentation

◆ BaseCompositeStore()

◆ ~BaseCompositeStore()

Member Function Documentation

◆ Add()

bool Add ( TPtr  _object)
virtual

Add given element. If the element has already been added or its name or ID conflict with other existing elements, then no work will be done.

Parameters
[in]_objectElement to be added
Returns
True if successful

Implements Store< T >.

◆ AddStore()

bool AddStore ( TStorePtr  _store)
virtual

Add the given store. If the given store already exists, then no work will be done.

Parameters
[in]_storeStore to be added
Returns
True if successful

Implements CompositeStore< T >.

◆ Contains()

bool Contains ( ConstTPtr  _object) const
virtual

Determine if store contains the given element.

Parameters
[in]_objectThe element in question
Returns
True if this store contains the given element

Implements Store< T >.

◆ ContainsId()

bool ContainsId ( unsigned int  _id) const
virtual

Determine if store contains the element with the given ID.

Parameters
[in]_idID of the element in question
Returns
True if this store contains the specified element

Implements Store< T >.

◆ ContainsName()

bool ContainsName ( const std::string _name) const
virtual

Determine if store contains the element with the given name.

Parameters
[in]_nameName of the element in question
Returns
True if this store contains the specified element

Implements Store< T >.

◆ ContainsStore()

bool ContainsStore ( ConstTStorePtr  _store) const
virtual

Determine if given store exists.

Parameters
[in]_storeStore in question
Returns
True if given store exists

Implements CompositeStore< T >.

◆ Destroy()

void Destroy ( TPtr  _object)
virtual

Remove and destroy given element. If the given element does not exists, in this store, then no work will be done.

Parameters
[in]_objectElement to be removed

Implements Store< T >.

◆ DestroyAll()

void DestroyAll ( )
virtual

Remove and destroy all elements in store.

Implements Store< T >.

◆ DestroyById()

void DestroyById ( unsigned int  _id)
virtual

Remove and destroy element with the given ID. If the specified element does not exists in this store, then no work will be done.

Parameters
[in]_idID of the element to be removed

Implements Store< T >.

◆ DestroyByIndex()

void DestroyByIndex ( unsigned int  _index)
virtual

Remove and destroy element at the given index. If the specified element does not exists in this store, then no work will be done.

Parameters
[in]_indexIndex of the element to be removed

Implements Store< T >.

◆ DestroyByName()

void DestroyByName ( const std::string _name)
virtual

Remove and destroy element with the given name. If the specified element does not exists in this store, then no work will be done.

Parameters
[in]_nameName of the element to be removed

Implements Store< T >.

◆ GetById()

BaseCompositeStore< T >::TPtr GetById ( unsigned int  _id) const
virtual

Get element with the given ID.

Parameters
[in]_idID of the desired element
Returns
The specified element

Implements Store< T >.

◆ GetByIndex()

BaseCompositeStore< T >::TPtr GetByIndex ( unsigned int  _index) const
virtual

Get element at the given index.

Parameters
[in]_indexIndex of the desired element
Returns
The specified element

Implements Store< T >.

◆ GetByName()

BaseCompositeStore< T >::TPtr GetByName ( const std::string _name) const
virtual

Get element with the given name.

Parameters
[in]_nameName of the desired element
Returns
The specified element

Implements Store< T >.

◆ GetStore()

BaseCompositeStore< T >::TStorePtr GetStore ( unsigned int  _index) const
virtual

Get store at the given index. If no such store exists NULL will be returned.

Parameters
[in]_indexIndex of the desired store
Returns
The specified store

Implements CompositeStore< T >.

◆ GetStoreCount()

unsigned int GetStoreCount ( ) const
virtual

Get number of Stores.

Returns
The number of Stores

Implements CompositeStore< T >.

◆ Remove()

BaseCompositeStore< T >::TPtr Remove ( TPtr  _object)
virtual

Remove given element. If the given element does not exists in this store, then no work will be done.

Parameters
[in]_objectElement to be removed
Returns
The removed element

Implements Store< T >.

◆ RemoveAll()

void RemoveAll ( )
virtual

Remove all elements from store.

Implements Store< T >.

◆ RemoveById()

BaseCompositeStore< T >::TPtr RemoveById ( unsigned int  _id)
virtual

Remove element with the given ID. If the specified element does not exists in this store, then no work will be done.

Parameters
[in]_idID of the element to be removed
Returns
The removed element

Implements Store< T >.

◆ RemoveByIndex()

BaseCompositeStore< T >::TPtr RemoveByIndex ( unsigned int  _index)
virtual

Remove element at the given index. If the specified element does not exists in this store, then no work will be done.

Parameters
[in]_indexIndex of the element to be removed
Returns
The removed element

Implements Store< T >.

◆ RemoveByName()

BaseCompositeStore< T >::TPtr RemoveByName ( const std::string _name)
virtual

Remove element with the given name. If the specified element does not exists in this store, then no work will be done.

Parameters
[in]_nameName of the element to be removed
Returns
The removed element

Implements Store< T >.

◆ RemoveStore() [1/2]

BaseCompositeStore< T >::TStorePtr RemoveStore ( TStorePtr  _store)
virtual

Remove given store. If no such store exists no work will be done and NULL will be returned.

Parameters
[in]_storeStore to be removed
Returns
The removed store

Implements CompositeStore< T >.

◆ RemoveStore() [2/2]

BaseCompositeStore< T >::TStorePtr RemoveStore ( unsigned int  _index)
virtual

Remove store at the given index. If no such store exists no work will be done and NULL will be returned.

Parameters
[in]_indexIndex of the store to be removed
Returns
The removed store

Implements CompositeStore< T >.

◆ RemoveStoreImpl()

BaseCompositeStore< T >::TStorePtr RemoveStoreImpl ( TStoreIter  _iter)
virtual

◆ Size()

unsigned int Size ( ) const
virtual

Get number of elements in this store.

Returns
The number of elements in this store

Implements Store< T >.

Member Data Documentation

◆ stores

TStoreList stores
protected

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