OpenMD 3.1
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
GenericFactory.hpp File Reference
#include <cassert>
#include <map>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  OpenMD::GenericFactory< Object, IdentType, Creator >
 GenericFactory is a template based Object Factory Factory pattern is used to define an interface for creating an object. More...
 

Namespaces

namespace  OpenMD
 This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
 

Macros

#define DECLARE_CREATOR(abstractObject, concreteObject)    inline abstractObject* create##concreteObject() { return new concreteObject; }
 
#define REGISTER_CREATOR(factory, ident, concreteObject)
 

Functions

template<typename O , typename I , typename C >
std::ostream & OpenMD::operator<< (std::ostream &o, GenericFactory< O, I, C > &factory)
 write out all of the type identifiers to an output stream
 

Detailed Description

Author
Teng Lin
Date
10/24/2004
Version
1.0

Definition in file GenericFactory.hpp.

Macro Definition Documentation

◆ DECLARE_CREATOR

#define DECLARE_CREATOR ( abstractObject,
concreteObject )    inline abstractObject* create##concreteObject() { return new concreteObject; }

Definition at line 251 of file GenericFactory.hpp.

◆ REGISTER_CREATOR

#define REGISTER_CREATOR ( factory,
ident,
concreteObject )
Value:
const bool registered##concreteObject = \
factory::getInstance()->registerCreator(ident, create##concreteObject);

Definition at line 254 of file GenericFactory.hpp.