![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 2009 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: assistantLogMsg.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef assistantLogMsg_H_ 00010 #define assistantLogMsg_H_ 00011 00015 00016 #include <vlutil/vlPrint.h> 00017 #include <string> 00018 #include <list> 00019 00020 #include "assistantMsg.h" 00021 #include "netAssistantLogMsg.h" 00022 #include <printerBuf.h> 00023 00024 class DtAssistantLogMsg; 00025 class DtRtiAssistantServer; 00026 class DtRtiAssistantPeer; 00027 00028 typedef void (*DtAssistantLogCb)(const DtAssistantLogMsg& inter, void* usr); 00029 00030 00036 class DT_DLL_ASSISTANT DtAssistantLogMsg : public DtAssistantMsg 00037 { 00038 00039 public: 00040 00042 DtAssistantLogMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00043 00044 DtAssistantLogMsg(const DtNetAssistantLogMsg* netRep, 00045 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00046 00048 virtual ~DtAssistantLogMsg(); 00049 00051 virtual DtAssistantMsg* clone(bool copy = true) const; 00052 00054 virtual void setLog( const DtLogEntryList& log, unsigned maxSize ); 00055 00058 virtual const char* nextEntry( DtNotifyLevelType& notifyLevel ) const; 00059 00061 virtual unsigned textSize() const; 00062 00064 virtual void printData() const; 00065 00066 public: 00067 00069 static DtAssistantMsg* create(const DtNetAssistantMsgHeader* initial, 00070 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00071 00072 static DtAssistantMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00073 00076 static void addCallback(DtRtiAssistantServer* conn, DtAssistantLogCb cb, void* usr); 00077 static void removeCallback(DtRtiAssistantServer* conn, DtAssistantLogCb cb, void* usr); 00078 00081 static void addCallback(DtRtiAssistantPeer* conn, DtAssistantLogCb cb, void* usr); 00082 static void removeCallback(DtRtiAssistantPeer* conn, DtAssistantLogCb cb, void* usr); 00083 00084 protected: 00085 00087 virtual DtNetAssistantLogMsg* netAssistantLogMsg(); 00088 virtual const DtNetAssistantLogMsg* netAssistantLogMsg() const; 00089 00091 virtual DtAssistantMsgKind internalMsgKind(); 00092 00094 virtual int minSize() const; 00095 00097 virtual void setTextSize( unsigned size ); 00098 00100 virtual void setNumEntries( unsigned num ); 00101 virtual unsigned numEntries() const; 00102 00104 virtual const DtNetU8* notifyLevelPtr() const; 00105 virtual DtNetU8* notifyLevelPtr(); 00106 00108 virtual const char* textPtr() const; 00109 virtual char* textPtr(); 00110 00112 mutable const char* myNextTextPtr; 00113 00115 mutable unsigned myNextNum; 00116 00117 }; 00118 00119 #endif