メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ

PortAdmin.h

説明を見る。
00001 // -*- C++ -*-
00019 /*
00020  * $Log: PortAdmin.h,v $
00021  * Revision 1.6  2007/01/21 10:28:09  n-ando
00022  * Some trivial fixes.
00023  *
00024  * Revision 1.5  2007/01/09 15:13:11  n-ando
00025  * Now Port does not have getName().
00026  * The name of Port is obtained from getProfile().
00027  *
00028  * Revision 1.4  2006/12/02 18:49:43  n-ando
00029  * A trivial fix.
00030  *
00031  * Revision 1.3  2006/11/06 01:19:04  n-ando
00032  * CORBA sequence manipulation has been rewritten by using CORBA_SeqUtil.
00033  *
00034  * Revision 1.2  2006/10/17 19:16:40  n-ando
00035  * registerPort() was modified to store Port's object reference in PortProfile.
00036  *
00037  * Revision 1.1  2006/10/17 10:22:01  n-ando
00038  * The first commitment.
00039  *
00040  */
00041 
00042 #ifndef PortAdmin_h
00043 #define PortAdmin_h
00044 
00045 #include <rtm/idl/RTCSkel.h>
00046 #include <rtm/PortBase.h>
00047 #include <rtm/ObjectManager.h>
00048 // 68608 10 17 23:51 PortAdmin.o
00049 // 54272 10 29 00:53 PortAdmin.o
00050 // 54132 10 29 00:54 PortAdmin.o
00051 namespace RTC
00052 {
00053 
00054 
00055   class PortAdmin
00056   {
00057   public:
00058     PortAdmin(CORBA::ORB_ptr, PortableServer::POA_ptr poa);
00059     virtual ~PortAdmin(){};
00060 
00081     PortList* getPortList() const;
00082 
00107     Port_ptr getPortRef(const char* port_name) const;
00108 
00109 
00134     PortBase* getPort(const char* port_name) const;
00135 
00136 
00161     void registerPort(PortBase& port);
00162 
00163 
00187     void deletePort(PortBase& port);
00188 
00212     void deletePortByName(const char* port_name);
00213 
00214 
00232     void finalizePorts();
00233 
00234   private:
00235     // ORB へのポインタ
00236     CORBA::ORB_var m_pORB;
00237 
00238     // POA へのポインタ
00239     PortableServer::POA_var m_pPOA;
00240 
00241     // Portのオブジェクトリファレンスのリスト. PortList
00242     PortList m_portRefs;
00243 
00244 
00245     template <class T>
00246     class comp_op
00247     {
00248     public:
00249       comp_op(const char* _name)
00250         :
00251         m_name(_name)
00252       {
00253       }
00254       comp_op(T* obj) 
00255         : m_name((const char*)(obj->getProfile().name))
00256       {
00257       }
00258       bool operator()(T* obj)
00259       {
00260         std::string name((const char*)obj->getProfile().name);
00261         return m_name == name;
00262       }
00263     private:
00264       std::string m_name;
00265     };
00266     
00267     struct find_port_name;
00268     struct del_port;
00269 
00270     // サーバントを直接格納するオブジェクトマネージャ
00271     ObjectManager<const char*, PortBase, comp_op<PortBase> > m_portServants;
00272 
00273 
00274   };
00275 };     // namespace RTC
00276 #endif // PortAdmin_h

OpenRTMに対してMon Jul 23 17:08:04 2007に生成されました。  doxygen 1.4.1