9 #ifndef INCLUDE_FUNAPI_FRAMEWORK_COMPONENT_H_ 10 #define INCLUDE_FUNAPI_FRAMEWORK_COMPONENT_H_ 12 #include <boost/noncopyable.hpp> 20 class FUNAPI_DLL_VISIBILITY
Component :
public boost::noncopyable {
22 static const ArgumentMap *FindArgument(
const string &component_name);
32 #define REGISTER_COMPONENT(COMPONENT_NAME, INSTALLER_CLS) \ 34 extern "C" FUNAPI_DLL_VISIBLE bool COMPONENT_NAME ## _install( \ 35 const fun::ArgumentMap &arguments) { \ 36 return INSTALLER_CLS::Install(arguments); \ 39 extern "C" FUNAPI_DLL_VISIBLE bool COMPONENT_NAME ## _uninstall() { \ 40 return INSTALLER_CLS::Uninstall(); \ 45 #define REGISTER_STARTABLE_COMPONENT(COMPONENT_NAME, INSTALLER_CLS) \ 46 REGISTER_COMPONENT(COMPONENT_NAME, INSTALLER_CLS) \ 48 extern "C" FUNAPI_DLL_VISIBLE bool COMPONENT_NAME ## _start() { \ 49 return INSTALLER_CLS::Start(); \ 53 #define REGISTER_STARTABLE_COMPONENT2(COMPONENT_NAME, INSTALLER_CLS) \ 54 REGISTER_STARTABLE_COMPONENT(COMPONENT_NAME, INSTALLER_CLS) \ 56 extern "C" FUNAPI_DLL_VISIBLE bool COMPONENT_NAME ## _stop() { \ 57 return INSTALLER_CLS::Stop(); \ 61 #endif // INCLUDE_FUNAPI_FRAMEWORK_COMPONENT_H_
ArgumentMap class manages application-specific run-time arguments.
Definition: argument_map.h:23
Base class for any service in Funapi.
Definition: component.h:20