diff --git a/typefactory/typefactory.h b/typefactory/typefactory.h index ba3ac6e..aea5944 100644 --- a/typefactory/typefactory.h +++ b/typefactory/typefactory.h @@ -42,8 +42,8 @@ * typefactory.registerType("one"); * typefactory.registerType("2"); * - * auto d1 = typefactory.create ("one")(10); - * auto d2 = typefactory.create ("2")(10); + * auto d1 = typefactory.createInstance ("one")(10); + * auto d2 = typefactory.createInstance ("2")(10); * * d1->get(); * d2->get(); @@ -81,12 +81,12 @@ class TypeFsactory { } /** - * @brief create - create class by unique id. Class should be registered before + * @brief createInstance - createInstance class by unique id. Class should be registered before * @param id - unique class identification * @return shared pointer to new class. * @throws std::out_of_range when id not found in map */ - typefactoryFunction create (const ClassId& id) const { + typefactoryFunction createInstance (const ClassId& id) const { /// constructor of registered type will call here return classes.at (id); } @@ -98,7 +98,7 @@ class TypeFsactory { private: /** - * @brief typefactory - main functionality, create registered object + * @brief typefactory - main functionality, createInstance registered object * @param Derived - class type * @param args - constructor arguments * @return shared pointer to register Derived class