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

Python extended object. More...

#include "PyRep.h"

Inheritance diagram for PyObjectEx:
Collaboration diagram for PyObjectEx:

Public Types

typedef PyList list_type
 
typedef list_type::iterator list_iterator
 
typedef list_type::const_iterator const_list_iterator
 
typedef PyDict dict_type
 
typedef dict_type::iterator dict_iterator
 
typedef dict_type::const_iterator const_dict_iterator
 
- Public Types inherited from PyRep
enum  PyType {
  PyTypeMin = 0, PyTypeInt = 1, PyTypeLong = 2, PyTypeFloat = 3,
  PyTypeBool = 4, PyTypeBuffer = 5, PyTypeString = 6, PyTypeWString = 7,
  PyTypeToken = 8, PyTypeTuple = 9, PyTypeList = 10, PyTypeDict = 11,
  PyTypeNone = 12, PyTypeSubStruct = 13, PyTypeSubStream = 14, PyTypeChecksumedStream = 15,
  PyTypeObject = 16, PyTypeObjectEx = 17, PyTypePackedRow = 18, PyTypeError = 19
}
 Python wire object types. More...
 

Public Member Functions

 PyObjectEx (bool is_type_2, PyRep *header)
 
 PyObjectEx (const PyObjectEx &oth)
 
 PyObjectEx (PyObjectEx &&oth)=delete
 
PyObjectExoperator= (const PyObjectEx &oth)
 
PyObjectExoperator= (PyObjectEx &&oth)=delete
 
PyRepClone () const
 Clones object. More...
 
bool visit (PyVisitor &v) const
 Visits object. More...
 
PyRepheader () const
 
bool isType2 () const
 
list_typelist ()
 
const list_typelist () const
 
dict_typedict ()
 
const dict_typedict () const
 
- Public Member Functions inherited from PyRep
PyType GetType () const
 
bool IsInt () const
 
bool IsLong () const
 
bool IsFloat () const
 
bool IsBool () const
 
bool IsBuffer () const
 
bool IsString () const
 
bool IsWString () const
 
bool IsToken () const
 
bool IsTuple () const
 
bool IsList () const
 
bool IsDict () const
 
bool IsNone () const
 
bool IsSubStruct () const
 
bool IsSubStream () const
 
bool IsChecksumedStream () const
 
bool IsObject () const
 
bool IsObjectEx () const
 
bool IsPackedRow () const
 
const char * TypeString () const
 
PyIntAsInt ()
 
const PyIntAsInt () const
 
PyLongAsLong ()
 
const PyLongAsLong () const
 
PyFloatAsFloat ()
 
const PyFloatAsFloat () const
 
PyBoolAsBool ()
 
const PyBoolAsBool () const
 
PyBufferAsBuffer ()
 
const PyBufferAsBuffer () const
 
PyStringAsString ()
 
const PyStringAsString () const
 
PyWStringAsWString ()
 
const PyWStringAsWString () const
 
PyTokenAsToken ()
 
const PyTokenAsToken () const
 
PyTupleAsTuple ()
 
const PyTupleAsTuple () const
 
PyListAsList ()
 
const PyListAsList () const
 
PyDictAsDict ()
 
const PyDictAsDict () const
 
PyNoneAsNone ()
 
const PyNoneAsNone () const
 
PySubStructAsSubStruct ()
 
const PySubStructAsSubStruct () const
 
PySubStreamAsSubStream ()
 
const PySubStreamAsSubStream () const
 
PyChecksumedStreamAsChecksumedStream ()
 
const PyChecksumedStreamAsChecksumedStream () const
 
PyObjectAsObject ()
 
const PyObjectAsObject () const
 
PyObjectExAsObjectEx ()
 
const PyObjectExAsObjectEx () const
 
PyPackedRowAsPackedRow ()
 
const PyPackedRowAsPackedRow () const
 
void Dump (FILE *into, const char *pfx) const
 Dumps object to file. More...
 
void Dump (LogType type, const char *pfx) const
 Dumps object to console. More...
 
virtual int32 hash () const
 virtual function to generate a hash value of a object. More...
 
- Public Member Functions inherited from RefObject
 RefObject (size_t initRefCount)
 Initializes reference count. More...
 
virtual ~RefObject ()
 Destructor; must be virtual. More...
 
size_t GetCount ()
 

Protected Member Functions

virtual ~PyObjectEx ()
 
- Protected Member Functions inherited from PyRep
 PyRep (PyType t)
 
 PyRep (const PyRep &oth)
 
 PyRep (PyRep &&oth)=delete
 
PyRepoperator= (const PyRep &oth)=default
 
PyRepoperator= (PyRep &&oth)=default
 
virtual ~PyRep ()
 
- Protected Member Functions inherited from RefObject
void IncRef () const
 Increments reference count of object by one. More...
 
void DecRef () const
 Decrements reference count of object by one. More...
 

Protected Attributes

PyRep *const mHeader
 
const bool mIsType2
 
list_type *const mList
 
dict_type *const mDict
 
- Protected Attributes inherited from PyRep
const PyType mType
 
- Protected Attributes inherited from RefObject
size_t mRefCount
 Reference count of instance. More...
 
bool mDeleted
 

Additional Inherited Members

- Static Public Member Functions inherited from PyRep
static std::string StringContent (PyRep *pRep)
 
static int64 IntegerValue (PyRep *pRep)
 
static uint32 IntegerValueU32 (PyRep *pRep)
 

Detailed Description

Python extended object.

This represents some kind of extended Python object. Used for opcodes 0x22 (Type1) and 0x23 (Type2), since the only difference is in header.

Definition at line 861 of file PyRep.h.

Member Typedef Documentation

Definition at line 869 of file PyRep.h.

Definition at line 868 of file PyRep.h.

Definition at line 865 of file PyRep.h.

Definition at line 864 of file PyRep.h.

Constructor & Destructor Documentation

PyObjectEx::PyObjectEx ( bool  is_type_2,
PyRep header 
)

Definition at line 786 of file PyRep.cpp.

Referenced by Clone().

787  mHeader(header), mIsType2(is_type_2), mList(new PyList()), mDict(new PyDict()) { }
dict_type *const mDict
Definition: PyRep.h:903
Python's dictionary.
Definition: PyRep.h:719
list_type *const mList
Definition: PyRep.h:902
PyRep *const mHeader
Definition: PyRep.h:899
const bool mIsType2
Definition: PyRep.h:900
PyRep(PyType t)
Definition: PyRep.cpp:73
Python list.
Definition: PyRep.h:639

Here is the caller graph for this function:

PyObjectEx::PyObjectEx ( const PyObjectEx oth)

Definition at line 788 of file PyRep.cpp.

789  mHeader(oth.header()->Clone()), mIsType2(oth.isType2()), mList(new PyList()), mDict(new PyDict()) { }
dict_type *const mDict
Definition: PyRep.h:903
Python's dictionary.
Definition: PyRep.h:719
virtual PyRep * Clone() const =0
Clones object.
list_type *const mList
Definition: PyRep.h:902
PyRep *const mHeader
Definition: PyRep.h:899
const bool mIsType2
Definition: PyRep.h:900
bool isType2() const
Definition: PyRep.h:887
PyRep * header() const
Definition: PyRep.h:886
PyRep(PyType t)
Definition: PyRep.cpp:73
Python list.
Definition: PyRep.h:639
PyObjectEx::PyObjectEx ( PyObjectEx &&  oth)
delete
PyObjectEx::~PyObjectEx ( )
protectedvirtual

Definition at line 791 of file PyRep.cpp.

References mDict, mHeader, mList, PyDecRef, and PySafeDecRef.

