summaryrefslogtreecommitdiff
path: root/tmpl/factory.tmpl.hpp
diff options
context:
space:
mode:
authorJosh Blum2013-07-31 19:56:55 -0700
committerJosh Blum2013-07-31 19:56:55 -0700
commit1897808616c91d277e24335a337bec92592fb87a (patch)
treece57ccdb54594297ed39c9e9874874d7af8e98ad /tmpl/factory.tmpl.hpp
parent258a441750b62533d887330379946b058d2c5ebb (diff)
downloadsandhi-1897808616c91d277e24335a337bec92592fb87a.tar.gz
sandhi-1897808616c91d277e24335a337bec92592fb87a.tar.bz2
sandhi-1897808616c91d277e24335a337bec92592fb87a.zip
gras: fixed docs for factory
Diffstat (limited to 'tmpl/factory.tmpl.hpp')
-rw-r--r--tmpl/factory.tmpl.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tmpl/factory.tmpl.hpp b/tmpl/factory.tmpl.hpp
index a8f0b5d..162fe6e 100644
--- a/tmpl/factory.tmpl.hpp
+++ b/tmpl/factory.tmpl.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);
**********************************************************************/
#for $NARGS in range($MAX_ARGS)
template <typename ReturnType, $expand('typename A%d', $NARGS)>
@@ -41,6 +37,8 @@ static void register_factory(const std::string &path, ReturnType(*fcn)($expand('
#end for
/***********************************************************************
* 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);
**********************************************************************/
#for $NARGS in range($MAX_ARGS)
template <$expand('typename A%d', $NARGS)>