EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PyDumpVisitor Class Referenceabstract

#include "PyDumpVisitor.h"

Inheritance diagram for PyDumpVisitor:
Collaboration diagram for PyDumpVisitor:

Public Member Functions

 PyDumpVisitor (const char *pfx="", bool full_nested=false)
 
bool fullNested () const
 
- Public Member Functions inherited from PyPfxVisitor
 PyPfxVisitor (const char *pfx="")
 
- Public Member Functions inherited from PyVisitor
virtual ~PyVisitor ()
 

Protected Member Functions

virtual void _print (const char *fmt,...)=0
 
virtual void _dump (const char *pfx, const uint8 *data, size_t len)=0
 
bool VisitInteger (const PyInt *rep)
 primitive data visitors More...
 
bool VisitLong (const PyLong *rep)
 
bool VisitReal (const PyFloat *rep)
 
bool VisitBoolean (const PyBool *rep)
 
bool VisitNone (const PyNone *rep)
 
bool VisitBuffer (const PyBuffer *rep)
 
bool VisitString (const PyString *rep)
 
bool VisitWString (const PyWString *rep)
 
bool VisitToken (const PyToken *rep)
 
bool VisitTuple (const PyTuple *rep)
 the nested types Visitor More...
 
bool VisitList (const PyList *rep)
 
bool VisitDict (const PyDict *rep)
 
bool VisitObject (const PyObject *rep)
 Object type visitor. More...
 
bool VisitObjectEx (const PyObjectEx *rep)
 
bool VisitPackedRow (const PyPackedRow *rep)
 PackedRow type visitor. More...
 
bool VisitSubStruct (const PySubStruct *rep)
 wrapper types Visitor More...
 
bool VisitSubStream (const PySubStream *rep)
 
bool VisitChecksumedStream (const PyChecksumedStream *rep)
 
- Protected Member Functions inherited from PyPfxVisitor
const char * _pfx () const
 
void _pfxExtend (const char *fmt,...)
 
void _pfxWithdraw ()
 

Private Attributes

const bool mFullNested
 

Additional Inherited Members

- Protected Attributes inherited from PyPfxVisitor
std::stack< std::string > mPfxStack
 

Detailed Description

Definition at line 31 of file PyDumpVisitor.h.

Constructor & Destructor Documentation

PyDumpVisitor::PyDumpVisitor ( const char *  pfx = "",
bool  full_nested = false 
)

Definition at line 37 of file PyDumpVisitor.cpp.

37 : PyPfxVisitor( pfx ), mFullNested( full_nested ) {}
const bool mFullNested
Definition: PyDumpVisitor.h:70
PyPfxVisitor(const char *pfx="")
Definition: PyVisitor.cpp:143

Member Function Documentation

virtual void PyDumpVisitor::_dump ( const char *  pfx,
const uint8 data,
size_t  len 
)
protectedpure virtual

Implemented in PyFileDumpVisitor, and PyLogDumpVisitor.

Referenced by VisitBuffer().

Here is the caller graph for this function:

virtual void PyDumpVisitor::_print ( const char *  fmt,
  ... 
)
protectedpure virtual
bool PyDumpVisitor::fullNested ( ) const
inline

Definition at line 36 of file PyDumpVisitor.h.

References mFullNested.

Referenced by VisitDict(), VisitList(), VisitObjectEx(), and VisitTuple().

36 { return mFullNested; }
const bool mFullNested
Definition: PyDumpVisitor.h:70

Here is the caller graph for this function:

bool PyDumpVisitor::VisitBoolean ( const PyBool rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 57 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), and PyBool::value().

