EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EVEUnmarshal.h File Reference
#include "python/PyRep.h"
Include dependency graph for EVEUnmarshal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UnmarshalStream
 Class which turns marshal bytecode into Python object. More...
 

Functions

PyRepUnmarshal (const Buffer &data)
 Turns marshal stream into Python object. More...
 
PyRepInflateUnmarshal (const Buffer &data)
 Turns possibly inflated marshal stream into Python object. More...
 

Function Documentation

PyRep* InflateUnmarshal ( const Buffer data)

Turns possibly inflated marshal stream into Python object.

Parameters
[in]dataPossibly inflated marshal stream.
Returns
Ownership of Python object.

Definition at line 46 of file EVEUnmarshal.cpp.

References InflateData(), IsDeflated(), and Unmarshal().

Referenced by marshal_EVEMarshalTest(), EVETCPConnection::PopRep(), and UnmarshalLogText().

47 {
48  if (IsDeflated(data)) {
49  Buffer inflatedData;
50  if (!InflateData(data, inflatedData))
51  return nullptr;
52  return Unmarshal(inflatedData);
53  }
54 
55  return Unmarshal(data);
56 }
Generic class for buffers.
Definition: Buffer.h:40
bool IsDeflated(const Buffer &data)
Checks whether given data is deflated.
Definition: Deflate.cpp:32
PyRep * Unmarshal(const Buffer &data)
Turns marshal stream into Python object.
bool InflateData(Buffer &data)
Inflates given data.
Definition: Deflate.cpp:68

Here is the call graph for this function:

Here is the caller graph for this function:

PyRep* Unmarshal ( const Buffer data)

Turns marshal stream into Python object.

Parameters
[in]dataMarshal stream.
Returns
Ownership of Python object.

Definition at line 38 of file EVEUnmarshal.cpp.

References UnmarshalStream::Load(), and SafeDelete().

Referenced by PySubStream::DecodeData(), and InflateUnmarshal().

39 {
40  UnmarshalStream* pUMS = new UnmarshalStream();
41  PyRep* res = pUMS->Load( data );
42  SafeDelete(pUMS);
43  return res;
44 }
Base Python wire object.
Definition: PyRep.h:66
PyRep * Load(const Buffer &data)
Loads Python object from given bytecode.
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
Definition: SafeMem.h:83
Class which turns marshal bytecode into Python object.
Definition: EVEUnmarshal.h:54

Here is the call graph for this function:

Here is the caller graph for this function: