Program Listing for File blueprints.hpp
↰ Return to documentation for file (/tmp/ws/src/ecl_core/ecl_utilities/include/ecl/utilities/blueprints.hpp
)
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_
#define ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_
/*****************************************************************************
** Includes
*****************************************************************************/
#include <ecl/concepts/blueprints.hpp>
/*****************************************************************************
** Namespaces
*****************************************************************************/
namespace ecl {
template <typename Derived>
class BluePrint {
public:
BluePrint() {
ecl_compile_time_concept_check(BluePrintConcept<Derived>);
}
template <typename BaseType>
BaseType implementInstantiate() {
return static_cast<Derived*>(this)->instantiate();
}
template <typename BaseType>
void implementApply(BaseType& object) const {
static_cast<const Derived*>(this)->apply(object);
}
virtual ~BluePrint() {}
};
template <typename Base>
class BluePrintFactory {
private:
BluePrintFactory() {};
virtual ~BluePrintFactory() {};
};
} // namespace ecl
#endif /* ECL_UTILITIES_BLUEPRINT_FACTORY_HPP_ */