00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _DEVICEPART_I_H_
00031 #define _DEVICEPART_I_H_
00032
00033
00034
00035
00036
00037
00038
00039
00040 #include "devicepartS.h"
00041 #include "productpart_i.h"
00042
00043
00044 namespace OSB_LIB {
00045 class DeviceItem;
00046 }
00047
00048
00049
00050 namespace OSB_CORBA {
00051
00052
00053
00054
00055
00056
00057
00058
00059
00064 class DevicePartBase_i :
00065 public virtual POA_corba::pcat::pp::DevicePart,
00066 public virtual ProductPartBase_i
00067 {
00068 public:
00070 DevicePartBase_i();
00071 public:
00073 corba::dvc::DeviceType deviceType()
00074 throw (OsbCorbaException);
00075
00076 private:
00078 DevicePartBase_i(const DevicePartBase_i&);
00080 DevicePartBase_i& operator=(const DevicePartBase_i&);
00081
00082 protected:
00088 virtual const OSB_LIB::DeviceItem* getDeviceItem(
00089 const ProductPartBase_i::NodeRg& guard,
00090 const std::string& ifc,
00091 const std::string& fct
00092 ) const throw (OsbCorbaException) = 0;
00093 };
00094
00098 class DevicePart_i :
00099 public virtual DevicePartBase_i,
00100 public virtual ProductPart_i
00101 {
00102 public:
00104 static const std::string IFC;
00105
00106 public:
00114 DevicePart_i(
00115 Product_i& pd,
00116 const NodeOid& pnId,
00117 const ItemOid& piId
00118 );
00119
00121 const std::string& ifc() const;
00122
00123 private:
00135 const OSB_LIB::DeviceItem* getDeviceItem(
00136 const ProductPartBase_i::NodeRg& guard,
00137 const std::string& ifc,
00138 const std::string& fct
00139 ) const throw (OsbCorbaException);
00140 };
00141
00145 class DevicePartWriter_i
00146 : public virtual POA_corba::pcat::pp::DevicePartWriter,
00147 public virtual ProductPartWriter_i,
00148 public virtual DevicePartBase_i
00149 {
00150 public:
00152 static const std::string IFC;
00153
00154 public:
00166 DevicePartWriter_i(
00167 ProductWriter_i& prod,
00168 OSB_LIB::ProductNode& node,
00169 OSB_LIB::DeviceItem& dvcItem
00170 );
00171
00172 public:
00174 void setDeviceType(
00175 const corba::dvc::DeviceType& dvcType
00176 ) throw (OsbCorbaException);
00177
00178 public:
00180 const std::string& ifc() const;
00181
00182 private:
00184 OSB_LIB::ProductItem* pItem();
00186 const OSB_LIB::ProductItem* pItem() const;
00187
00189 const OSB_LIB::DeviceItem* getDeviceItem(
00190 const ProductPartBase_i::NodeRg& guard,
00191 const std::string& ifc,
00192 const std::string& fct
00193 ) const throw (OsbCorbaException);
00194
00195 private:
00200 OSB_LIB::DeviceItem& dvcItem_;
00201 };
00202 }
00203
00204
00205
00206 namespace OSB_CORBA {
00207 }
00208 #endif // #ifndef _DEVICEPART_I_H_