![]() |
anatomist 6.0.4
3D neuroimaging data viewer
|
Registry links all Command concrete subclasses with a function that will read the guts of the command and create an instance of the subclass. More...
#include <anatomist/processor/Registry.h>
Public Member Functions | |
| ~Registry () | |
| const carto::SyntaxSet & | syntax () const |
| bool | add (const std::string &command, Command::Reader function, const carto::SyntaxSet &syntax) |
| Register a \Ref{Command} subclass and link with a function will read the guts from a stream and create an instance of it. | |
| Command * | create (const Tree &command, CommandContext *context) const |
| Creates a command with given characteristics provided as a Tree. | |
Static Public Member Functions | |
| static Registry * | instance () |
| Access the unique instance of Registry. | |
Protected Member Functions | |
| Registry () | |
| Singleton constructor cannot be accessed by the programmer. | |
Registry links all Command concrete subclasses with a function that will read the guts of the command and create an instance of the subclass.
Because there has to be only one registry, Registry implements the Singleton pattern:
Definition at line 67 of file Registry.h.
| anatomist::Registry::~Registry | ( | ) |
|
protected |
Singleton constructor cannot be accessed by the programmer.
References Registry().
Referenced by instance(), and Registry().
| bool anatomist::Registry::add | ( | const std::string & | command, |
| Command::Reader | function, | ||
| const carto::SyntaxSet & | syntax ) |
| Command * anatomist::Registry::create | ( | const Tree & | command, |
| CommandContext * | context ) const |
Creates a command with given characteristics provided as a Tree.
|
static |
Access the unique instance of Registry.
References Registry().
|
inline |
Definition at line 78 of file Registry.h.
Referenced by add().