58 {
59  _print( "%s Boolean: %s", _pfx(), rep->value() ? "true" : "false" );
60  return true;
61 }
bool value() const
Definition: PyRep.h:340
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitBuffer ( const PyBuffer rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 69 of file PyDumpVisitor.cpp.

References _dump(), PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyBuffer::content(), and Buffer::size().

70 {
71  _print( "%s Buffer (%lu):", _pfx(), rep->content().size() );
72 
73  _pfxExtend( " " );
74  _dump( _pfx(), &rep->content()[ 0 ], rep->content().size() );
75  _pfxWithdraw();
76 
77  return true;
78 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
const Buffer & content() const
Get the const PyBuffer content.
Definition: PyRep.h:407
void _pfxWithdraw()
Definition: PyVisitor.h:91
virtual void _dump(const char *pfx, const uint8 *data, size_t len)=0
size_type size() const
Definition: Buffer.h:610
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitChecksumedStream ( const PyChecksumedStream rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 322 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyChecksumedStream::checksum(), and PyVisitor::VisitChecksumedStream().

323 {
324  _print( "%sChecksumStream: 0x%08x", _pfx(), rep->checksum() );
325 
326  _pfxExtend( " " );
327  bool res = PyVisitor::VisitChecksumedStream( rep );
328  _pfxWithdraw();
329 
330  return res;
331 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
void _pfxWithdraw()
Definition: PyVisitor.h:91
uint32 checksum() const
Definition: PyRep.h:1082
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0
virtual bool VisitChecksumedStream(const PyChecksumedStream *rep)
Definition: PyVisitor.cpp:133

Here is the call graph for this function:

bool PyDumpVisitor::VisitDict ( const PyDict rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 158 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyDict::begin(), PyDict::empty(), PyDict::end(), fullNested(), and PyDict::size().

159 {
160  if (rep->empty())
161  _print( "%s Dictionary: Empty", _pfx() );
162  else {
163  _print( "%s Dictionary: %lu entries", _pfx(), rep->size() );
164 
165  PyDict::const_iterator cur = rep->begin(), end = rep->end();
166  for ( uint32 i = 0; cur != end; ++cur, ++i ) {
167  if (i > 100 && !fullNested() ) {
168  _print( "%s ... truncated ...", _pfx() );
169  break;
170  }
171 
172  _pfxExtend( " [%2u] Key: ", i );
173  bool res = cur->first->visit( *this );
174  _pfxWithdraw();
175 
176  if (!res )
177  return false;
178 
179  _pfxExtend( " [%2u] Value: ", i );
180  res = cur->second->visit( *this );
181  _pfxWithdraw();
182 
183  if (!res )
184  return false;
185  }
186  }
187  return true;
188 }
bool empty() const
Definition: PyRep.h:770
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
void _pfxWithdraw()
Definition: PyVisitor.h:91
size_t size() const
Definition: PyRep.h:769
bool fullNested() const
Definition: PyDumpVisitor.h:36
unsigned __int32 uint32
Definition: eve-compat.h:50
const_iterator begin() const
Definition: PyRep.h:766
storage_type::const_iterator const_iterator
Definition: PyRep.h:750
const_iterator end() const
Definition: PyRep.h:767
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitInteger ( const PyInt rep)
protectedvirtual

primitive data visitors

Reimplemented from PyVisitor.

Reimplemented in PyLookupDumpVisitor.

Definition at line 39 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), and PyInt::value().

Referenced by PyLookupDumpVisitor::VisitInteger().

40 {
41  _print( "%s Integer: %i", _pfx(), rep->value() );
42  return true;
43 }
int32 value() const
Definition: PyRep.h:247
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

Here is the caller graph for this function:

bool PyDumpVisitor::VisitList ( const PyList rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 133 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyList::begin(), PyList::empty(), PyList::end(), fullNested(), and PyList::size().

134 {
135  bool res(true);
136  if (rep->empty())
137  _print( "%s List: Empty", _pfx() );
138  else {
139  _print( "%s List: %lu elements", _pfx(), rep->size() );
140 
141  PyList::const_iterator cur = rep->begin(), end = rep->end();
142  for ( uint32 i = 0; cur != end; ++cur, ++i ) {
143  if (*cur == nullptr)
144  continue;
145  if (i > 100 && !fullNested()) {
146  _print( "%s ... truncated ...", _pfx() );
147  break;
148  }
149 
150  _pfxExtend( " [%2u] ", i );
151  res = (*cur)->visit( *this );
152  _pfxWithdraw();
153  }
154  }
155  return res;
156 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
const_iterator begin() const
Definition: PyRep.h:660
void _pfxWithdraw()
Definition: PyVisitor.h:91
storage_type::const_iterator const_iterator
Definition: PyRep.h:644
bool fullNested() const
Definition: PyDumpVisitor.h:36
unsigned __int32 uint32
Definition: eve-compat.h:50
const_iterator end() const
Definition: PyRep.h:661
size_t size() const
Definition: PyRep.h:663
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0
bool empty() const
Definition: PyRep.h:664

Here is the call graph for this function:

bool PyDumpVisitor::VisitLong ( const PyLong rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 45 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), PRIi64, and PyLong::value().

46 {
47  _print( "%s Long: %" PRIi64, _pfx(), rep->value() );
48  return true;
49 }
int64 value() const
Definition: PyRep.h:278
#define PRIi64
Definition: eve-compat.h:83
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitNone ( const PyNone rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 63 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), and _print().

64 {
65  _print( "%s None", _pfx() );
66  return true;
67 }
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitObject ( const PyObject rep)
protectedvirtual

Object type visitor.

Reimplemented from PyVisitor.

Definition at line 190 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyObject::arguments(), PyObject::type(), PyRep::visit(), and PyString::visit().

191 {
192  _print( "%sObject:", _pfx() );
193 
194  _pfxExtend( " Type: " );
195  bool res = rep->type()->visit( *this );
196  _pfxWithdraw();
197 
198  if (!res )
199  return false;
200 
201  _pfxExtend( " Args: " );
202  res = rep->arguments()->visit( *this );
203  _pfxWithdraw();
204 
205  return res;
206 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
void _pfxWithdraw()
Definition: PyVisitor.h:91
bool visit(PyVisitor &v) const
Visits object.
Definition: PyRep.cpp:455
PyRep * arguments() const
Definition: PyRep.h:845
PyString * type() const
Definition: PyRep.h:844
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0
virtual bool visit(PyVisitor &v) const =0
Visits object.

Here is the call graph for this function:

bool PyDumpVisitor::VisitObjectEx ( const PyObjectEx rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 208 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyList::begin(), PyDict::begin(), PyObjectEx::dict(), PyList::empty(), PyDict::empty(), PyList::end(), PyDict::end(), fullNested(), PyObjectEx::header(), PyObjectEx::isType2(), PyObjectEx::list(), and PyRep::visit().

209 {
210  _print( "%s ObjectEx%s:", _pfx(), rep->isType2() ? "2" : "1" );
211 
212  _print( "%s Header:", _pfx() );
213  if (rep->header() == nullptr ) {
214  _print( "%s (None)", _pfx() );
215  } else {
216  _pfxExtend( " " );
217  bool res = rep->header()->visit( *this );
218  _pfxWithdraw();
219 
220  if (!res )
221  return false;
222  }
223 
224  _print( "%s List:", _pfx() );
225  if (rep->list().empty()) {
226  _print( "%s Empty", _pfx() );
227  } else {
228  PyObjectEx::const_list_iterator cur = rep->list().begin(), end = rep->list().end();
229  for( uint32 i = 0; cur != end; ++cur, ++i ) {
230  if (*cur == nullptr)
231  continue;
232  if (i > 100 && !fullNested() ) {
233  _print( "%s ... truncated ...", _pfx() );
234  break;
235  }
236 
237  _pfxExtend( " [%2u] ", i );
238  bool res = (*cur)->visit( *this );
239  _pfxWithdraw();
240 
241  if (!res )
242  return false;
243  }
244  }
245 
246  _print( "%s Dict:", _pfx() );
247  if (rep->dict().empty()) {
248  _print( "%s Empty", _pfx() );
249  } else {
250  PyObjectEx::const_dict_iterator cur = rep->dict().begin(), end = rep->dict().end();
251  for( uint32 i = 0; cur != end; ++cur, ++i ) {
252  if (i > 100 && !fullNested() ) {
253  _print( "%s ... truncated ...", _pfx() );
254  break;
255  }
256 
257  _pfxExtend( " [%2u] Key: ", i );
258  bool res = cur->first->visit( *this );
259  _pfxWithdraw();
260 
261  if (!res)
262  return false;
263 
264  _pfxExtend( " [%2u] Value: ", i );
265  res = cur->second->visit( *this );
266  _pfxWithdraw();
267 
268  if (!res)
269  return false;
270  }
271  }
272 
273  return true;
274 }
list_type & list()
Definition: PyRep.h:889
list_type::const_iterator const_list_iterator
Definition: PyRep.h:866
bool empty() const
Definition: PyRep.h:770
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
const_iterator begin() const
Definition: PyRep.h:660
void _pfxWithdraw()
Definition: PyVisitor.h:91
dict_type::const_iterator const_dict_iterator
Definition: PyRep.h:870
dict_type & dict()
Definition: PyRep.h:892
bool fullNested() const
Definition: PyDumpVisitor.h:36
unsigned __int32 uint32
Definition: eve-compat.h:50
const_iterator begin() const
Definition: PyRep.h:766
const_iterator end() const
Definition: PyRep.h:661
bool isType2() const
Definition: PyRep.h:887
PyRep * header() const
Definition: PyRep.h:886
const_iterator end() const
Definition: PyRep.h:767
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0
bool empty() const
Definition: PyRep.h:664
virtual bool visit(PyVisitor &v) const =0
Visits object.

Here is the call graph for this function:

bool PyDumpVisitor::VisitPackedRow ( const PyPackedRow rep)
protectedvirtual

PackedRow type visitor.

Reimplemented from PyVisitor.

Definition at line 276 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyPackedRow::begin(), DBRowDescriptor::ColumnCount(), PyString::content(), PyPackedRow::end(), DBRowDescriptor::GetColumnName(), and PyPackedRow::header().

277 {
278  _print( "%sPacked Row:", _pfx() );
279  _print( "%scolumn_count=%u", _pfx(), rep->header()->ColumnCount() );
280 
281  PyPackedRow::const_iterator cur = rep->begin(), end = rep->end();
282  for (uint32 i = 0; cur != end; ++cur, ++i) {
283  _pfxExtend( " [%2u] %s: ", i, rep->header()->GetColumnName( i )->content().c_str() );
284 
285  bool res(true);
286  if ((*cur) == nullptr )
287  _print( "%s (None)", _pfx() );
288  else
289  res = (*cur)->visit( *this );
290 
291  _pfxWithdraw();
292 
293  if (!res)
294  return false;
295  }
296 
297  return true;
298 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
DBRowDescriptor * header() const
Definition: PyRep.h:983
void _pfxWithdraw()
Definition: PyVisitor.h:91
PyString * GetColumnName(uint32 index) const
Definition: PyDatabase.cpp:65
uint32 ColumnCount() const
Definition: PyDatabase.cpp:60
storage_type::const_iterator const_iterator
Definition: PyRep.h:966
const_iterator begin() const
Definition: PyRep.h:986
unsigned __int32 uint32
Definition: eve-compat.h:50
const_iterator end() const
Definition: PyRep.h:987
const std::string & content() const
Get the PyString content.
Definition: PyRep.h:458
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitReal ( const PyFloat rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 51 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), and PyFloat::value().

52 {
53  _print( "%s Real: %f", _pfx(), rep->value() );
54  return true;
55 }
double value() const
Definition: PyRep.h:309
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitString ( const PyString rep)
protectedvirtual

Reimplemented from PyVisitor.

Reimplemented in PyLookupDumpVisitor.

Definition at line 80 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), PyString::content(), and IsPrintable().

Referenced by PyLookupDumpVisitor::VisitString().

81 {
82  if (IsPrintable( rep ) )
83  _print( "%s String: '%s'", _pfx(), rep->content().c_str() );
84  else
85  _print( "%sBinary String: (len=%lu)", _pfx(), rep->content().length() );
86 
87  return true;
88 }
bool IsPrintable(const PyString *str)
Checks whether string is printable.
Definition: EVEUtils.cpp:31
const std::string & content() const
Get the PyString content.
Definition: PyRep.h:458
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

Here is the caller graph for this function:

bool PyDumpVisitor::VisitSubStream ( const PySubStream rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 311 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PySubStream::decoded(), and PyVisitor::VisitSubStream().

312 {
313  _print( "%s Substream: %s", _pfx(), ( rep->decoded() == nullptr ) ? "from data" : "from rep" );
314 
315  _pfxExtend( " " );
316  bool res = PyVisitor::VisitSubStream( rep );
317  _pfxWithdraw();
318 
319  return res;
320 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
virtual bool VisitSubStream(const PySubStream *rep)
Definition: PyVisitor.cpp:119
void _pfxWithdraw()
Definition: PyVisitor.h:91
PyRep * decoded() const
Definition: PyRep.h:1048
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitSubStruct ( const PySubStruct rep)
protectedvirtual

wrapper types Visitor

Reimplemented from PyVisitor.

Definition at line 300 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), and PyVisitor::VisitSubStruct().

301 {
302  _print( "%s Substruct:", _pfx() );
303 
304  _pfxExtend( " " );
305  bool res = PyVisitor::VisitSubStruct( rep );
306  _pfxWithdraw();
307 
308  return res;
309 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
void _pfxWithdraw()
Definition: PyVisitor.h:91
virtual bool VisitSubStruct(const PySubStruct *rep)
wrapper types Visitor
Definition: PyVisitor.cpp:112
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitToken ( const PyToken rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 101 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), and PyToken::content().

102 {
103  _print( "%s Token: '%s'", _pfx(), rep->content().c_str() );
104 
105  return true;
106 }
const std::string & content() const
Obtain token.
Definition: PyRep.h:555
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitTuple ( const PyTuple rep)
protectedvirtual

the nested types Visitor

Reimplemented from PyVisitor.

Definition at line 108 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), PyPfxVisitor::_pfxExtend(), PyPfxVisitor::_pfxWithdraw(), _print(), PyTuple::begin(), PyTuple::empty(), PyTuple::end(), fullNested(), and PyTuple::size().

109 {
110  bool res(true);
111  if (rep->empty())
112  _print( "%s Tuple: Empty", _pfx() );
113  else {
114  _print( "%s Tuple: %lu elements", _pfx(), rep->size() );
115 
116  PyTuple::const_iterator cur = rep->begin(), end = rep->end();
117  for ( uint32 i = 0; cur != end; ++cur, ++i ) {
118  if (*cur == nullptr)
119  continue;
120  if (i > 100 && !fullNested()) {
121  _print( "%s ... truncated ...", _pfx() );
122  break;
123  }
124 
125  _pfxExtend( " [%2u] ", i );
126  res = (*cur)->visit( *this );
127  _pfxWithdraw();
128  }
129  }
130  return res;
131 }
void _pfxExtend(const char *fmt,...)
Definition: PyVisitor.cpp:148
size_t size() const
Definition: PyRep.h:591
bool empty() const
Definition: PyRep.h:592
storage_type::const_iterator const_iterator
Definition: PyRep.h:572
void _pfxWithdraw()
Definition: PyVisitor.h:91
bool fullNested() const
Definition: PyDumpVisitor.h:36
unsigned __int32 uint32
Definition: eve-compat.h:50
const_iterator end() const
Definition: PyRep.h:589
const_iterator begin() const
Definition: PyRep.h:588
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

bool PyDumpVisitor::VisitWString ( const PyWString rep)
protectedvirtual

Reimplemented from PyVisitor.

Definition at line 90 of file PyDumpVisitor.cpp.

References PyPfxVisitor::_pfx(), _print(), PyWString::content(), and IsPrintable().

91 {
92  // how to do it correctly?
93  if (IsPrintable( rep ) )
94  _print( "%s WString: '%s'", _pfx(), rep->content().c_str() );
95  else
96  _print( "%ssBinary WString: (len=%lu)'", _pfx(), rep->content().length() );
97 
98  return true;
99 }
const std::string & content() const
Get the PyWString content.
Definition: PyRep.h:499
bool IsPrintable(const PyString *str)
Checks whether string is printable.
Definition: EVEUtils.cpp:31
const char * _pfx() const
Definition: PyVisitor.h:89
virtual void _print(const char *fmt,...)=0

Here is the call graph for this function:

Member Data Documentation

const bool PyDumpVisitor::mFullNested
private

Definition at line 70 of file PyDumpVisitor.h.

Referenced by fullNested().


The documentation for this class was generated from the following files: