tfutils.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.13 $
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 _TFUTILS_H_
00031 #define _TFUTILS_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 #include <memory>
00037 
00038 // + libraries
00039 #include <osbid.h>
00040 
00041 // + local headers
00042 #include "tautils.h"
00043 #include "osbcombos.h"
00044 
00045 // ************************************************************************
00046 // class declarations
00047 namespace OSB_LIB {
00048     class RatingFn;
00049     class TfVersion;
00050 }
00051 
00052 namespace OSB_GUI {
00053     class DlgRfBase;
00054 }
00055 
00056 // ************************************************************************
00057 // namespace extensions
00058 namespace OSB_GUI {
00059 
00060 // ************************************************************************
00061 // class definitions
00066     class TfVsStatusProxy : public ToCfgTsStatusProxy {
00067     public:
00073         explicit TfVsStatusProxy(
00074             OSB_LIB::TfVersion& tfVs
00075         );
00076     private:
00078         TfVsStatusProxy& operator=(const TfVsStatusProxy&);
00079     public:
00081         OSB_LIB::ToCfgTsBase& toCfgTs();
00086         void setStatus(
00087             OSB_LIB::CfgStatus  newStatus,
00088             OSB_LIB::OsbErrors& errors
00089         );
00090         // documentation from base
00091         bool setReleaseTs(
00092             const OSB_LIB::DateTime&  ts,
00093                   OSB_LIB::OsbErrors& errors
00094         );
00095     private:
00097         OSB_LIB::TfVersion& tfVs_;
00098     };                                  // class TfVsStatusProxy
00099 
00104     class RfStatusProxy : public ToCfgStatusProxy {
00105     public:
00107         RfStatusProxy(
00108             std::auto_ptr<OSB_LIB::RatingFn> rf
00109         );
00110     private:
00112         RfStatusProxy(const RfStatusProxy&);
00114         RfStatusProxy& operator=(const RfStatusProxy&);
00115     public:
00117         const OSB_LIB::RatingFn* rf() const;
00119         OSB_LIB::CfgStatus status() const;
00121         void setStatus(
00122             OSB_LIB::CfgStatus  newStatus,
00123             OSB_LIB::OsbErrors& errors
00124         );
00125     private:
00127         std::auto_ptr<OSB_LIB::RatingFn> rf_;
00128     };                                  // class RfStatusProxy
00129 
00133     class CmbRfType
00134       : public ValueCombo< OSB_LIB::TypeId<OSB_LIB::RatingFn> >
00135     {
00136     public:
00138         explicit CmbRfType(
00139                   QWidget* parent,
00140             const char*    name = "cmbRfType_"
00141         );
00142     public:
00150         void populate();
00151     };                                  // class CmbRfType
00152 
00153 // ************************************************************************
00154 // free functions
00164     std::auto_ptr<DlgRfBase> getDialog(
00165         const OSB_LIB::RatingFn& rf,
00166               QWidget*           parent
00167     );
00168 }                                       // namespace OSB_GUI
00169 
00170 // ************************************************************************
00171 // inline definitions
00172 namespace OSB_GUI {
00173 }                                       // namespace OSB_GUI
00174 #endif                                  // #ifndef _TFUTILS_H_

Generated on Sat Sep 2 14:17:37 2006 for OSB Library by  doxygen 1.4.7