devicepart_i.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.2 $
00012 
00013   License
00014    OSB rating and billing library for communication networks
00015    Copyright (C) 2004, 2005, 2006  OSB systems
00016 
00017    This file may be distributed and/or modify under the terms of the
00018    GNU General Public License (GPL) as published by the Free Software
00019    Foundation which is provided in the file LICENSE.GPL included in the
00020    packaging of this file.
00021 
00022    The file is distributed in the hope that it will be useful, but WITHOUT
00023    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00024    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00025    for more details.
00026 
00027    Holders of a OSB Commercial License may use this file under the terms
00028    and conditions of this commercial license.
00029  */
00030 #ifndef _DEVICEPART_I_H_
00031 #define _DEVICEPART_I_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 
00039 // + local headers
00040 #include "devicepartS.h"
00041 #include "productpart_i.h"
00042 
00043 // + class declarations
00044 namespace OSB_LIB {
00045     class DeviceItem;
00046 }
00047 
00048 // ************************************************************************
00049 // namespace extensions
00050 namespace OSB_CORBA {
00051 
00052 // ************************************************************************
00053 // forward declarations
00054 
00055 // ************************************************************************
00056 // type definitions
00057 
00058 // ************************************************************************
00059 // class definitions
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:                             // CORBA interface
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     };                                  // class DevicePartBase_i
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     };                                  // class DevicePart_i
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:                             // CORBA interface
00174         void setDeviceType(
00175             const corba::dvc::DeviceType& dvcType
00176         ) throw (OsbCorbaException);
00177 
00178     public:
00180         const std::string& ifc() const;
00181 
00182     private:                        // required by ProductPartWriter_i
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     };                                  // class DevicePartWriter_i
00202 }                                       // namespace OSB_CORBA
00203 
00204 // ************************************************************************
00205 // inline definitions
00206 namespace OSB_CORBA {
00207 }                                       // namespace OSB_CORBA
00208 #endif                                  // #ifndef _DEVICEPART_I_H_

Generated on Sat Sep 2 14:25:51 2006 for OSB Library by  doxygen 1.4.7