Cleaned up register_*_property functions
Marked inline to fix unused function warnings
This commit is contained in:
parent
e9eb98743e
commit
a9e499bb64
1 changed files with 12 additions and 11 deletions
|
@ -288,29 +288,30 @@ private:
|
|||
};
|
||||
|
||||
|
||||
|
||||
template<typename X>
|
||||
static void register_vector_property(std::map<std::string,property_handler_ptr> &property_handlers, const std::string &property, std::vector< std::shared_ptr<X> > &values, std::function<void(std::vector< std::shared_ptr<X> >&, const config&)> construction_factory)
|
||||
static inline void register_vector_property(property_handler_map& property_handlers, const std::string& property,
|
||||
std::vector<std::shared_ptr<X>>& values, std::function<void(std::vector<std::shared_ptr<X>>&, const config&)> construction_factory)
|
||||
{
|
||||
property_handler_ptr handler_ptr = property_handler_ptr(new vector_property_handler<X>(property,values,construction_factory));
|
||||
property_handlers.insert(std::make_pair(property,handler_ptr));
|
||||
property_handler_ptr handler_ptr(new vector_property_handler<X>(property, values, construction_factory));
|
||||
property_handlers.emplace(property, handler_ptr);
|
||||
}
|
||||
|
||||
template<typename X>
|
||||
static void register_facets_property(std::map<std::string,property_handler_ptr> &property_handlers, const std::string &property, std::vector< std::shared_ptr<X> > &values, std::shared_ptr<X>& def, std::function<void(std::vector< std::shared_ptr<X> >&, const config&)> construction_factory)
|
||||
static inline void register_facets_property(property_handler_map& property_handlers, const std::string& property,
|
||||
std::vector<std::shared_ptr<X>>& values, std::shared_ptr<X>& def, std::function<void(std::vector<std::shared_ptr<X>>&, const config&)> construction_factory)
|
||||
{
|
||||
property_handler_ptr handler_ptr = property_handler_ptr(new facets_property_handler<X>(property,values,def,construction_factory));
|
||||
property_handlers.insert(std::make_pair(property,handler_ptr));
|
||||
property_handler_ptr handler_ptr(new facets_property_handler<X>(property, values, def, construction_factory));
|
||||
property_handlers.emplace(property, handler_ptr);
|
||||
}
|
||||
|
||||
template<typename X>
|
||||
static void register_aspect_property(std::map<std::string,property_handler_ptr> &property_handlers, const std::string &property, std::map< std::string, std::shared_ptr<X> > &aspects, std::function<void(std::map< std::string, std::shared_ptr<X> >&, const config&, std::string)> construction_factory)
|
||||
static inline void register_aspect_property(property_handler_map& property_handlers, const std::string& property,
|
||||
std::map<std::string, std::shared_ptr<X>>& aspects, std::function<void(std::map<std::string, std::shared_ptr<X>>&, const config&, std::string)> construction_factory)
|
||||
{
|
||||
property_handler_ptr handler_ptr = property_handler_ptr(new aspect_property_handler<X>(property,aspects,construction_factory));
|
||||
property_handlers.insert(std::make_pair(property,handler_ptr));
|
||||
property_handler_ptr handler_ptr(new aspect_property_handler<X>(property, aspects, construction_factory));
|
||||
property_handlers.emplace(property, handler_ptr);
|
||||
}
|
||||
|
||||
|
||||
} //of namespace ai
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue