plpart_i.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00009 /*
00010   AUTHOR(S): Elangovan Angannan (aen)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.10 $
00015 
00016   License
00017    OSB rating and billing library for communication networks
00018    Copyright (C) 2004, 2005, 2006  OSB systems
00019 
00020    This file may be distributed and/or modify under the terms of the
00021    GNU General Public License (GPL) as published by the Free Software
00022    Foundation which is provided in the file LICENSE.GPL included in the
00023    packaging of this file.
00024 
00025    The file is distributed in the hope that it will be useful, but WITHOUT
00026    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00027    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00028    for more details.
00029 
00030    Holders of a OSB Commercial License may use this file under the terms
00031    and conditions of this commercial license.
00032  */
00033 #ifndef _PLPART_I_H_
00034 #define _PLPART_I_H_
00035 
00036 // *********************************************************************
00037 // included header files
00038 
00039 // + OSB library
00040 #include "plitem.h"
00041 
00042 // + local headers
00043 #include "plpartS.h"
00044 #include "productpart_i.h"
00045 
00046 // ************************************************************************
00047 // namespace extensions
00048 namespace OSB_CORBA {
00049 
00050     using namespace corba::pcat::pp;
00051     using corba::common::OsbCorbaException;
00052     using corba::pcat::pp::PricelistId;    // g++ needs it?
00053 
00054     // *****************************************************************
00055     // class PlPartBase_i
00059     class PlPartBase_i :
00060         public virtual POA_corba::pcat::pp::PlPart,
00061         public virtual ProductPartBase_i
00062     {
00063     public:
00072         virtual PricelistId plId()
00073             throw (CORBA::SystemException, OsbCorbaException);
00074 
00075    private:
00083         virtual const OSB_LIB::PricelistItem* getPlItem(
00084             const ProductPartBase_i::NodeRg& guard,
00085             const std::string&               ifc,
00086             const std::string&               module
00087         ) const throw (OsbCorbaException) = 0;
00088     };                                  // class PlPartBase_i
00089 
00090     // *****************************************************************
00091     // class PlPart_i
00098     class PlPart_i :
00099         public virtual PlPartBase_i,
00100         public virtual ProductPart_i
00101     {
00102     public:
00104         static const std::string IFC;
00105 
00113         PlPart_i(
00114                   Product_i& pd,
00115             const NodeOid&   pnId,
00116             const ItemOid&   piId
00117         );
00118 
00119     private:
00131         virtual const OSB_LIB::PricelistItem* getPlItem(
00132             const ProductPartBase_i::NodeRg& guard,
00133             const std::string&               ifc,
00134             const std::string&               module
00135         ) const throw (OsbCorbaException);
00136 
00138         const std::string& ifc() const;
00139     };                                  // class PlPart_i
00140 
00141     // *****************************************************************
00142     // class PlPartWriter_i
00149     class PlPartWriter_i :
00150         public virtual POA_corba::pcat::pp::PlPartWriter,
00151         public virtual ProductPartWriter_i,
00152         public virtual PlPartBase_i
00153     {
00154     public:
00156         static const std::string IFC;
00157 
00168         PlPartWriter_i(
00169             ProductWriter_i&        prod,
00170             OSB_LIB::ProductNode&   node,
00171             OSB_LIB::PricelistItem& plItem
00172         );
00173 
00179         void setPlId(const PricelistId& plId)
00180             throw (CORBA::SystemException);
00181 
00182     private:
00187         OSB_LIB::PricelistItem& plItem_;
00188 
00189     private:
00191         const std::string& ifc() const;
00192 
00193     private:                        // required by ProductPartWriter_i
00195         virtual OSB_LIB::ProductItem* pItem();
00196 
00198         virtual const OSB_LIB::ProductItem* pItem() const;
00199 
00201         virtual const OSB_LIB::PricelistItem* getPlItem(
00202             const ProductPartBase_i::NodeRg& guard,
00203             const std::string&               ifc,
00204             const std::string&               module
00205         ) const throw (OsbCorbaException);
00206     };                                  // class PlPartWriter_i
00207 
00208 // *********************************************************************
00209 // inline definitions
00210 
00211 }                                       // namespace OSB_CORBA
00212 #endif                                  // #ifndef _PLPART_I_H_

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