Gazebo Rendering

API Reference

9.0.0
StoreWrapper< T, U > Class Template Reference

Simple wrapper class that allows a Store of type Derived to be treated as a Store of type Base, where Derived is some class derived from Base. This is useful in storing Stores of different derived types in a single CompositeStore instance. More...

#include <gz/rendering/StoreWrapper.hh>

Public Member Functions

virtual ~StoreWrapper ()=default
 
- Public Member Functions inherited from Store< T >
virtual ~Store ()=default
 Destructor.
 
virtual bool Add (TPtr _object)=0
 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.
 
virtual bool Contains (ConstTPtr _object) const =0
 Determine if store contains the given element.
 
virtual bool ContainsId (unsigned int _id) const =0
 Determine if store contains the element with the given ID.
 
virtual bool ContainsName (const std::string &_name) const =0
 Determine if store contains the element with the given name.
 
virtual void Destroy (TPtr _object)=0
 Remove and destroy given element. If the given element does not exists, in this store, then no work will be done.
 
virtual void DestroyAll ()=0
 Remove and destroy all elements in store.
 
virtual void DestroyById (unsigned int _id)=0
 Remove and destroy element with the given ID. If the specified element does not exists in this store, then no work will be done.
 
virtual void DestroyByIndex (unsigned int _index)=0
 Remove and destroy element at the given index. If the specified element does not exists in this store, then no work will be done.
 
virtual void DestroyByName (const std::string &_name)=0
 Remove and destroy element with the given name. If the specified element does not exists in this store, then no work will be done.
 
virtual TPtr GetById (unsigned int _id) const =0
 Get element with the given ID.
 
virtual TPtr GetByIndex (unsigned int _index) const =0
 Get element at the given index.
 
virtual TPtr GetByName (const std::string &_name) const =0
 Get element with the given name.
 
virtual TPtr Remove (TPtr _object)=0
 Remove given element. If the given element does not exists in this store, then no work will be done.
 
virtual void RemoveAll ()=0
 Remove all elements from store.
 
virtual TPtr RemoveById (unsigned int _id)=0
 Remove element with the given ID. If the specified element does not exists in this store, then no work will be done.
 
virtual TPtr RemoveByIndex (unsigned int _index)=0
 Remove element at the given index. If the specified element does not exists in this store, then no work will be done.
 
virtual TPtr RemoveByName (const std::string &_name)=0
 Remove element with the given name. If the specified element does not exists in this store, then no work will be done.
 
virtual unsigned int Size () const =0
 Get number of elements in this store.
 

Detailed Description

template<class T, class U>
class gz::rendering::StoreWrapper< T, U >

Simple wrapper class that allows a Store of type Derived to be treated as a Store of type Base, where Derived is some class derived from Base. This is useful in storing Stores of different derived types in a single CompositeStore instance.

Template Parameters
TNew storage type
USome derived class of T

Constructor & Destructor Documentation

◆ ~StoreWrapper()

template<class T , class U >
virtual ~StoreWrapper ( )
virtualdefault

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