GEAR  1.9.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
GearMaterialProperties.h
1 // -*- C++ -*-
2 #ifndef GEAR_GearMaterialProperties_H
3 #define GEAR_GearMaterialProperties_H 1
4 
5 #include <map>
6 #include <string>
7 
8 namespace gear {
9 
10  class GearPointProperties ;
11  class GearDistanceProperties ;
12 
13  typedef std::map< std::string, std::string > ConfigMap ;
14 
23 
24  public:
25 
26  virtual ~GearMaterialProperties() {}
27 
32  ConfigMap& config() { return _cfg ; }
33 
36  virtual void initialize() = 0 ;
37 
40  virtual GearPointProperties* getGearPointProperties() const = 0;
41 
45 
46 
47  protected:
48  ConfigMap _cfg{} ;
49 
50 
51  }; // class
52 
53 
57 
58  public:
59 
60  virtual ~GearMaterialPropertiesFactory() {}
61 
62 
65  virtual GearMaterialProperties* create() const = 0 ;
66 
67 
71  return me() ;
72  }
73 
74  protected:
75  //static void register( GearMaterialPropertiesFactory* impl) { _me = impl ; }
76 
77  static GearMaterialPropertiesFactory*& me() {
78  static GearMaterialPropertiesFactory* _me ;
79  return _me ;
80  }
81 
82  } ;
83 } // namespace gear
84 #endif /* ifndef GEAR_GearMaterialProperties_H */
Abstract interface for a class that returns the (material) properties along a given distance between ...
static const GearMaterialPropertiesFactory * instance()
The instance.
virtual GearDistanceProperties * getGearDistanceProperties() const =0
Get an instance of the GearDistanceProperties - 0 if not initialized.
virtual GearMaterialProperties * create() const =0
Create a new object of the GearMaterialProperties.
virtual GearPointProperties * getGearPointProperties() const =0
Get an instance of the GearPointProperties - 0 if not initialized.
Factory singleton class - plugin libraries will have to implement a concrete factory and register it ...
Abstract base class for implemenations of the GearPointPtoperties and GearDistanceProperties.
virtual void initialize()=0
Initialize a concrete implemetaiton of the detailed material properties - after the configuration...
Abstract interface for a class that returns the (material) properties of a given point in in world co...
ConfigMap & config()
Use to configure an instance of the material properties, e.g.