Lagrangian Particle Code for The Simulation of 2D/3D Fluid Dynamics
 All Classes Files Functions Variables Typedefs Friends Pages
Public Member Functions | Static Public Member Functions | List of all members
GeometryRegistrar< Derived > Class Template Reference

A template class for the registration of classes in the Geometry family. More...

#include <registrar.h>

Public Member Functions

 GeometryRegistrar (std::string name)
 constructor More...
 

Static Public Member Functions

static GeometrycreateFunc ()
 This function creates an object of the Derived class and returns a pointer to the Geometry class. More...
 

Detailed Description

template<typename Derived>
class GeometryRegistrar< Derived >

A template class for the registration of classes in the Geometry family.

The purpose of this class is to have a unified place to register objects in the Geometry family. Registration means linking a geometry name (given in the argument list of the constructor) and a class in the Geometry family. It is implemented as a template class to accomondate various child classes in the Geometry family.

Author
Chen, Hsin-Chiang (morri.nosp@m.sche.nosp@m.n2008.nosp@m.@gma.nosp@m.il.co.nosp@m.m)
Version
1.0
Date
2014/08/08

Created on: 2014/06/07

Constructor & Destructor Documentation

template<typename Derived >
GeometryRegistrar< Derived >::GeometryRegistrar ( std::string  name)

constructor

Registers the name given in the argument list. Registration means linking name to a class in the Geometry family

Parameters
namea geometry name

Example usage: Registers a_name with class SomeGeometry

Member Function Documentation

template<typename Derived >
Geometry * GeometryRegistrar< Derived >::createFunc ( )
static

This function creates an object of the Derived class and returns a pointer to the Geometry class.

Parameters
None
Returns
A Geoemtry * pointer that points to an object of Derived class

The documentation for this class was generated from the following file: