blueprints.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_
13 #define ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_
14 
15 /*****************************************************************************
16 ** Includes
17 *****************************************************************************/
18 
20 
21 /*****************************************************************************
22 ** Namespaces
23 *****************************************************************************/
24 
25 namespace ecl {
26 
46 template <typename Derived>
47 class BluePrint {
48 public:
56  }
71  template <typename BaseType>
72  BaseType implementInstantiate() {
73  return static_cast<Derived*>(this)->instantiate();
74  }
90  template <typename BaseType>
91  void implementApply(BaseType& object) const {
92  static_cast<const Derived*>(this)->apply(object);
93  }
94 
95  virtual ~BluePrint() {}
96 };
104 template <typename Base>
106  private:
111  virtual ~BluePrintFactory() {};
112 };
113 
114 }; // namespace ecl
115 
116 
117 #endif /* ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_ */
Embedded control libraries.
void implementApply(BaseType &object) const
Apply the blueprint rules to an existing object.
Definition: blueprints.hpp:91
virtual ~BluePrint()
Definition: blueprints.hpp:95
virtual ~BluePrintFactory()
Definition: blueprints.hpp:111
BaseType implementInstantiate()
Use the blueprint to instantiate a new object.
Definition: blueprints.hpp:72
BluePrint()
Blueprint concept checking.
Definition: blueprints.hpp:54
Primary template for blueprint factories.
Definition: blueprints.hpp:105
BluePrintFactory()
Default constructor that locks this class from being used directly.
Definition: blueprints.hpp:110
#define ecl_compile_time_concept_check(Model)
This is a parent template for blueprints using crtp.
Definition: blueprints.hpp:47


ecl_utilities
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:28