MAK RTIspy API Documentation for HLA 1.3
assistantLogMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2009 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: assistantLogMsg.h,v $ $Revision: 1.4 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef assistantLogMsg_H_
10 #define assistantLogMsg_H_
11 
15 
16 #include <vlutil/vlPrint.h>
17 #include <string>
18 #include <list>
19 
20 #include "assistantMsg.h"
21 #include "netAssistantLogMsg.h"
22 #include <printerBuf.h>
23 
24 class DtAssistantLogMsg;
26 class DtRtiAssistantPeer;
27 
28 typedef void (*DtAssistantLogCb)(const DtAssistantLogMsg& inter, void* usr);
29 
30 
37 {
38 
39 public:
40 
42  DtAssistantLogMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
43 
45  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
46 
48  virtual ~DtAssistantLogMsg();
49 
51  virtual DtAssistantMsg* clone(bool copy = true) const;
52 
54  virtual void setLog( const DtLogEntryList& log, unsigned maxSize );
55 
58  virtual const char* nextEntry( DtNotifyLevelType& notifyLevel ) const;
59 
61  virtual unsigned textSize() const;
62 
64  virtual void printData() const;
65 
66 public:
67 
69  static DtAssistantMsg* create(const DtNetAssistantMsgHeader* initial,
70  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
71 
72  static DtAssistantMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
73 
76  static void addCallback(DtRtiAssistantServer* conn, DtAssistantLogCb cb, void* usr);
77  static void removeCallback(DtRtiAssistantServer* conn, DtAssistantLogCb cb, void* usr);
78 
81  static void addCallback(DtRtiAssistantPeer* conn, DtAssistantLogCb cb, void* usr);
82  static void removeCallback(DtRtiAssistantPeer* conn, DtAssistantLogCb cb, void* usr);
83 
84 protected:
85 
87  virtual DtNetAssistantLogMsg* netAssistantLogMsg();
88  virtual const DtNetAssistantLogMsg* netAssistantLogMsg() const;
89 
92 
94  virtual int minSize() const;
95 
97  virtual void setTextSize( unsigned size );
98 
100  virtual void setNumEntries( unsigned num );
101  virtual unsigned numEntries() const;
102 
104  virtual const DtNetU8* notifyLevelPtr() const;
105  virtual DtNetU8* notifyLevelPtr();
106 
108  virtual const char* textPtr() const;
109  virtual char* textPtr();
110 
112  mutable const char* myNextTextPtr;
113 
115  mutable unsigned myNextNum;
116 
117 };
118 
119 #endif

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)