util/qos/HistoryQos.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      HistoryQos.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 ------------------------------------------------------------------------------*/
00006 
00025 #ifndef _UTIL_QOS_HISTORYQOS_H
00026 #define _UTIL_QOS_HISTORYQOS_H
00027 
00028 # include <util/xmlBlasterDef.h>
00029 # include <util/Log.h>
00030 # include <util/Property.h>
00031 
00032 
00033 
00034         
00035 namespace org { namespace xmlBlaster { namespace util { namespace qos {
00036 
00037 extern Dll_Export const long DEFAULT_numEntries;
00038 extern Dll_Export const bool DEFAULT_newestFirst;
00039 
00040 
00041 class Dll_Export HistoryQos
00042 {
00043 private:
00044    const std::string ME; //  = "HistoryQos";
00045    org::xmlBlaster::util::Global&      global_;
00046    org::xmlBlaster::util::I_Log&         log_;
00047 
00048    long numEntries_; // = DEFAULT_numEntries;
00049    bool newestFirst_; // = DEFAULT_newestFirst;
00050 
00051 public:
00055    HistoryQos(org::xmlBlaster::util::Global& global, long numOfEntries=-1); 
00056 
00057    HistoryQos(const HistoryQos& qos);
00058 
00059    HistoryQos& operator =(const HistoryQos& qos);
00060 
00064    void setNumEntries(long numOfEntries);
00065  
00070    long getNumEntries() const;
00071  
00079    void setNewestFirst(bool newestFirst);
00080  
00085    bool getNewestFirst() const;
00086  
00094    std::string toXml(const std::string& extraOffset="") const;
00095 };
00096 
00097 }}}} //namespace
00098 
00099 #endif
00100