utilities/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 
19 #include <ecl/concepts/blueprints.hpp>
20 
21 /*****************************************************************************
22 ** Namespaces
23 *****************************************************************************/
24 
25 namespace ecl {
26 
46 template <typename Derived>
47 class BluePrint {
48 public:
54  BluePrint() {
55  ecl_compile_time_concept_check(BluePrintConcept<Derived>);
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>
105 class BluePrintFactory {
106  private:
110  BluePrintFactory() {};
111  virtual ~BluePrintFactory() {};
112 };
113 
114 }; // namespace ecl
115 
116 
117 #endif /* ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_ */
void implementApply(BaseType &object) const
virtual ~BluePrint()
BaseType implementInstantiate()
#define ecl_compile_time_concept_check(Model)
Compile time concept checking assertion.


xbot_driver
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:27:37