- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Functions
anymodule.hpp File Reference
`#include <string>`
`#include <map>`
`#include <vector>`
`#include <qi/log.hpp>`
`#include <qi/anyobject.hpp>`
`#include <qi/anyvalue.hpp>`
`#include <boost/thread/recursive_mutex.hpp>`
`#include <boost/shared_ptr.hpp>`
`#include <qi/type/objecttypebuilder.hpp>`
`#include <qi/type/dynamicobjectbuilder.hpp>`

Go to the source code of this file.

## Classes
struct | qi::ModuleInfo
class | qi::AnyModule
class | qi::ModuleBuilder

## Namespaces
| qi
| Deprecated in 2.5. Use int8_t from <cstdint>.

## Macros
#define | QI_REGISTER_MODULE(modname, fun)
#define | QI_REGISTER_MODULE_EMBEDDED(name, fun)
#define | QI_REGISTER_MODULE_FACTORY(factoryType, fun)
#define | QI_REGISTER_MODULE_FACTORY_PLUGIN(factoryType, fun)

## Typedefs
using | qi::ModuleFactoryFunctor = boost::function< AnyModule(const qi::ModuleInfo &)>

## Functions
bool | qi::registerCppEmbeddedModule (const std::string &moduleName, boost::function< void(ModuleBuilder *)> fun)
std::vector< ModuleInfo > | qi::listModules ()
AnyModule | qi::import (const std::string &name)
AnyModule | qi::import (const ModuleInfo &name)
| QI_TYPE_STRUCT (qi::ModuleInfo, name, type, path)
bool | qi::registerModuleFactory (const std::string &name, ModuleFactoryFunctor fun)

## Macro Definition Documentation

#define QI_REGISTER_MODULE | ( |  | modname,
|  |  | fun
| ) |  |

Value:
extern "C" QI_EXPORT_API void qi_module_init(::qi::ModuleBuilder *mb) { \
if (modname != mb->moduleName()) { \
qiLogCategory("qi.module"); \
qiLogError() << "module name do not match: '" \
<< modname << "' vs '" << mb->moduleName() << "'"; \
return; \
} \
(*fun)(mb); \
}
qi::ModuleBuilder::moduleName
const std::string & moduleName() const
Definition: anymodule.hpp:83
qiLogCategory
#define qiLogCategory(Cat)
Definition: log.hpp:53
qiLogError
#define qiLogError(...)
Log in error mode.
Definition: log.hpp:120
qi::ModuleBuilder
Definition: anymodule.hpp:63
QI_EXPORT_API
#define QI_EXPORT_API
Compiler flags to export a function or a class.
Definition: macro.hpp:135

register a normal module, a function will be exported to allow the module loader to init the module

Definition at line 122 of file anymodule.hpp.

#define QI_REGISTER_MODULE_EMBEDDED | ( |  | name,
|  |  | fun
| ) |  |

Value:
static bool BOOST_PP_CAT(_register_module, __COUNTER__) QI_ATTR_UNUSED \
= ::qi::registerCppEmbeddedModule(name, fun);
qi::log::env::QI_DEFAULT_LOGHANDLER::name
char const *const name
qi::registerCppEmbeddedModule
bool registerCppEmbeddedModule(const std::string &moduleName, boost::function< void(ModuleBuilder *)> fun)
QI_ATTR_UNUSED
#define QI_ATTR_UNUSED
This macro tags a attribute as unused.
Definition: macro.hpp:262

register an embedded module. (the library do not have to be loaded)

Definition at line 135 of file anymodule.hpp.

#define QI_REGISTER_MODULE_FACTORY | ( |  | factoryType,
|  |  | fun
| ) |  |

Value:
static bool BOOST_PP_CAT(_register_module_factory, __COUNTER__) QI_ATTR_UNUSED \
= ::qi::registerModuleFactory(factoryType, fun)
QI_ATTR_UNUSED
#define QI_ATTR_UNUSED
This macro tags a attribute as unused.
Definition: macro.hpp:262
qi::registerModuleFactory
bool registerModuleFactory(const std::string &name, ModuleFactoryFunctor fun)

Register a Module Factory. Module factory are by language, the default one is for C++ and provided by libqi. A python one is provided by libqi-python as a plugin.

Definition at line 159 of file anymodule.hpp.

#define QI_REGISTER_MODULE_FACTORY_PLUGIN | ( |  | factoryType,
|  |  | fun
| ) |  |

Value:
extern "C" QI_EXPORT_API void module_factory_plugin() { \
::qi::registerModuleFactory(factoryType, fun); \
}
qi::registerModuleFactory
bool registerModuleFactory(const std::string &name, ModuleFactoryFunctor fun)
QI_EXPORT_API
#define QI_EXPORT_API
Compiler flags to export a function or a class.
Definition: macro.hpp:135

Register a Module Factory as a plugins.

Definition at line 165 of file anymodule.hpp.

## Function Documentation

QI_TYPE_STRUCT | ( | qi::ModuleInfo | ,
|  | name | ,
|  | type | ,
|  | path |
| ) |  |