OpenRTM-aist  2.0.2
ManagerActionListener.h
Go to the documentation of this file.
1 // -*- C++ -*-
19 #ifndef RTM_MANAGERACTIONLISTENER_H
20 #define RTM_MANAGERACTIONLISTENER_H
21 
22 #include <mutex>
23 #include <coil/Properties.h>
24 #include <coil/stringutil.h>
25 #include <rtm/ListenerHolder.h>
26 
27 #include <string>
28 #include <vector>
29 #include <utility>
30 
31 // forward decl
32 namespace RTC
33 {
34  class RTObject_impl;
35 } // namespace RTC
36 
37 namespace RTM
38 {
39  // forward decl
40  class LocalServiceBase;
41 
42  //============================================================
62  {
63  public:
73  virtual ~ManagerActionListener();
74 
84  virtual void preShutdown() = 0;
85 
95  virtual void postShutdown() = 0;
96 
106  virtual void preReinit() = 0;
107 
117  virtual void postReinit() = 0;
118  };
119 
120 
129  : public ::RTM::util::ListenerHolder<ManagerActionListener>
130  {
131  public:
132  ~ManagerActionListenerHolder() override;
133 
143  virtual void preShutdown();
144 
154  virtual void postShutdown();
155 
165  virtual void preReinit();
166 
176  virtual void postReinit();
177  };
178 
179 
180  //============================================================
193  {
194  public:
202  virtual ~ModuleActionListener();
203 
213  virtual void preLoad(std::string& modname,
214  std::string& funcname) = 0;
215 
225  virtual void postLoad(std::string& modname,
226  std::string& funcname) = 0;
227 
237  virtual void preUnload(std::string& modname) = 0;
238 
248  virtual void postUnload(std::string& modname) = 0;
249  };
250 
251 
264  : public ::RTM::util::ListenerHolder<ModuleActionListener>
265  {
266  public:
274  ~ModuleActionListenerHolder() override;
275 
285  virtual void preLoad(std::string& modname,
286  std::string& funcname);
287 
297  virtual void postLoad(std::string& modname,
298  std::string& funcname);
299 
309  virtual void preUnload(std::string& modname);
310 
320  virtual void postUnload(std::string& modname);
321  };
322 
323 
324 
325  //============================================================
355  {
356  public:
364  virtual ~RtcLifecycleActionListener();
365 
375  virtual void preCreate(std::string& args) = 0;
376 
386  virtual void postCreate(RTC::RTObject_impl*) = 0;
387 
397  virtual void preConfigure(coil::Properties& prop) = 0;
398 
408  virtual void postConfigure(coil::Properties& prop) = 0;
409 
419  virtual void preInitialize() = 0;
420 
430  virtual void postInitialize() = 0;
431  };
432 
433 
449  : public RTM::util::ListenerHolder<RtcLifecycleActionListener>
450  {
451  public:
460 
461 
471  virtual void preCreate(std::string& args);
472 
482  virtual void postCreate(RTC::RTObject_impl* rtobj);
483 
493  virtual void preConfigure(coil::Properties& prop);
494 
504  virtual void postConfigure(coil::Properties& prop);
505 
515  virtual void preInitialize();
516 
526  virtual void postInitialize();
527  };
528 
529 
530  //============================================================
558  {
559  public:
567  virtual ~NamingActionListener();
568 
578  virtual void preBind(RTC::RTObject_impl* rtobj,
579  coil::vstring& name) = 0;
589  virtual void postBind(RTC::RTObject_impl* rtobj,
590  coil::vstring& name) = 0;
591 
601  virtual void preUnbind(RTC::RTObject_impl* rtobj,
602  coil::vstring& name) = 0;
603 
613  virtual void postUnbind(RTC::RTObject_impl* rtobj,
614  coil::vstring& name) = 0;
615  };
616 
617 
633  : public RTM::util::ListenerHolder<NamingActionListener>
634  {
635  public:
643  ~NamingActionListenerHolder() override;
644 
654  virtual void preBind(RTC::RTObject_impl* rtobj,
655  coil::vstring& name);
665  virtual void postBind(RTC::RTObject_impl* rtobj,
666  coil::vstring& name);
667 
677  virtual void preUnbind(RTC::RTObject_impl* rtobj,
678  coil::vstring& name);
679 
689  virtual void postUnbind(RTC::RTObject_impl* rtobj,
690  coil::vstring& name);
691  };
692 
693 
694  //============================================================
716  {
717  public:
725  virtual ~LocalServiceActionListener();
726 
736  virtual void preServiceRegister(std::string service_name) = 0;
737 
747  virtual void postServiceRegister(std::string service_name,
748  RTM::LocalServiceBase* service) = 0;
749 
759  virtual void preServiceInit(coil::Properties& prop,
760  RTM::LocalServiceBase* service) = 0;
761 
771  virtual void postServiceInit(coil::Properties& prop,
772  RTM::LocalServiceBase* service) = 0;
773 
783  virtual void preServiceReinit(coil::Properties& prop,
784  RTM::LocalServiceBase* service) = 0;
785 
795  virtual void postServiceReinit(coil::Properties& prop,
796  RTM::LocalServiceBase* service) = 0;
797 
807  virtual void postServiceFinalize(std::string service_name,
808  RTM::LocalServiceBase* service) = 0;
809 
819  virtual void preServiceFinalize(std::string service_name,
820  RTM::LocalServiceBase* service) = 0;
821  };
822 
823 
845  : public RTM::util::ListenerHolder<LocalServiceActionListener>
846  {
847  public:
856 
857  // registration instance of service to svc admin
867  virtual void preServiceRegister(std::string service_name);
868 
878  virtual void postServiceRegister(std::string service_name,
879  RTM::LocalServiceBase* service);
880 
890  virtual void preServiceInit(coil::Properties& prop,
891  RTM::LocalServiceBase* service);
901  virtual void postServiceInit(coil::Properties& prop,
902  RTM::LocalServiceBase* service);
903 
913  virtual void preServiceReinit(coil::Properties& prop,
914  RTM::LocalServiceBase* service);
924  virtual void postServiceReinit(coil::Properties& prop,
925  RTM::LocalServiceBase* service);
926 
936  virtual void postServiceFinalize(std::string service_name,
937  RTM::LocalServiceBase* service);
947  virtual void preServiceFinalize(std::string service_name,
948  RTM::LocalServiceBase* service);
949  };
950 
951 
952 
967  {
968  public:
988  };
989 } // namespace RTM
990 
991 #endif // RTC_MANAGERACTIONLISTENER_H
RTM::ManagerActionListenerHolder::postShutdown
virtual void postShutdown()
postShutdown callback function TODO: Documentation
RTM::ManagerActionListenerHolder::~ManagerActionListenerHolder
~ManagerActionListenerHolder() override
RTM::LocalServiceActionListener::preServiceInit
virtual void preServiceInit(coil::Properties &prop, RTM::LocalServiceBase *service)=0
preServiceInit callback function TODO: Documentation
RTM::ManagerActionListeners
ManagerActionListeners class.
Definition: ManagerActionListener.h:966
RTM
RT-Middleware.
Definition: FactoryInit.h:21
RTM::ManagerActionListenerHolder::postReinit
virtual void postReinit()
postReinit callback function TODO: Documentation
RTM::ModuleActionListenerHolder::preLoad
virtual void preLoad(std::string &modname, std::string &funcname)
preLoad callback function TODO: Documentation
RTM::NamingActionListener::~NamingActionListener
virtual ~NamingActionListener()
Destructor.
RTM::NamingActionListenerHolder::postUnbind
virtual void postUnbind(RTC::RTObject_impl *rtobj, coil::vstring &name)
postUnbind callback function TODO: Documentation
RTM::LocalServiceActionListener::postServiceFinalize
virtual void postServiceFinalize(std::string service_name, RTM::LocalServiceBase *service)=0
postServiceFinalize callback function TODO: Documentation
RTM::NamingActionListener
NamingActionListener class.
Definition: ManagerActionListener.h:557
RTM::LocalServiceActionListener::postServiceInit
virtual void postServiceInit(coil::Properties &prop, RTM::LocalServiceBase *service)=0
postServiceInit callback function TODO: Documentation
RTM::LocalServiceActionListener::postServiceReinit
virtual void postServiceReinit(coil::Properties &prop, RTM::LocalServiceBase *service)=0
postServiceReinit callback function TODO: Documentation
RTM::RtcLifecycleActionListenerHolder::preInitialize
virtual void preInitialize()
preInitialize callback function TODO: Documentation
RTM::NamingActionListener::postBind
virtual void postBind(RTC::RTObject_impl *rtobj, coil::vstring &name)=0
postBind callback function TODO: Documentation
RTM::RtcLifecycleActionListener::preCreate
virtual void preCreate(std::string &args)=0
preCreate callback function TODO: Documentation
RTM::RtcLifecycleActionListenerHolder::postInitialize
virtual void postInitialize()
postInitialize callback function TODO: Documentation
RTM::RtcLifecycleActionListener::~RtcLifecycleActionListener
virtual ~RtcLifecycleActionListener()
Destructor.
RTM::LocalServiceActionListenerHolder::postServiceFinalize
virtual void postServiceFinalize(std::string service_name, RTM::LocalServiceBase *service)
postServiceFinalize callback function TODO: Documentation
RTM::ManagerActionListeners::localservice_
LocalServiceActionListenerHolder localservice_
Definition: ManagerActionListener.h:987
RTM::RtcLifecycleActionListenerHolder::postConfigure
virtual void postConfigure(coil::Properties &prop)
postConfigure callback function TODO: Documentation
RTM::LocalServiceActionListenerHolder::preServiceInit
virtual void preServiceInit(coil::Properties &prop, RTM::LocalServiceBase *service)
preServiceInit callback function TODO: Documentation
RTM::NamingActionListenerHolder::~NamingActionListenerHolder
~NamingActionListenerHolder() override
Destructor.
RTM::ModuleActionListenerHolder::postUnload
virtual void postUnload(std::string &modname)
postUnload callback function TODO: Documentation
RTM::NamingActionListenerHolder
NamingActionListenerHolder class.
Definition: ManagerActionListener.h:632
RTM::RtcLifecycleActionListenerHolder::preConfigure
virtual void preConfigure(coil::Properties &prop)
preConfigure callback function TODO: Documentation
RTM::ModuleActionListener::postUnload
virtual void postUnload(std::string &modname)=0
postUnload callback function TODO: Documentation
RTM::ManagerActionListener
Definition: ManagerActionListener.h:61
RTM::RtcLifecycleActionListenerHolder::preCreate
virtual void preCreate(std::string &args)
preCreate callback function TODO: Documentation
RTC::RTObject_impl
RT-Component class.
Definition: RTObject.h:90
RTM::ModuleActionListener::preUnload
virtual void preUnload(std::string &modname)=0
preUnload callback function TODO: Documentation
RTM::NamingActionListenerHolder::preUnbind
virtual void preUnbind(RTC::RTObject_impl *rtobj, coil::vstring &name)
preUnbind callback function TODO: Documentation
RTM::LocalServiceActionListener::preServiceRegister
virtual void preServiceRegister(std::string service_name)=0
preServiceRegister callback function TODO: Documentation
RTM::NamingActionListener::preBind
virtual void preBind(RTC::RTObject_impl *rtobj, coil::vstring &name)=0
preBind callback function TODO: Documentation
RTM::RtcLifecycleActionListenerHolder::~RtcLifecycleActionListenerHolder
~RtcLifecycleActionListenerHolder() override
Destructor.
RTM::LocalServiceActionListenerHolder::preServiceFinalize
virtual void preServiceFinalize(std::string service_name, RTM::LocalServiceBase *service)
preServiceFinalize callback function TODO: Documentation
RTM::ManagerActionListener::postReinit
virtual void postReinit()=0
postReinit callback function TODO: Documentation
RTM::LocalServiceActionListenerHolder::postServiceInit
virtual void postServiceInit(coil::Properties &prop, RTM::LocalServiceBase *service)
postServiceInit callback function TODO: Documentation
RTM::RtcLifecycleActionListener
RtcLifecycleActionListener class.
Definition: ManagerActionListener.h:354
RTM::LocalServiceActionListenerHolder::postServiceRegister
virtual void postServiceRegister(std::string service_name, RTM::LocalServiceBase *service)
postServiceRegister callback function TODO: Documentation
RTM::ManagerActionListeners::~ManagerActionListeners
~ManagerActionListeners()
Destructor.
RTM::LocalServiceActionListenerHolder::preServiceReinit
virtual void preServiceReinit(coil::Properties &prop, RTM::LocalServiceBase *service)
preServiceReinit callback function TODO: Documentation
RTM::LocalServiceActionListener::preServiceFinalize
virtual void preServiceFinalize(std::string service_name, RTM::LocalServiceBase *service)=0
preServiceFinalize callback function TODO: Documentation
RTM::RtcLifecycleActionListenerHolder::postCreate
virtual void postCreate(RTC::RTObject_impl *rtobj)
postCreate callback function TODO: Documentation
RTM::RtcLifecycleActionListener::postConfigure
virtual void postConfigure(coil::Properties &prop)=0
postConfigure callback function TODO: Documentation
RTM::LocalServiceActionListenerHolder
LocalServiceActionListenerHolder class.
Definition: ManagerActionListener.h:844
RTM::NamingActionListenerHolder::preBind
virtual void preBind(RTC::RTObject_impl *rtobj, coil::vstring &name)
preBind callback function TODO: Documentation
RTM::LocalServiceActionListenerHolder::~LocalServiceActionListenerHolder
~LocalServiceActionListenerHolder() override
Destructor.
RTM::RtcLifecycleActionListener::postCreate
virtual void postCreate(RTC::RTObject_impl *)=0
postCreate callback function TODO: Documentation
RTM::ManagerActionListenerHolder::preReinit
virtual void preReinit()
preReinit callback function TODO: Documentation
ListenerHolder.h
RTM::RtcLifecycleActionListener::postInitialize
virtual void postInitialize()=0
postInitialize callback function TODO: Documentation
RTM::ManagerActionListeners::naming_
NamingActionListenerHolder naming_
Definition: ManagerActionListener.h:986
RTM::ModuleActionListenerHolder
ModuleActionListenerHolder class.
Definition: ManagerActionListener.h:263
RTM::LocalServiceActionListener::preServiceReinit
virtual void preServiceReinit(coil::Properties &prop, RTM::LocalServiceBase *service)=0
preServiceReinit callback function TODO: Documentation
RTM::ManagerActionListeners::rtclifecycle_
RtcLifecycleActionListenerHolder rtclifecycle_
Definition: ManagerActionListener.h:985
RTM::LocalServiceBase
Definition: LocalServiceBase.h:197
RTM::ManagerActionListeners::module_
ModuleActionListenerHolder module_
Definition: ManagerActionListener.h:984
RTM::ManagerActionListenerHolder::preShutdown
virtual void preShutdown()
preShutdown callback function TODO: Documentation
RTM::ManagerActionListener::preReinit
virtual void preReinit()=0
preReinit callback function TODO: Documentation
RTM::ModuleActionListener::~ModuleActionListener
virtual ~ModuleActionListener()
Destructor.
RTM::NamingActionListenerHolder::postBind
virtual void postBind(RTC::RTObject_impl *rtobj, coil::vstring &name)
postBind callback function TODO: Documentation
RTM::ManagerActionListener::postShutdown
virtual void postShutdown()=0
postShutdown callback function TODO: Documentation
RTM::RtcLifecycleActionListener::preInitialize
virtual void preInitialize()=0
preInitialize callback function TODO: Documentation
RTM::ManagerActionListenerHolder
Definition: ManagerActionListener.h:128
RTM::LocalServiceActionListenerHolder::postServiceReinit
virtual void postServiceReinit(coil::Properties &prop, RTM::LocalServiceBase *service)
postServiceReinit callback function TODO: Documentation
RTM::ModuleActionListenerHolder::~ModuleActionListenerHolder
~ModuleActionListenerHolder() override
Destructor.
RTM::LocalServiceActionListenerHolder::preServiceRegister
virtual void preServiceRegister(std::string service_name)
preServiceRegister callback function TODO: Documentation
RTM::util::ListenerHolder
Definition: ListenerHolder.h:143
RTM::RtcLifecycleActionListener::preConfigure
virtual void preConfigure(coil::Properties &prop)=0
preConfigure callback function TODO: Documentation
RTM::ModuleActionListenerHolder::preUnload
virtual void preUnload(std::string &modname)
preUnload callback function TODO: Documentation
RTM::ModuleActionListener::postLoad
virtual void postLoad(std::string &modname, std::string &funcname)=0
postLoad callback function TODO: Documentation
RTC
RT-Component.
RTM::RtcLifecycleActionListenerHolder
RtcLifecycleActionListenerHolder class.
Definition: ManagerActionListener.h:448
RTM::NamingActionListener::preUnbind
virtual void preUnbind(RTC::RTObject_impl *rtobj, coil::vstring &name)=0
preUnbind callback function TODO: Documentation
RTC::Properties
coil::Properties Properties
Definition: RTC.h:72
RTM::LocalServiceActionListener::~LocalServiceActionListener
virtual ~LocalServiceActionListener()
Destructor.
RTM::ManagerActionListeners::manager_
ManagerActionListenerHolder manager_
Definition: ManagerActionListener.h:983
RTM::ManagerActionListener::preShutdown
virtual void preShutdown()=0
preShutdown callback function TODO: Documentation
RTM::LocalServiceActionListener::postServiceRegister
virtual void postServiceRegister(std::string service_name, RTM::LocalServiceBase *service)=0
postServiceRegister callback function TODO: Documentation
RTM::NamingActionListener::postUnbind
virtual void postUnbind(RTC::RTObject_impl *rtobj, coil::vstring &name)=0
postUnbind callback function TODO: Documentation
RTM::ModuleActionListener::preLoad
virtual void preLoad(std::string &modname, std::string &funcname)=0
preLoad callback function TODO: Documentation
RTM::ModuleActionListenerHolder::postLoad
virtual void postLoad(std::string &modname, std::string &funcname)
postLoad callback function TODO: Documentation
RTM::ModuleActionListener
ModuleActionListener class.
Definition: ManagerActionListener.h:192
RTM::LocalServiceActionListener
LocalServiceActionListener class.
Definition: ManagerActionListener.h:715
RTM::ManagerActionListener::~ManagerActionListener
virtual ~ManagerActionListener()
ManagerActionListener dtor TODO: Documentation.