|
Fx2D
A C++20 2D rigid-body physics engine
|
#include <Registry.h>
Public Member Functions | |
| FxNamedRegistry ()=default | |
| FxNamedRegistry (size_t max_size) | |
| void | reserve (size_t n) |
| size_t | size () const noexcept |
| bool | empty () const noexcept |
| void | set_max_size (size_t n) |
| virtual bool | add (const std::shared_ptr< T > &item) |
| virtual bool | remove (const std::string &name) |
| std::shared_ptr< T > | get (const std::string &name) const |
| T * | get_rawptr (const std::string &name) const noexcept |
| std::string | make_unique_name (const std::string &base) const |
| const std::vector< std::shared_ptr< T > > & | items () const noexcept |
| std::vector< std::shared_ptr< T > > & | items () noexcept |
| void | clear () |
| void | shrink_to_fit () |
| template<typename ExecPolicy , typename Func > | |
| void | for_each (ExecPolicy &&policy, Func &&func) |
| template<typename ExecPolicy , typename Func > | |
| void | transform (ExecPolicy &&policy, Func &&func, std::vector< std::invoke_result_t< Func, std::shared_ptr< T > > > &results) |
Protected Member Functions | |
| bool | _add (const std::shared_ptr< T > &item) |
| bool | _remove (const std::string &name) |
Protected Attributes | |
| std::vector< std::shared_ptr< T > > | m_items_vec |
| std::unordered_map< std::string, size_t > | m_name_map |
| size_t | m_size_limit = std::numeric_limits<size_t>::max() |
| size_t | m_max_size = std::numeric_limits<size_t>::max() |
Definition at line 18 of file Registry.h.
|
default |
|
inlineexplicit |
Definition at line 73 of file Registry.h.
|
inlineprotected |
Definition at line 26 of file Registry.h.
|
inlineprotected |
Definition at line 49 of file Registry.h.
|
inlinevirtual |
Reimplemented in FxEntityRegistry.
Definition at line 94 of file Registry.h.
|
inline |
Definition at line 125 of file Registry.h.
|
inlinenoexcept |
Definition at line 84 of file Registry.h.
|
inline |
Definition at line 183 of file Registry.h.
|
inline |
Definition at line 97 of file Registry.h.
|
inlinenoexcept |
Definition at line 107 of file Registry.h.
|
inlinenoexcept |
Definition at line 122 of file Registry.h.
|
inlinenoexcept |
Definition at line 123 of file Registry.h.
|
inline |
Definition at line 114 of file Registry.h.
|
inlinevirtual |
Reimplemented in FxEntityRegistry.
Definition at line 95 of file Registry.h.
|
inline |
Definition at line 75 of file Registry.h.
|
inline |
Definition at line 85 of file Registry.h.
|
inline |
Definition at line 131 of file Registry.h.
|
inlinenoexcept |
Definition at line 83 of file Registry.h.
|
inline |
Definition at line 199 of file Registry.h.
|
protected |
Definition at line 20 of file Registry.h.
|
protected |
Definition at line 24 of file Registry.h.
|
protected |
Definition at line 21 of file Registry.h.
|
protected |
Definition at line 22 of file Registry.h.