792 {
794 
795  PyDecRef( mList );
796  PyDecRef( mDict );
797 }
dict_type *const mDict
Definition: PyRep.h:903
list_type *const mList
Definition: PyRep.h:902
PyRep *const mHeader
Definition: PyRep.h:899
#define PyDecRef(op)
Definition: PyRep.h:57
#define PySafeDecRef(op)
Definition: PyRep.h:61

Member Function Documentation

PyRep * PyObjectEx::Clone ( ) const
virtual

Clones object.

Returns
Indentical copy of object.

Implements PyRep.

Definition at line 799 of file PyRep.cpp.

References PyObjectEx().

800 {
801  return new PyObjectEx( *this );
802 }
PyObjectEx(bool is_type_2, PyRep *header)
Definition: PyRep.cpp:786

Here is the call graph for this function:

dict_type& PyObjectEx::dict ( )
inline
const dict_type& PyObjectEx::dict ( ) const
inline

Definition at line 893 of file PyRep.h.

References mDict.

893 { return *mDict; }
dict_type *const mDict
Definition: PyRep.h:903
PyRep* PyObjectEx::header ( ) const
inline
bool PyObjectEx::isType2 ( ) const
inline

Definition at line 887 of file PyRep.h.

References mIsType2.

Referenced by PyDumpVisitor::VisitObjectEx(), and MarshalStream::VisitObjectEx().

887 { return mIsType2; }
const bool mIsType2
Definition: PyRep.h:900

Here is the caller graph for this function:

list_type& PyObjectEx::list ( )
inline

Definition at line 889 of file PyRep.h.

References mList.

Referenced by CRowSet::GetRow(), CRowSet::GetRowCount(), CIndexedRowSet::GetRowCount(), UnmarshalStream::LoadObjectEx(), CRowSet::NewRow(), operator=(), PyDumpVisitor::VisitObjectEx(), PyVisitor::VisitObjectEx(), and MarshalStream::VisitObjectEx().

889 { return *mList; }
list_type *const mList
Definition: PyRep.h:902

Here is the caller graph for this function:

const list_type& PyObjectEx::list ( ) const
inline

Definition at line 890 of file PyRep.h.

References mList.

890 { return *mList; }
list_type *const mList
Definition: PyRep.h:902
PyObjectEx & PyObjectEx::operator= ( const PyObjectEx oth)

Definition at line 809 of file PyRep.cpp.

References dict(), and list().

810 {
811  list() = oth.list();
812  dict() = oth.dict();
813 
814  return *this;
815 }
list_type & list()
Definition: PyRep.h:889
dict_type & dict()
Definition: PyRep.h:892

Here is the call graph for this function:

PyObjectEx& PyObjectEx::operator= ( PyObjectEx &&  oth)
delete
bool PyObjectEx::visit ( PyVisitor v) const
virtual

Visits object.

Parameters
[in]vVisitor to be used for visiting.
Return values
trueVisit successful.
falseError during visit.

Implements PyRep.

Definition at line 804 of file PyRep.cpp.

References PyVisitor::VisitObjectEx().

Referenced by PyVisitor::VisitPackedRow(), and MarshalStream::VisitPackedRow().

805 {
806  return v.VisitObjectEx( this );
807 }
virtual bool VisitObjectEx(const PyObjectEx *rep)
Definition: PyVisitor.cpp:78

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

dict_type* const PyObjectEx::mDict
protected

Definition at line 903 of file PyRep.h.

Referenced by dict(), and ~PyObjectEx().

PyRep* const PyObjectEx::mHeader
protected

Definition at line 899 of file PyRep.h.

Referenced by header(), and ~PyObjectEx().

const bool PyObjectEx::mIsType2
protected

Definition at line 900 of file PyRep.h.

Referenced by isType2().

list_type* const PyObjectEx::mList
protected

Definition at line 902 of file PyRep.h.

Referenced by list(), and ~PyObjectEx().


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