49#ifndef CONTROL_COMMAND_REGISTRY_H
50#define CONTROL_COMMAND_REGISTRY_H
64#include <boost/functional/hash.hpp>
65#include <unordered_map>
76 using std::shared_ptr;
77 using std::unordered_map;
Access point to singletons and other kinds of dependencies designated by type.
Token or Atom with distinct identity.
scoped guard to control the actual locking.
Facility for monitor object based locking.
Foundation for a custom allocation manager, tracking the created objects by smart-ptrs.
shared_ptr< XX > create(ARGS &&...args)
Steam-Layer Command implementation.
Registry managing command implementation objects (Singleton).
void track(Symbol cmdID, Command const &commandHandle)
register a command (Frontend) under the given ID.
size_t index_size() const
unordered_map< Symbol, Command, hash< Symbol > > CmdIndex
map< const Command *, Symbol, order_by_impl > ReverseIndex
Symbol findDefinition(Command const &cmdInstance) const
search the command index for a definition
shared_ptr< CommandImpl > newCommandImpl(function< SIG_OPER > &operFunctor, function< SIG_CAPT > &captFunctor, function< SIG_UNDO > &undoFunctor)
set up a new command implementation frame
static lib::Depend< CommandRegistry > instance
storage for the singleton factory used to access CommandRegistry
Command queryIndex(Symbol cmdID)
query the command index by ID
shared_ptr< CommandImpl > createCloneImpl(CommandImpl const &refObject)
create an allocation for holding a clone of the given CommandImpl data.
TypedAllocationManager allocator_
size_t instance_count() const
bool remove(Symbol cmdID)
remove the given command registration.
Handle object representing a single Command instance to be used by client code.
Case< Ret, Args >::Memento Memento
Any copy and copy construction prohibited.
Metaprogramming helpers for deriving the precise function signatures necessary to implement a given c...
A passive container record holding the actual command arguments & UNDO state.
Steam-Layer command frontend.
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
This header is for including and configuring NoBug.
Steam-Layer implementation namespace root.
MAP::mapped_type getValue_or_default(MAP &map, typename MAP::key_type const &key, typename MAP::mapped_type defaultVal)
fetch value from a Map, or return a default if not found
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Helper for building a std::map with Command* as keys.
bool operator()(const Command *pC1, const Command *pC2) const
Object Monitor based synchronisation.
Abstract foundation for building custom allocation managers.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...