|
BOSS 8.0.0
BESIII Offline Software System
|
Factory for all Issues. More...
#include <IssueFactory.h>
Public Types | |
| typedef Issue *(* | CreateIssueCallback) () |
| typedef std::map< std::string, CreateIssueCallback > | CallbackMap |
| typedef Issue *(* | CreateIssueCallback) () |
| typedef std::map< std::string, CreateIssueCallback > | CallbackMap |
| typedef Issue *(* | CreateIssueCallback) () |
| typedef std::map< std::string, CreateIssueCallback > | CallbackMap |
Public Member Functions | |
| bool | register_issue (const std::string &name, CreateIssueCallback creator) |
| register an issue factory | |
| Issue * | build (const std::string &name) const |
| build an empty issue out of a name | |
| Issue * | build (const std::string &name, const string_map_type *values) const |
| build a issue out of name and set values | |
| Issue * | build (const Issue *original) |
| build a clone of an issue | |
| void | write_to (std::ostream &stream) const |
| writes description to stream | |
| bool | register_issue (const std::string &name, CreateIssueCallback creator) |
| register an issue factory | |
| Issue * | build (const std::string &name) const |
| build an empty issue out of a name | |
| Issue * | build (const std::string &name, const string_map_type *values) const |
| build a issue out of name and set values | |
| Issue * | build (const Issue *original) |
| build a clone of an issue | |
| void | write_to (std::ostream &stream) const |
| writes description to stream | |
| bool | register_issue (const std::string &name, CreateIssueCallback creator) |
| register an issue factory | |
| Issue * | build (const std::string &name) const |
| build an empty issue out of a name | |
| Issue * | build (const std::string &name, const string_map_type *values) const |
| build a issue out of name and set values | |
| Issue * | build (const Issue *original) |
| build a clone of an issue | |
| void | write_to (std::ostream &stream) const |
| writes description to stream | |
Static Public Member Functions | |
| static IssueFactory * | instance () |
| method to access singleton | |
| static void | print_registered () |
| prints all registered issue types | |
| static IssueFactory * | instance () |
| method to access singleton | |
| static void | print_registered () |
| prints all registered issue types | |
| static IssueFactory * | instance () |
| method to access singleton | |
| static void | print_registered () |
| prints all registered issue types | |
Protected Member Functions | |
| IssueFactory () | |
| IssueFactory () | |
| IssueFactory () | |
Protected Attributes | |
| CallbackMap | m_factory_map |
Static Protected Attributes | |
| static IssueFactory * | s_factory = 0 |
Factory for all Issues.
This class implements the factory pattern for Issues. The main responsability of this class is to keep track of the existing types of Issues Each issue should register one factory method for instances of this class. This is needed for deserializing of Issues.
Definition at line 31 of file Event/ers/include/ers/IssueFactory.h.
| typedef std::map<std::string, CreateIssueCallback> ers::IssueFactory::CallbackMap |
Definition at line 34 of file Event/ers/include/ers/IssueFactory.h.
| typedef std::map<std::string, CreateIssueCallback> ers::IssueFactory::CallbackMap |
Definition at line 34 of file InstallArea/x86_64-el9-gcc13-dbg/include/ers/IssueFactory.h.
| typedef std::map<std::string, CreateIssueCallback> ers::IssueFactory::CallbackMap |
Definition at line 34 of file InstallArea/x86_64-el9-gcc13-opt/include/ers/IssueFactory.h.
| typedef Issue *(* ers::IssueFactory::CreateIssueCallback) () |
Definition at line 33 of file Event/ers/include/ers/IssueFactory.h.
| typedef Issue *(* ers::IssueFactory::CreateIssueCallback) () |
Definition at line 33 of file InstallArea/x86_64-el9-gcc13-dbg/include/ers/IssueFactory.h.
| typedef Issue *(* ers::IssueFactory::CreateIssueCallback) () |
Definition at line 33 of file InstallArea/x86_64-el9-gcc13-opt/include/ers/IssueFactory.h.
|
protected |
Definition at line 21 of file IssueFactory.cxx.
Referenced by instance(), IssueFactory(), and print_registered().
|
protected |
|
protected |
| ers::Issue * ers::IssueFactory::build | ( | const Issue * | original | ) |
build a clone of an issue
Clones an Issue. This method creates (using the other build methods) an new Issue with the same value table
| original | the Issue to be cloned |
Definition at line 88 of file IssueFactory.cxx.
| ers::Issue * ers::IssueFactory::build | ( | const std::string & | name | ) | const |
build an empty issue out of a name
Builds an issue out of the name it was registered with
| name | the name used to indentify the class |
name or DefaultIssue Definition at line 55 of file IssueFactory.cxx.
Referenced by build(), build(), and ers::Issue::clone().
| Issue * ers::IssueFactory::build | ( | const std::string & | name | ) | const |
build an empty issue out of a name
| Issue * ers::IssueFactory::build | ( | const std::string & | name | ) | const |
build an empty issue out of a name
| ers::Issue * ers::IssueFactory::build | ( | const std::string & | name, |
| const string_map_type * | values ) const |
build a issue out of name and set values
Builds an issue out of a name and a value table
| name | the name used to indentify the class |
| values | the value-table containing the state for the Issue |
Definition at line 74 of file IssueFactory.cxx.
| Issue * ers::IssueFactory::build | ( | const std::string & | name, |
| const string_map_type * | values ) const |
build a issue out of name and set values
| Issue * ers::IssueFactory::build | ( | const std::string & | name, |
| const string_map_type * | values ) const |
build a issue out of name and set values
|
static |
method to access singleton
Finds the singleton instance of the factory. If the instance is not allocated yet, it is.
Definition at line 28 of file IssueFactory.cxx.
Referenced by ers::Issue::clone(), and print_registered().
|
static |
method to access singleton
|
static |
method to access singleton
|
static |
prints all registered issue types
Definition at line 33 of file IssueFactory.cxx.
|
static |
prints all registered issue types
|
static |
prints all registered issue types
| bool ers::IssueFactory::register_issue | ( | const std::string & | name, |
| CreateIssueCallback | creator ) |
register an issue factory
Register an issue type with the factory
| name | the name that will be used to lookup new instances |
| creator | a pointer to the function used to create new instance for that particular type of function |
true if the name was already present in the table Definition at line 44 of file IssueFactory.cxx.
| bool ers::IssueFactory::register_issue | ( | const std::string & | name, |
| CreateIssueCallback | creator ) |
register an issue factory
| bool ers::IssueFactory::register_issue | ( | const std::string & | name, |
| CreateIssueCallback | creator ) |
register an issue factory
| void ers::IssueFactory::write_to | ( | std::ostream & | stream | ) | const |
writes description to stream
Definition at line 97 of file IssueFactory.cxx.
| void ers::IssueFactory::write_to | ( | std::ostream & | stream | ) | const |
writes description to stream
| void ers::IssueFactory::write_to | ( | std::ostream & | stream | ) | const |
writes description to stream
|
protected |
Definition at line 38 of file Event/ers/include/ers/IssueFactory.h.
Referenced by build(), IssueFactory(), register_issue(), and write_to().
|
staticprotected |
Definition at line 39 of file Event/ers/include/ers/IssueFactory.h.
Referenced by instance(), and IssueFactory().