Skip to content
Snippets Groups Projects
Commit afcaa7bb authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

keeping debugging functions in factory

parent 576a6081
No related branches found
No related tags found
2 merge requests!451After cmake and const refactor,!445Resolve "Refactoring WOLF installation system"
Pipeline #10804 canceled
This commit is part of merge request !445. Comments created here will be created in the context of that merge request.
......@@ -322,30 +322,30 @@ class Factory
Factory(const Factory&) = delete;
void operator=(Factory const&) = delete;
private:
Factory() { }
Factory();
~Factory();
};
template<class TypeBase, typename... TypeInput>
inline Factory<TypeBase, TypeInput...>::~Factory<TypeBase, TypeInput...>()
inline Factory<TypeBase, TypeInput...>::Factory()
{
std::cout << " Factory destructor " << this->getClass() << std::endl;
//std::cout << " Factory constructor " << this->getClass() << std::endl;
}
template<class TypeBase, typename... TypeInput>
inline bool Factory<TypeBase, TypeInput...>::registerCreator(const std::string& _type, CreatorCallback createFn)
inline Factory<TypeBase, TypeInput...>::~Factory()
{
printCallbacks();
printAddress();
//std::cout << " Factory destructor " << this->getClass() << std::endl;
}
template<class TypeBase, typename... TypeInput>
inline bool Factory<TypeBase, TypeInput...>::registerCreator(const std::string& _type, CreatorCallback createFn)
{
bool reg = get().callbacks_.insert(typename CallbackMap::value_type(_type, createFn)).second;
if (reg)
std::cout << std::setw(26) << std::left << get().getClass() << " <-- registered " << _type << std::endl;
else
std::cout << std::setw(26) << std::left << get().getClass() << " X-- skipping " << _type << ": already registered." << std::endl;
printCallbacks();
printAddress();
return reg;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment