dune-geometry  2.2.0
Classes | Public Types | Static Public Member Functions | Static Public Attributes
Dune::TopologyFactory< Traits > Struct Template Reference

Provide a factory over the generic topologies. More...

#include <dune/geometry/topologyfactory.hh>

List of all members.

Classes

struct  Maker

Public Types

typedef Traits::Key Key
typedef Traits::Object Object
typedef Traits::Factory Factory

Static Public Member Functions

static Objectcreate (unsigned int topologyId, const Key &key)
 dynamically create objects
static Objectcreate (const Dune::GeometryType &gt, const Key &key)
 dynamically create objects
template<class Topology >
static Objectcreate (const Key &key)
 statically create objects
static void release (Object *object)
 release the object returned by the create methods

Static Public Attributes

static const unsigned int dimension = Traits::dimension

Detailed Description

template<class Traits>
struct Dune::TopologyFactory< Traits >

Provide a factory over the generic topologies.

This class can be used to dynamically create objects statically bound by their generic topologies. The method create() returns a pointer to an object depending on the topology id and a key; the dimension corresponding to the topology id is static and is provided by the Traits class. A static method (taking the Topology as template argument) is also provided. The Traits class must provide the space dimension, the types for the key (Key), the objects returned (Object), and the underlying factory (Factory). This class must have a template method createObject taking a key and returning a pointer to the newly create Object - for destruction call the release method.


Member Typedef Documentation

template<class Traits >
typedef Traits::Factory Dune::TopologyFactory< Traits >::Factory
template<class Traits >
typedef Traits::Key Dune::TopologyFactory< Traits >::Key
template<class Traits >
typedef Traits::Object Dune::TopologyFactory< Traits >::Object

Member Function Documentation

template<class Traits >
static Object* Dune::TopologyFactory< Traits >::create ( unsigned int  topologyId,
const Key key 
) [inline, static]

dynamically create objects

Deprecated:
Use create(Dune::GeometryType, Key) instead
Deprecated:
"use create(Dune::GeometryType, Key) instead"

References Dune::GenericGeometry::topologyId().

template<class Traits >
static Object* Dune::TopologyFactory< Traits >::create ( const Dune::GeometryType gt,
const Key key 
) [inline, static]

dynamically create objects

References Dune::GeometryType::id().

template<class Traits >
template<class Topology >
static Object* Dune::TopologyFactory< Traits >::create ( const Key key) [inline, static]

statically create objects

template<class Traits >
static void Dune::TopologyFactory< Traits >::release ( Object object) [inline, static]

release the object returned by the create methods


Member Data Documentation

template<class Traits >
const unsigned int Dune::TopologyFactory< Traits >::dimension = Traits::dimension [static]

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