blueprints.hpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Ifdefs
00010 *****************************************************************************/
00011 
00012 #ifndef ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_
00013 #define ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_
00014 
00015 /*****************************************************************************
00016 ** Includes
00017 *****************************************************************************/
00018 
00019 #include <ecl/concepts/blueprints.hpp>
00020 
00021 /*****************************************************************************
00022 ** Namespaces
00023 *****************************************************************************/
00024 
00025 namespace ecl {
00026 
00046 template <typename Derived>
00047 class BluePrint {
00048 public:
00054         BluePrint() {
00055         ecl_compile_time_concept_check(BluePrintConcept<Derived>);
00056         }
00071         template <typename BaseType>
00072         BaseType implementInstantiate() {
00073                 return static_cast<Derived*>(this)->instantiate();
00074         }
00090         template <typename BaseType>
00091         void implementApply(BaseType& object) const {
00092                 static_cast<const Derived*>(this)->apply(object);
00093         }
00094 
00095         virtual ~BluePrint() {}
00096 };
00104 template <typename Base>
00105 class BluePrintFactory {
00106     private:
00110         BluePrintFactory() {};
00111         virtual ~BluePrintFactory() {};
00112 };
00113 
00114 }; // namespace ecl
00115 
00116 
00117 #endif /* ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_ */


ecl_utilities
Author(s): Daniel Stonier
autogenerated on Mon Jul 3 2017 02:21:39