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

PortAdmin.h

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

OpenRTMに対してMon Jan 15 12:14:44 2007に生成されました。  doxygen 1.4.1