|
cgv
|
An object registry allows registering and querying objects identified by a unique name. More...
#include <object_registry.h>
Public Types | |
| using | entry_type = std::pair< std::string, T > |
| using | const_iterator = typename std::vector< entry_type >::const_iterator |
| using | const_reverse_iterator = typename std::vector< entry_type >::const_reverse_iterator |
Public Member Functions | |
| size_t | size () const |
| bool | empty () const |
| const T & | get (size_t index) const |
| std::string | get_name (size_t index) const |
| std::vector< std::string > | get_names () const |
| bool | add (const std::string &name, const T &object) |
| void | clear () |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| const_reverse_iterator | rbegin () const noexcept |
| const_reverse_iterator | rend () const noexcept |
| const_iterator | cbegin () const noexcept |
| const_iterator | cend () const noexcept |
| const_reverse_iterator | crbegin () const noexcept |
| const_reverse_iterator | crend () const noexcept |
| const_iterator | find (const std::string &name) const |
| template<typename UnaryPredicate > | |
| const_iterator | find_first (UnaryPredicate predicate) const |
| template<typename UnaryPredicate > | |
| std::vector< const_iterator > | find_all (UnaryPredicate predicate) const |
An object registry allows registering and querying objects identified by a unique name.
Objects can be retrieved using their name or index. The order of registration defines the order of the objects in the registry.
| T | the object type. |
Definition at line 17 of file object_registry.h.
| using cgv::data::object_registry< T >::const_iterator = typename std::vector<entry_type>::const_iterator |
Definition at line 20 of file object_registry.h.
| using cgv::data::object_registry< T >::const_reverse_iterator = typename std::vector<entry_type>::const_reverse_iterator |
Definition at line 21 of file object_registry.h.
| using cgv::data::object_registry< T >::entry_type = std::pair<std::string, T> |
Definition at line 19 of file object_registry.h.
|
inline |
Definition at line 46 of file object_registry.h.
|
inlinenoexcept |
Definition at line 60 of file object_registry.h.
|
inlinenoexcept |
Definition at line 76 of file object_registry.h.
|
inlinenoexcept |
Definition at line 80 of file object_registry.h.
|
inline |
Definition at line 55 of file object_registry.h.
|
inlinenoexcept |
Definition at line 84 of file object_registry.h.
|
inlinenoexcept |
Definition at line 88 of file object_registry.h.
|
inline |
Definition at line 27 of file object_registry.h.
|
inlinenoexcept |
Definition at line 64 of file object_registry.h.
|
inline |
Definition at line 92 of file object_registry.h.
|
inline |
Definition at line 109 of file object_registry.h.
|
inline |
Definition at line 100 of file object_registry.h.
|
inline |
Definition at line 31 of file object_registry.h.
|
inline |
Definition at line 35 of file object_registry.h.
|
inline |
Definition at line 39 of file object_registry.h.
|
inlinenoexcept |
Definition at line 68 of file object_registry.h.
|
inlinenoexcept |
Definition at line 72 of file object_registry.h.
|
inline |
Definition at line 23 of file object_registry.h.