recordstreams.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.14 $
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 _RECORDSTREAMS_H_
00031 #define _RECORDSTREAMS_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 #include <map>
00037 #include <set>
00038 #include <string>
00039 
00040 // + libraries
00041 
00042 // + local headers
00043 #include "period.h"
00044 #include "recordstream.h"
00045 
00046 // + class declarations
00047 
00048 // ************************************************************************
00049 // namespace extensions
00050 namespace OSB_LIB {
00051 
00052 // ************************************************************************
00053 // forward declarations
00054 
00055 // ************************************************************************
00056 // type definitions
00057 
00058 // ************************************************************************
00059 // class definitions
00063     struct RecordStreamFilter {
00064     public:
00075         RecordStreamFilter();
00076     public:
00078         RecordStream::Status status_;
00080         RecordStream::Type type_;
00082         RecordSource::Oid source_;
00084         bool useStreamId_;
00086         RecordStreamInfo::Oid streamId_;
00088         std::string streamName_;
00090         bool usePeriod_;
00092         Period period_;
00093     public:
00095         void reset();
00096     };                                  // struct RecordStreamFilter
00097 
00101     struct RecordStreams {
00102     public:
00104         typedef std::set<RecordStreamInfo::Oid> RsIdSet;
00106         typedef std::map<RecordStreamInfo::Oid, RecordStreamInfo> Cont;
00107     public:
00113         bool empty() const;
00119         size_t size() const;
00121         RecordStreamInfo* find(
00122             const RecordStreamInfo::Oid& rsId
00123         );
00125         const RecordStreamInfo* find(
00126             const RecordStreamInfo::Oid& rsId
00127         ) const;
00129         RsIdSet getChildren(
00130             const RecordStreamInfo::Oid& rsId
00131         ) const;
00139         void replace(
00140             const RecordStreamInfo& rs,
00141                   bool              isMatched
00142         );
00144         void clear();
00163         long read(
00164             const OSB_DB::Session&    session,
00165             const RecordStreamFilter& filter,
00166                   bool                readAll
00167         );
00174         long refresh(const OSB_DB::Session& session);
00175 
00176     public:
00183         Cont selected_;
00185         Cont others_;
00186     };                                  // struct RecordStreams
00187 }                                       // namespace OSB_LIB
00188 
00189 // ************************************************************************
00190 // inline definitions
00191 namespace OSB_LIB {
00192 }                                       // namespace OSB_LIB
00193 #endif                                  // #ifndef _RECORDSTREAMS_H_

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