|
Anklang-0.3.0.dev835+g24d8ae08 anklang-0.3.0.dev835+g24d8ae08
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
Maps C++ shared_ptr instances to JSON-wrapped objects with unique IDs, supporting polymorphic upcasting. More...
#include "jsonipc.hh"
Classes | |
| class | InstanceWrapper |
| class | Wrapper |
Public Types | |
| using | CreateWrapper = Wrapper *(*)(const std::shared_ptr< SharedBase > &sptr, size_t &basedepth) |
| using | WrapperMap = std::unordered_map< size_t, Wrapper * > |
| using | TypeidMap = std::map< TypeidKey, size_t > |
| using | IdSet = std::set< size_t > |
Public Member Functions | |
| bool | delete_id (size_t thisid) |
| bool | mark_unused () |
| size_t | purge_unused (const std::vector< size_t > &unused) |
| bool | empty () const |
| size_t | size () const |
| void | clear (const bool printdebug=false) |
| virtual JsonValue | wrapper_to_json (Wrapper *wrapper, const size_t thisid, JsonAllocator &allocator) |
| virtual Wrapper * | wrapper_from_json (const JsonValue &value) |
Static Public Member Functions | |
| static std::vector< CreateWrapper > & | wrapper_creators () |
| static void | register_wrapper (CreateWrapper createwrapper) |
| static size_t | next_counter () |
| template<typename T > | |
| static JsonValue | scope_wrap_object (const std::shared_ptr< T > &sptr, JsonAllocator &allocator) |
| static Wrapper * | scope_lookup_wrapper (const JsonValue &value) |
| static bool | scope_forget_id (size_t thisid) |
Public Attributes | |
| WrapperMap | wmap_ |
| TypeidMap | typeid_map_ |
| IdSet * | idset_ |
Friends | |
| class | Scope |
Maps C++ shared_ptr instances to JSON-wrapped objects with unique IDs, supporting polymorphic upcasting.
Definition at line 539 of file jsonipc.hh.
| using Jsonipc::InstanceMap::CreateWrapper = Wrapper* (*) (const std::shared_ptr<SharedBase> &sptr, size_t &basedepth) |
Definition at line 560 of file jsonipc.hh.
| using Jsonipc::InstanceMap::IdSet = std::set<size_t> |
Definition at line 594 of file jsonipc.hh.
| using Jsonipc::InstanceMap::TypeidMap = std::map<TypeidKey, size_t> |
Definition at line 593 of file jsonipc.hh.
Definition at line 592 of file jsonipc.hh.
|
virtual |
Definition at line 677 of file jsonipc.hh.
| void Jsonipc::InstanceMap::clear | ( | const bool | printdebug = false | ) |
Definition at line 658 of file jsonipc.hh.
Definition at line 600 of file jsonipc.hh.
| bool Jsonipc::InstanceMap::empty | ( | ) | const |
Definition at line 648 of file jsonipc.hh.
| bool Jsonipc::InstanceMap::mark_unused | ( | ) |
Definition at line 619 of file jsonipc.hh.
|
static |
Definition at line 598 of file jsonipc.hh.
| size_t Jsonipc::InstanceMap::purge_unused | ( | const std::vector< size_t > & | unused | ) |
Definition at line 627 of file jsonipc.hh.
|
static |
Definition at line 563 of file jsonipc.hh.
Definition at line 765 of file jsonipc.hh.
|
static |
Definition at line 759 of file jsonipc.hh.
|
static |
Definition at line 694 of file jsonipc.hh.
| size_t Jsonipc::InstanceMap::size | ( | ) | const |
Definition at line 653 of file jsonipc.hh.
|
static |
Definition at line 561 of file jsonipc.hh.
|
virtual |
Definition at line 740 of file jsonipc.hh.
|
virtual |
Definition at line 684 of file jsonipc.hh.
|
friend |
Definition at line 540 of file jsonipc.hh.
| IdSet* Jsonipc::InstanceMap::idset_ |
Definition at line 597 of file jsonipc.hh.
| TypeidMap Jsonipc::InstanceMap::typeid_map_ |
Definition at line 596 of file jsonipc.hh.
| WrapperMap Jsonipc::InstanceMap::wmap_ |
Definition at line 595 of file jsonipc.hh.