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

Python's "none". More...

#include "PyRep.h"

Inheritance diagram for PyNone:
Collaboration diagram for PyNone:

Public Member Functions

 PyNone ()
 
 PyNone (const PyNone &oth)
 
 PyNone (PyNone &&oth)=delete
 
PyNoneoperator= (const PyNone &oth)=delete
 
PyNoneoperator= (PyNone &&oth)=delete
 
PyRepClone () const
 Clones object. More...
 
bool visit (PyVisitor &v) const
 Visits object. More...
 
int32 hash () const
 virtual function to generate a hash value of a object. More...
 
- 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...
 
- 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 ~PyNone ()
 
- 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...
 

Additional Inherited Members

- 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...
 
- Static Public Member Functions inherited from PyRep
static std::string StringContent (PyRep *pRep)
 
static int64 IntegerValue (PyRep *pRep)
 
static uint32 IntegerValueU32 (PyRep *pRep)
 
- Protected Attributes inherited from PyRep
const PyType mType
 
- Protected Attributes inherited from RefObject
size_t mRefCount
 Reference count of instance. More...
 
bool mDeleted
 

Detailed Description

Python's "none".

Class which represents Python's "nothing".

Definition at line 352 of file PyRep.h.

Constructor & Destructor Documentation

PyNone::PyNone ( )

Definition at line 336 of file PyRep.cpp.

Referenced by Clone().

336 : PyRep( PyRep::PyTypeNone ) {}
PyRep(PyType t)
Definition: PyRep.cpp:73

Here is the caller graph for this function:

PyNone::PyNone ( const PyNone oth)

Definition at line 337 of file PyRep.cpp.

337 : PyRep( PyRep::PyTypeNone ) {}
PyRep(PyType t)
Definition: PyRep.cpp:73
PyNone::PyNone ( PyNone &&  oth)
delete
virtual PyNone::~PyNone ( )
inlineprotectedvirtual

Definition at line 372 of file PyRep.h.

372 { /* do we need to do anything here? */ }

Member Function Documentation

PyRep * PyNone::Clone ( ) const
virtual

Clones object.

Returns
Indentical copy of object.

Implements PyRep.

Definition at line 339 of file PyRep.cpp.

References PyNone().

340 {
341  return new PyNone( *this );
342 }
PyNone()
Definition: PyRep.cpp:336

Here is the call graph for this function:

int32 PyNone::hash ( ) const
virtual

virtual function to generate a hash value of a object.

virtual function to generate a hash value of a object to facilitate the various maps and checks.

Returns
returns a uint32 containing a hash function that represents the object.

Reimplemented from PyRep.

Definition at line 349 of file PyRep.cpp.

350 {
351  /* damn hack... bleh.. but its done like this... in python a PyNone is a static singleton....*/
352  int32* hash = (int32*)this;
353  return *((int32*)&hash);
354 }
int32 hash() const
virtual function to generate a hash value of a object.
Definition: PyRep.cpp:349
signed __int32 int32
Definition: eve-compat.h:49
PyNone& PyNone::operator= ( const PyNone oth)
delete
PyNone& PyNone::operator= ( PyNone &&  oth)
delete
bool PyNone::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 344 of file PyRep.cpp.

References PyVisitor::VisitNone().

345 {
346  return v.VisitNone( this );
347 }
virtual bool VisitNone(const PyNone *rep)
Definition: PyVisitor.h:59

Here is the call graph for this function:


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