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

#include "PyLookupDump.h"

Inheritance diagram for PyLookupDumpVisitor:
Collaboration diagram for PyLookupDumpVisitor:

Public Member Functions

 PyLookupDumpVisitor (PyLookupResolver *_resolver, LogType log_type, LogType log_hex_type, const char *pfx="", bool full_nested=false, bool full_hex=false)
 
PyLookupResolverresolver () const
 
- Public Member Functions inherited from PyLogDumpVisitor
 PyLogDumpVisitor (LogType log_type, LogType log_hex_type, const char *pfx="", bool full_nested=false, bool full_hex=false)
 
bool fullHex () const
 
LogType logType () const
 
LogType logHexType () const
 
- Public Member Functions inherited from PyDumpVisitor
 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

bool VisitInteger (const PyInt *rep)
 primitive data visitors More...
 
bool VisitString (const PyString *rep)
 
- Protected Member Functions inherited from PyLogDumpVisitor
void _print (const char *fmt,...)
 
void _dump (const char *pfx, const uint8 *data, size_t len)
 
- Protected Member Functions inherited from PyDumpVisitor
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 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

PyLookupResolver *const mResolver
 

Additional Inherited Members

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

Detailed Description

Definition at line 46 of file PyLookupDump.h.

Constructor & Destructor Documentation

PyLookupDumpVisitor::PyLookupDumpVisitor ( PyLookupResolver _resolver,
LogType  log_type,
LogType  log_hex_type,
const char *  pfx = "",
bool  full_nested = false,
bool  full_hex = false 
)

Definition at line 35 of file PyLookupDump.cpp.

36 : PyLogDumpVisitor( log_type, log_hex_type, pfx, full_nested, full_hex ),
37  mResolver( _resolver )
38 {
39 }
PyLogDumpVisitor(LogType log_type, LogType log_hex_type, const char *pfx="", bool full_nested=false, bool full_hex=false)
PyLookupResolver *const mResolver
Definition: PyLookupDump.h:58

Member Function Documentation

PyLookupResolver* PyLookupDumpVisitor::resolver ( ) const
inline

Definition at line 51 of file PyLookupDump.h.

References mResolver.

Referenced by VisitInteger(), and VisitString().

51 { return mResolver; }
PyLookupResolver *const mResolver
Definition: PyLookupDump.h:58

Here is the caller graph for this function:

bool PyLookupDumpVisitor::VisitInteger ( const PyInt rep)
protectedvirtual

primitive data visitors

Reimplemented from PyDumpVisitor.

Definition at line 41 of file PyLookupDump.cpp.

References PyPfxVisitor::_pfx(), PyLogDumpVisitor::_print(), PyLookupResolver::LookupInt(), resolver(), PyInt::value(), and PyDumpVisitor::VisitInteger().

42 {
43  if( !PyLogDumpVisitor::VisitInteger( rep ) )
44  return false;
45 
46  const char* look = resolver()->LookupInt( rep->value() );
47  if( look != NULL )
48  _print( "%s %s", _pfx(), look );
49 
50  return true;
51 }
int32 value() const
Definition: PyRep.h:247
bool VisitInteger(const PyInt *rep)
primitive data visitors
void _print(const char *fmt,...)
PyLookupResolver * resolver() const
Definition: PyLookupDump.h:51
const char * LookupInt(int64 value) const
const char * _pfx() const
Definition: PyVisitor.h:89

Here is the call graph for this function:

bool PyLookupDumpVisitor::VisitString ( const PyString rep)
protectedvirtual

Reimplemented from PyDumpVisitor.

Definition at line 53 of file PyLookupDump.cpp.

References PyPfxVisitor::_pfx(), PyLogDumpVisitor::_print(), PyString::content(), PyLookupResolver::LookupString(), resolver(), and PyDumpVisitor::VisitString().

54 {
55  if( !PyLogDumpVisitor::VisitString( rep ) )
56  return false;
57 
58  const char* look = resolver()->LookupString( rep->content().c_str() );
59  if( look != NULL )
60  _print( "%s %s", _pfx(), look );
61 
62  return true;
63 }
bool VisitString(const PyString *rep)
void _print(const char *fmt,...)
PyLookupResolver * resolver() const
Definition: PyLookupDump.h:51
const char * LookupString(const char *value) const
const std::string & content() const
Get the PyString content.
Definition: PyRep.h:458
const char * _pfx() const
Definition: PyVisitor.h:89

Here is the call graph for this function:

Member Data Documentation

PyLookupResolver* const PyLookupDumpVisitor::mResolver
private

Definition at line 58 of file PyLookupDump.h.

Referenced by resolver().


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