14 #ifndef __INCLUDED_SCOPIRA_TOOL_OBJFLOWLOADER_H__ 15 #define __INCLUDED_SCOPIRA_TOOL_OBJFLOWLOADER_H__ 20 #include <scopira/tool/object.h> 21 #include <scopira/tool/iterator.h> 22 #include <scopira/tool/export.h> 35 template <
class T>
object* objloadfunc_g(
void) {
return new T(); }
67 typedef object* (*loadfunc_t)(void);
98 SCOPIRA_EXPORT
void add_type(
const std::type_info&
id,
const std::string& name,
loadfunc_t loader);
101 SCOPIRA_EXPORT
void add_type(
const std::type_info&
id,
const char * name,
loadfunc_t loader);
104 SCOPIRA_EXPORT
const std::string&
get_name(
const std::type_info &
id)
const;
107 SCOPIRA_EXPORT
bool has_typeinfo(
const std::type_info &
id)
const;
109 SCOPIRA_EXPORT
bool has_typeinfo(
const std::string &name)
const;
111 SCOPIRA_EXPORT
const std::type_info&
get_typeinfo(
const std::string &name)
const;
114 SCOPIRA_EXPORT
object*
load_object(
const std::type_info&
id)
const;
161 scopira::tool::flow_reg_imp(
typeid(T), (fullname), scopira::tool::objloadfunc_g<T>);
165 scopira::tool::flow_reg_imp(
typeid(T), (fullname), 0);
Definition: archiveflow.h:20