AmpGen 2.1
Loading...
Searching...
No Matches
Factory.h File Reference
#include <cxxabi.h>
#include <map>
#include "AmpGen/MsgService.h"
#include "AmpGen/Utilities.h"

Go to the source code of this file.

Classes

class  AmpGen::Factory< TYPE, KEY_TYPE >
 Static factory to construct classes from a hierarchy based on a key (normally std::string) More...
 

Namespaces

namespace  AmpGen
 

Macros

#define REGISTER(BASE_CLASS, DERIVED_CLASS)
 
#define REGISTER_WITH_KEY(BASE_CLASS, DERIVED_CLASS, KEY, KEY_TYPE)
 

Variables

template<class TYPE, class KEY_TYPE>
Factory< TYPE, KEY_TYPE > * AmpGen::Factory< TYPE, KEY_TYPE >::gImpl = nullptr
 

Macro Definition Documentation

◆ REGISTER

#define REGISTER ( BASE_CLASS,
DERIVED_CLASS )
Value:
std::string DERIVED_CLASS::_id = AmpGen::Factory<BASE_CLASS>::Register( #DERIVED_CLASS, new DERIVED_CLASS() )
static KEY_TYPE Register(const KEY_TYPE &key, TYPE *object)
Definition Factory.h:43

Definition at line 10 of file Factory.h.

◆ REGISTER_WITH_KEY

#define REGISTER_WITH_KEY ( BASE_CLASS,
DERIVED_CLASS,
KEY,
KEY_TYPE )
Value:
KEY_TYPE DERIVED_CLASS::_id = AmpGen::Factory<BASE_CLASS, KEY_TYPE>::Register( KEY, new DERIVED_CLASS() )

Definition at line 12 of file Factory.h.