nwaddress.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00016 /*
00017   AUTHOR(S): Stephan Broennimann (vb)
00018 
00019   RCS information
00020    $Name: OSB_060808 $
00021    $Revision: 1.25 $
00022 
00023   License
00024    OSB rating and billing library for communication networks
00025    Copyright (C) 2004, 2005, 2006  OSB systems
00026 
00027    This file may be distributed and/or modify under the terms of the
00028    GNU General Public License (GPL) as published by the Free Software
00029    Foundation which is provided in the file LICENSE.GPL included in the
00030    packaging of this file.
00031 
00032    The file is distributed in the hope that it will be useful, but WITHOUT
00033    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00034    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00035    for more details.
00036 
00037    Holders of a OSB Commercial License may use this file under the terms
00038    and conditions of this commercial license.
00039  */
00040 #ifndef _NWADDRESS_H_
00041 #define _NWADDRESS_H_
00042 
00043 // *********************************************************************
00044 // included header files
00045 // + standard includes
00046 #include <string>
00047 
00048 // + local headers
00049 
00050 // *********************************************************************
00051 // class declarations
00052 
00053 // *********************************************************************
00054 // namespace extensions
00055 namespace OSB_LIB {
00056 
00057 // *********************************************************************
00058 // class definitions
00059 
00060     // *****************************************************************
00061     // class NwAddress
00072     class NwAddress {
00073     public:                             // type definitions
00084         enum Np {
00085             npUnknown    = 0,  
00086             npTelephony  = 1,  
00087             npData       = 3,  
00088             npTelex      = 4,  
00089             npLandMobile = 6,  
00090             npIsdnMobile = 7,  
00091             npNational   = 8,  
00092             npPrivate    = 9   
00093         };
00094 
00104         enum Ton {
00105             tonNotSet          = -1,  
00106             tonDialled         =  0,  
00107             tonInternational   =  1,  
00108             tonNational        =  2,  
00109 
00113             tonNetworkSpecific =  3,
00114             tonSubscriber      =  4,  
00115 
00120             tonUnknown         =  5,
00121             tonAbbreviated     =  6   
00122         };
00123 
00131         static Np toNp(long np);
00132 
00140         static long toLong(Np np);
00141 
00149         static Ton toTon(long ton);
00150 
00158         static long toLong(Ton ton);
00159 
00166         enum ModInd {
00168             miUnmodified = 0,
00170             miModified   = 1
00171         };
00172 
00173     public:                             // construction, destruction
00182         NwAddress()
00183           : modInd_(miUnmodified), np_(npUnknown),
00184             ton_(tonNotSet), analyzedTon_(tonNotSet) {}
00185 
00187         void clear();
00188 
00189     public:                             // data members
00191         ModInd modInd_;
00193         Np np_;
00195         Ton ton_;
00197         std::string original_;
00204         Ton analyzedTon_;
00211         std::string analyzed_;
00212 
00214         std::string countryCode_;
00215     };
00216 }                                       // namespace OSB_LIB
00217 #endif                                  // #ifndef _NWADDRESS_H_

Generated on Sat Sep 2 14:06:33 2006 for OSB Library by  doxygen 1.4.7