Skip to content
Snippets Groups Projects

Resolve "Factory for state blocks"

Merged Joan Solà Ortega requested to merge 321-factory-for-state-blocks into devel
5 files
+ 16
15
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -244,7 +244,7 @@ class Factory
@@ -244,7 +244,7 @@ class Factory
bool registerCreator(const std::string& _type, CreatorCallback createFn);
bool registerCreator(const std::string& _type, CreatorCallback createFn);
bool unregisterCreator(const std::string& _type);
bool unregisterCreator(const std::string& _type);
TypeBasePtr create(const std::string& _type, TypeInput... _input);
TypeBasePtr create(const std::string& _type, TypeInput... _input);
std::string getClass();
std::string getClass() const;
private:
private:
CallbackMap callbacks_;
CallbackMap callbacks_;
@@ -301,7 +301,7 @@ inline Factory<TypeBase, TypeInput...>& Factory<TypeBase, TypeInput...>::get()
@@ -301,7 +301,7 @@ inline Factory<TypeBase, TypeInput...>& Factory<TypeBase, TypeInput...>::get()
}
}
template<class TypeBase, typename... TypeInput>
template<class TypeBase, typename... TypeInput>
inline std::string Factory<TypeBase, TypeInput...>::getClass()
inline std::string Factory<TypeBase, TypeInput...>::getClass() const
{
{
return "Factory<class TypeBase>";
return "Factory<class TypeBase>";
}
}
@@ -319,7 +319,7 @@ class LandmarkBase;
@@ -319,7 +319,7 @@ class LandmarkBase;
typedef Factory<LandmarkBase,
typedef Factory<LandmarkBase,
const YAML::Node&> FactoryLandmark;
const YAML::Node&> FactoryLandmark;
template<>
template<>
inline std::string FactoryLandmark::getClass()
inline std::string FactoryLandmark::getClass() const
{
{
return "FactoryLandmark";
return "FactoryLandmark";
}
}
Loading