Mirror reflection library 0.5.13

mirror/utils/script_factory.hpp

Go to the documentation of this file.
00001 
00010 #ifndef MIRROR_UTILS_SCRIPT_FACTORY_1011291729_HPP
00011 #define MIRROR_UTILS_SCRIPT_FACTORY_1011291729_HPP
00012 
00013 #include <mirror/config.hpp>
00014 #include <mirror/factory.hpp>
00015 
00016 #include <mirror/using_directive.hpp>
00017 // script factory-related
00018 #include <mirror/utils/native_types.hpp>
00019 #include <mirror/utils/script_factory/fwd_decl.hpp>
00020 #include <mirror/utils/script_factory/default_traits.hpp>
00021 #include <mirror/utils/script_factory/parsers.hpp>
00022 #include <mirror/utils/script_factory/suppliers.hpp>
00023 #include <mirror/utils/script_factory/default_source.hpp>
00024 #include <mirror/utils/script_factory/native_source.hpp>
00025 #include <mirror/utils/script_factory/initlist_source.hpp>
00026 #include <mirror/utils/script_factory/enumerator.hpp>
00027 #include <mirror/utils/script_factory/manager.hpp>
00028 #include <mirror/utils/script_factory/data.hpp>
00029 
00030 #include <initializer_list>
00031 
00032 MIRROR_NAMESPACE_BEGIN
00033 
00034 template <class Product, class Traits>
00035 class script_fact_manuf
00036  : public aux::script_fact_source<
00037     Product,
00038     Traits,
00039     typename is_util_native_type<Product>::type
00040 >
00041 {
00042 private:
00043     typedef aux::script_fact_source<
00044         Product,
00045         Traits,
00046         typename is_util_native_type<Product>::type
00047     > base_class;
00048     typedef aux::script_fact_param<Traits> param_type;
00049 public:
00050     //TODO: this can be replaced with inherited constructors
00051     template <class ConstructionInfo>
00052     inline script_fact_manuf(
00053         const param_type& parent_data,
00054         ConstructionInfo construction_info
00055     ): base_class(parent_data, construction_info)
00056     { }
00057 };
00058 
00059 template <class Element, class Traits>
00060 class script_fact_manuf<
00061     std::initializer_list<Element>,
00062     Traits
00063 > : public aux::script_fact_seq_source<Element, Traits>
00064 {
00065 private:
00066     typedef aux::script_fact_seq_source<
00067         Element,
00068         Traits
00069     > base_class;
00070     typedef aux::script_fact_param<Traits> param_type;
00071 public:
00072     //TODO: this can be replaced with inherited constructors
00073     template <class ConstructionInfo>
00074     inline script_fact_manuf(
00075         const param_type& parent_data,
00076         ConstructionInfo construction_info
00077     ): base_class(parent_data, construction_info)
00078     { }
00079 };
00080 
00081 typedef factory_maker<
00082     script_fact_manuf,
00083     script_fact_suppl,
00084     script_fact_enum,
00085     script_fact_def_traits<std::string::const_iterator>
00086 > script_factory_maker;
00087 
00088 typedef factory_maker<
00089     script_fact_manuf,
00090     script_fact_suppl,
00091     script_fact_enum,
00092     script_fact_def_traits<const char*>
00093 > c_str_script_factory_maker;
00094 
00095 MIRROR_NAMESPACE_END
00096 
00097 #endif //include guard
00098 

Copyright © 2006-2011 Matus Chochlik, University of Zilina, Zilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Fri Dec 16 2011 by Doxygen (version 1.7.3).
Important note: Although the 'boostified' version of Mirror uses the Boost C++ libraries Coding Guidelines and is implemented inside of the boost namespace, it IS NOT an officially reviewed and accepted Boost library. Mirror is being developed with the intention to be submitted for review for inclusion to the Boost C++ libraries.