00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef _SERVICEPART_I_H_
00034 #define _SERVICEPART_I_H_
00035
00036
00037
00038
00039 #include "serviceitem.h"
00040
00041
00042 #include "servicepartS.h"
00043 #include "productpart_i.h"
00044
00045 namespace OSB_CORBA {
00046
00047 using namespace corba::pcat::pp;
00048 using corba::common::OsbCorbaException;
00049
00050
00051
00058 class ServicePartBase_i :
00059 public virtual POA_corba::pcat::pp::ServicePart,
00060 public virtual ProductPartBase_i
00061 {
00062 public:
00070 virtual pp::ServiceTuple* getServiceTuple()
00071 throw (CORBA::SystemException, OsbCorbaException);
00072
00073 private:
00075 pp::ServiceElement getServiceElement (
00076 const OSB_LIB::ServiceElement& se
00077 ) throw (OsbCorbaException);
00078
00084 virtual const OSB_LIB::ServiceItem* getServiceItem(
00085 const ProductPartBase_i::NodeRg& guard,
00086 const std::string& ifc,
00087 const std::string& module
00088 ) const throw (OsbCorbaException) = 0;
00089 };
00090
00091
00092
00099 class ServicePart_i :
00100 public virtual ServicePartBase_i,
00101 public virtual ProductPart_i
00102 {
00103 public:
00104
00106 static const std::string IFC;
00107
00115 ServicePart_i(
00116 Product_i& pd,
00117 const NodeOid& pnId,
00118 const ItemOid& piId
00119 );
00120
00121 private:
00133 virtual const OSB_LIB::ServiceItem* getServiceItem(
00134 const ProductPartBase_i::NodeRg& guard,
00135 const std::string& ifc,
00136 const std::string& module
00137 ) const throw (OsbCorbaException);
00138
00140 const std::string& ifc() const;
00141 };
00142
00143
00144
00151 class ServicePartWriter_i :
00152 public virtual POA_corba::pcat::pp::ServicePartWriter,
00153 public virtual ProductPartWriter_i,
00154 public virtual ServicePartBase_i
00155 {
00156 public:
00157
00159 static const std::string IFC;
00160
00171 ServicePartWriter_i(
00172 ProductWriter_i& prod,
00173 OSB_LIB::ProductNode& node,
00174 OSB_LIB::ServiceItem& sItem
00175 );
00176
00178 ~ServicePartWriter_i();
00179
00185 virtual void setServiceTuple(const pp::ServiceTuple& service)
00186 throw (CORBA::SystemException);
00187
00188 private:
00190 OSB_LIB::ServiceItem& sItem_;
00191
00192 private:
00194 const std::string& ifc() const;
00195
00196 private:
00198 virtual OSB_LIB::ProductItem* pItem();
00200 virtual const OSB_LIB::ProductItem* pItem() const;
00201
00203 virtual const OSB_LIB::ServiceItem* getServiceItem(
00204 const ProductPartBase_i::NodeRg& guard,
00205 const std::string& ifc,
00206 const std::string& module
00207 ) const throw (OsbCorbaException);
00208 };
00209
00210
00211
00212
00213 }
00214 #endif // #ifndef _SERVICEPART_I_H_