tspart_i.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00009 /*
00010   AUTHOR(S): Yeo Han Kwang (yhk)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.14 $
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 _TSPART_I_H_
00034 #define _TSPART_I_H_
00035 
00036 // *********************************************************************
00037 // included header files
00038 // + OSB library
00039 #include "productcat.h"
00040 #include "tsitem.h"
00041 
00042 // + local headers
00043 #include "tspartS.h"
00044 #include "productpart_i.h"
00045 
00046 namespace OSB_CORBA {
00047 
00048     using namespace corba::pcat::pp;
00049     using corba::common::OsbCorbaException;
00050 
00051     // *****************************************************************
00052     // class TsPartBase_i
00060     class TsPartBase_i :
00061         public virtual POA_corba::pcat::pp::TsPart,
00062         public virtual ProductPartBase_i
00063     {
00064     public:
00072         virtual TariffSystemIdSeq* tsList()
00073             throw (CORBA::SystemException, OsbCorbaException);
00074 
00082         virtual TariffSystemId defaultTs()
00083             throw (CORBA::SystemException, OsbCorbaException);
00084    private:
00090         virtual const OSB_LIB::TariffSystemItem* getTsItem(
00091             const ProductPartBase_i::NodeRg& guard,
00092             const std::string&               ifc,
00093             const std::string&               module
00094         ) const throw (OsbCorbaException) = 0;
00095     };
00096 
00097     // *****************************************************************
00098     // class TsPart_i
00105     class TsPart_i :
00106         public virtual TsPartBase_i,
00107         public virtual ProductPart_i
00108     {
00109     public:
00110 
00112         static const std::string IFC;
00113 
00121         TsPart_i(
00122                   Product_i& pd,
00123             const NodeOid&   pnId,
00124             const ItemOid&   piId
00125         );
00126 
00127     private:
00139         virtual const OSB_LIB::TariffSystemItem* getTsItem(
00140             const ProductPartBase_i::NodeRg& guard,
00141             const std::string&               ifc,
00142             const std::string&               module
00143         ) const throw (OsbCorbaException);
00144 
00146         const std::string& ifc() const;
00147     };
00148 
00149     // *****************************************************************
00150     // class TsPartWriter_i
00157     class TsPartWriter_i :
00158         public virtual POA_corba::pcat::pp::TsPartWriter,
00159         public virtual ProductPartWriter_i,
00160         public virtual TsPartBase_i
00161     {
00162     public:
00163 
00165         static const std::string IFC;
00166 
00177         TsPartWriter_i(
00178             ProductWriter_i&           prod,
00179             OSB_LIB::ProductNode&      node,
00180             OSB_LIB::TariffSystemItem& tsItem
00181         );
00182 
00184         ~TsPartWriter_i();
00185 
00197         virtual CORBA::Boolean addTs(const TariffSystemId& tsId)
00198             throw (CORBA::SystemException);
00199 
00212         virtual CORBA::Boolean rmTs(const TariffSystemId& tsId)
00213             throw (CORBA::SystemException);
00214 
00219         virtual void clear()
00220             throw (CORBA::SystemException);
00221 
00230         virtual void setDefaultTs(const TariffSystemId& tsId)
00231             throw (CORBA::SystemException);
00232 
00238         virtual void clearDefaultTs()
00239             throw (CORBA::SystemException);
00240 
00241     private:
00243         OSB_LIB::TariffSystemItem& tsItem_;
00244 
00245     private:
00247         const std::string& ifc() const;
00248 
00249     private:                        // required by ProductPartWriter_i
00251         virtual OSB_LIB::ProductItem* pItem();
00253         virtual const OSB_LIB::ProductItem* pItem() const;
00254 
00256         virtual const OSB_LIB::TariffSystemItem* getTsItem(
00257             const ProductPartBase_i::NodeRg& guard,
00258             const std::string&               ifc,
00259             const std::string&               module
00260         ) const throw (OsbCorbaException);
00261     };
00262 
00263 // *********************************************************************
00264 // inline definitions
00265 
00266 }                                       // namespace OSB_CORBA
00267 #endif                                  // #ifndef _TSPART_I_H_

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