SdoOrganization.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00020 #ifndef RTC_SDOORGANIZATION_H
00021 #define RTC_SDOORGANIZATION_H
00022 
00023 #include <rtm/RTC.h>
00024 #include <rtm/idl/SDOPackageSkel.h>
00025 #include <rtm/SystemLogger.h>
00026 #include <string>
00027 #include <coil/Mutex.h>
00028 #include <coil/Guard.h>
00029 
00045 #ifdef WIN32
00046 #pragma warning( disable : 4290 )
00047 #endif
00048 
00049 namespace SDOPackage
00050 {
00074   class Organization_impl
00075     : public virtual POA_SDOPackage::Organization,
00076       public virtual PortableServer::RefCountServantBase
00077   {
00078     typedef coil::Mutex Mutex;
00079     typedef coil::Guard<Mutex> Guard;
00080   public:
00096 #ifdef ORB_IS_RTORB
00097     Organization_impl(RTC::RTObject_ptr sdo);
00098 #endif // ORB_IS_RTROB
00099     Organization_impl(SDOSystemElement_ptr sdo);
00100     
00116     virtual ~Organization_impl(void);
00117     
00118     //============================================================
00119     //
00120     // <<< CORBA interfaces >>>
00121     //
00122     //============================================================
00152     virtual char* get_organization_id()
00153       throw (CORBA::SystemException,
00154              InvalidParameter, NotAvailable, InternalError);
00155     
00198     virtual CORBA::Boolean
00199     add_organization_property(const OrganizationProperty& org_property)
00200       throw (CORBA::SystemException,
00201              InvalidParameter, NotAvailable, InternalError);
00202     
00235     virtual OrganizationProperty* get_organization_property()
00236       throw (CORBA::SystemException,
00237              NotAvailable, InternalError);
00238     
00278     virtual CORBA::Any* get_organization_property_value(const char* name)
00279       throw (CORBA::SystemException,
00280              InvalidParameter, NotAvailable, InternalError);
00281     
00326     virtual CORBA::Boolean
00327     set_organization_property_value(const char* name, const CORBA::Any& value)
00328       throw (CORBA::SystemException,
00329              InvalidParameter, NotAvailable, InternalError);
00330     
00371     virtual CORBA::Boolean remove_organization_property(const char* name)
00372       throw (CORBA::SystemException,
00373              InvalidParameter, NotAvailable, InternalError);
00374     
00412     virtual CORBA::Boolean add_members(const SDOList& sdo_list)
00413       throw (CORBA::SystemException,
00414              InvalidParameter, NotAvailable, InternalError);
00415     
00448     virtual SDOList* get_members()
00449       throw (CORBA::SystemException,
00450              NotAvailable, InternalError);
00451     
00495     virtual CORBA::Boolean set_members(const SDOList& sdos)
00496       throw (CORBA::SystemException,
00497              InvalidParameter, NotAvailable, InternalError);
00498     
00535     virtual CORBA::Boolean remove_member(const char* id)
00536       throw (CORBA::SystemException,
00537              InvalidParameter, NotAvailable, InternalError);
00538     
00569     virtual SDOSystemElement_ptr get_owner()
00570       throw (CORBA::SystemException,
00571              NotAvailable, InternalError);
00572     
00614     virtual CORBA::Boolean set_owner(SDOSystemElement_ptr sdo)
00615       throw (CORBA::SystemException,
00616              InvalidParameter, NotAvailable, InternalError);
00617     
00653     virtual DependencyType get_dependency()
00654       throw (CORBA::SystemException,
00655              NotAvailable, InternalError);
00656     
00699     virtual CORBA::Boolean set_dependency(DependencyType dependency)
00700       throw (CORBA::SystemException,
00701              NotAvailable, InternalError);
00702     
00703     // end of CORBA interface definition
00704     //============================================================
00705     Organization_ptr getObjRef() {return m_objref;};
00706 
00707   protected:
00708     ::RTC::Logger rtclog;
00709     Organization_var m_objref;
00717     std::string m_pId;
00718     
00726     SDOPackage::SDOList m_memberList;
00727     
00735     SDOPackage::SDOSystemElement_var m_varOwner;
00736     
00811     SDOPackage::DependencyType m_dependency;
00812     
00831     SDOPackage::OrganizationProperty m_orgProperty;
00832     Mutex m_org_mutex;
00833     
00841     struct nv_name
00842     {
00843       nv_name(const char* name) : m_name(name) {};
00844       bool operator()(const NameValue& nv)
00845       {
00846         return m_name == std::string(nv.name);
00847       }
00848       std::string m_name;
00849     };  // struct nv_name
00850     
00858     struct sdo_id
00859     {
00860       sdo_id(const char* id) : m_id(id) {};
00861       bool operator()(const SDO_ptr sdo)
00862       {
00863         CORBA::String_var id(sdo->get_sdo_id());
00864         return m_id == (const char*)id;
00865       }
00866       std::string m_id;
00867     };  // struct sdo_id
00868   };  // class Organization_impl
00869 };  // namespace SDOPackage
00870 
00871 #ifdef WIN32
00872 #pragma warning( default : 4290 )
00873 #endif
00874 
00875 #endif // RTC_NAMESPACE SDOPACKAGE


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Aug 27 2015 14:16:39