![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: printerBuf.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef printerBuf_H_ 00010 #define printerBuf_H_ 00011 00014 00015 #include "rtiMsConfig.h" 00016 #include <vlutil/vlPrint.h> 00017 #include <list> 00018 00020 struct DtLogEntry 00021 { 00022 std::string str; 00023 MAKRti::DtNotifyLevelType level; 00024 }; 00025 00026 00028 typedef std::list< DtLogEntry* > DtLogEntryList; 00029 00030 00031 00037 class DT_DLL_RTIUTIL DtPrinterBuf 00038 { 00039 public: 00040 00042 DtPrinterBuf(); 00043 00045 virtual ~DtPrinterBuf(); 00046 00048 DtPrinterBuf( DtPrinterBuf const&); 00049 00051 virtual DtPrinterBuf& operator=( DtPrinterBuf const&); 00052 00053 public: 00054 00058 virtual const DtLogEntry* readNext(); 00059 00061 virtual void write( const std::string& st, MAKRti::DtNotifyLevelType level ); 00062 00064 virtual void copyBufferToList( DtLogEntryList& destList ) const; 00065 00068 virtual void writeBufferToOutputStreams() const; 00069 00071 virtual void clearBuffer(); 00072 00074 virtual void setMaxEntries( int max ); 00075 00076 protected: 00077 00080 DtLogEntryList myBuffer; 00081 00083 DtLogEntry* myInProcessEntry; 00084 00086 int myMaxEntries; 00087 00088 }; 00089 00090 #endif 00091