11 #ifndef _LIBALCOMMON_ALCOMMON_ALMODULECORE_H_
12 #define _LIBALCOMMON_ALCOMMON_ALMODULECORE_H_
14 # include <boost/enable_shared_from_this.hpp>
15 # include <boost/shared_ptr.hpp>
16 # include <boost/noncopyable.hpp>
21 # include <alerror/alerror.h>
29 # define BIND_OBJ_METHOD(objptr, meth) \
31 completeAndCheck(&meth, getCurrentMethodDescription()); \
32 bindMethod(createFunctor(objptr, &meth)); \
41 # define BIND_METHOD(x) BIND_OBJ_METHOD(this, x)
45 class ALModuleCoreImpl;
61 class ALModuleCore:
public ::boost::enable_shared_from_this<ALModuleCore>,
public ::boost::noncopyable
63 friend class baseModule;
66 boost::shared_ptr<ALModuleCoreImpl> fImpl;
74 typedef boost::shared_ptr<ALModuleCore>
Ptr;
80 typedef boost::weak_ptr<ALModuleCore>
WeakPtr;
106 const std::string &pName);
122 boost::shared_ptr<ALModuleCore>
getThis();
127 boost::shared_ptr<const ALModuleCore>
getThis()
const;
149 boost::shared_ptr<AL::ALProxy>
getProxy(
const std::string &pModuleName);
228 const std::string&
getName()
const;
252 const std::vector<std::string> ¶mType,
253 bool softCompare =
true);
269 std::vector<std::string> pParamsType);
291 std::vector<std::string> pParamsType);
305 const std::vector<std::string> ¶mType,
306 bool softCompare =
true);
332 std::string
getUsage(
const std::string &methodName);
343 boost::shared_ptr<T> module = boost::shared_ptr<T>(
new T(pBroker));
344 module->initModule();
349 (boost::static_pointer_cast<
ALModuleCore>(module))->init();
351 catch(
const ALError& e)
368 const std::string &name)
370 boost::shared_ptr<T> module = boost::shared_ptr<T>(
new T(pBroker, name));
371 module->initModule();
375 (boost::static_pointer_cast<
ALModuleCore>(module))->init();
377 catch(
const ALError& e)
393 const std::string &name)
395 boost::shared_ptr<T> module = createModuleCore<T>(pBroker, name);
430 void bindMethod(boost::shared_ptr<ALFunctorBase> pFunctor);
440 void bindMethod(boost::shared_ptr<ALFunctorBase> pFunctor,
441 const std::string &pName,
442 const std::string &pClass,
443 const std::string &pFunctionDescription,
461 const std::string &pClass,
462 const std::string &pFunctionDescription,
471 void addParam(
const std::string &pName,
472 const std::string &pDesc);
480 const std::string &pExample);
488 const std::string &pExample);
496 const std::string &pDesc);
499 #endif // _LIBALCOMMON_ALCOMMON_ALMODULECORE_H_