diff options
author | Josh Blum | 2013-07-31 19:56:55 -0700 |
---|---|---|
committer | Josh Blum | 2013-07-31 19:56:55 -0700 |
commit | 1897808616c91d277e24335a337bec92592fb87a (patch) | |
tree | ce57ccdb54594297ed39c9e9874874d7af8e98ad /include/gras/factory.hpp | |
parent | 258a441750b62533d887330379946b058d2c5ebb (diff) | |
download | sandhi-1897808616c91d277e24335a337bec92592fb87a.tar.gz sandhi-1897808616c91d277e24335a337bec92592fb87a.tar.bz2 sandhi-1897808616c91d277e24335a337bec92592fb87a.zip |
gras: fixed docs for factory
Diffstat (limited to 'include/gras/factory.hpp')
-rw-r--r-- | include/gras/factory.hpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/include/gras/factory.hpp b/include/gras/factory.hpp index f9403fa..fd03bb3 100644 --- a/include/gras/factory.hpp +++ b/include/gras/factory.hpp @@ -15,12 +15,6 @@ namespace gras * Element factory: * - Register factory functions into the global factory. * - Call make() to create element from global factory. - * - * Example register a factory function: - * gras::Factory::register_factory("/proj/my_block", &make_my_block); - * - * Example call into the factory: - * gras::Element *my_block = gras::Factory::make("/proj/my_block", arg0, arg1); */ struct GRAS_API Factory { @@ -33,6 +27,8 @@ struct GRAS_API Factory /*********************************************************************** * Register API - don't look here, template magic, not helpful + * Example register a factory function: + * gras::register_factory("/proj/my_block", &make_my_block); **********************************************************************/ template <typename ReturnType> static void register_factory(const std::string &path, ReturnType(*fcn)()); @@ -69,6 +65,8 @@ static void register_factory(const std::string &path, ReturnType(*fcn)(const A0 /*********************************************************************** * Make API - don't look here, template magic, not helpful + * Example call into the factory: + * gras::Element *my_block = gras::make("/proj/my_block", arg0, arg1); **********************************************************************/ inline static Element *make(const std::string &path); |