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

Python object "exceptions.GPSTransportClosed". More...

#include "PyExceptions.h"

Inheritance diagram for GPSTransportClosed:
Collaboration diagram for GPSTransportClosed:

Public Member Functions

 GPSTransportClosed (const char *reason)
 
 GPSTransportClosed (std::string &reason)
 
void AddKeyword (const char *name, PyRep *value)
 Adds keyword to exception. More...
 
PyDictGetReasonArgs () const
 
- Public Member Functions inherited from PyObjectEx_Type1
 PyObjectEx_Type1 (PyToken *type, PyTuple *args, bool enclosed=false)
 
 PyObjectEx_Type1 (PyObjectEx_Type1 *args1, PyTuple *args2, bool enclosed=false)
 
 PyObjectEx_Type1 (PyToken *type, PyTuple *args, PyDict *keywords, bool enclosed=false)
 
 PyObjectEx_Type1 (PyToken *type, PyTuple *args, PyList *keywords, bool enclosed=false)
 
PyTokenGetType () const
 
PyTupleGetArgs () const
 
PyDictGetKeywords () const
 
PyRepFindKeyword (const char *keyword) const
 
- Public Member Functions inherited from PyObjectEx
 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 ()
 

Static Protected Member Functions

static PyTuple_CreateArgs (const char *reason)
 
static PyDict_CreateKeywords (const char *reason)
 
- Static Protected Member Functions inherited from PyObjectEx_Type1
static PyTuple_CreateHeader (PyToken *type, PyTuple *args, bool enclosed=false)
 
static PyTuple_CreateHeader (PyObjectEx_Type1 *args1, PyTuple *args2, bool enclosed=false)
 
static PyTuple_CreateHeader (PyToken *type, PyTuple *args, PyDict *keywords, bool enclosed=false)
 
static PyTuple_CreateHeader (PyToken *type, PyTuple *args, PyList *keywords, bool enclosed=false)
 

Additional Inherited Members

- Public Types inherited from PyObjectEx
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...
 
- Static Public Member Functions inherited from PyRep
static std::string StringContent (PyRep *pRep)
 
static int64 IntegerValue (PyRep *pRep)
 
static uint32 IntegerValueU32 (PyRep *pRep)
 
- Protected Member Functions inherited from PyObjectEx_Type1
virtual ~PyObjectEx_Type1 ()
 
- Protected Member Functions inherited from PyObjectEx
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 inherited from PyObjectEx
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
 

Detailed Description

Python object "exceptions.GPSTransportClosed".

This exception is used when refusing client login.

Author
Bloody.Rabbit

Definition at line 59 of file PyExceptions.h.

Constructor & Destructor Documentation

GPSTransportClosed::GPSTransportClosed ( const char *  reason)

Definition at line 46 of file PyExceptions.cpp.

47 : PyObjectEx_Type1( new PyToken( "exceptions.GPSTransportClosed" ), _CreateArgs( reason ), _CreateKeywords( reason ) )
48 {
49 }
static PyTuple * _CreateArgs(const char *reason)
PyObjectEx_Type1(PyToken *type, PyTuple *args, bool enclosed=false)
Definition: PyRep.cpp:820
static PyDict * _CreateKeywords(const char *reason)
Python token (eg. class name).
Definition: PyRep.h:522
GPSTransportClosed::GPSTransportClosed ( std::string &  reason)

Definition at line 51 of file PyExceptions.cpp.

52 : PyObjectEx_Type1( new PyToken( "exceptions.GPSTransportClosed" ), _CreateArgs( reason.c_str() ), _CreateKeywords( reason.c_str() ) )
53 {
54 
55 }
static PyTuple * _CreateArgs(const char *reason)
PyObjectEx_Type1(PyToken *type, PyTuple *args, bool enclosed=false)
Definition: PyRep.cpp:820
static PyDict * _CreateKeywords(const char *reason)
Python token (eg. class name).
Definition: PyRep.h:522

Member Function Documentation

PyTuple * GPSTransportClosed::_CreateArgs ( const char *  reason)
staticprotected

Definition at line 69 of file PyExceptions.cpp.

References args, and PyTuple::SetItem().

70 {
71  PyTuple* args = new PyTuple( 1 );
72  args->SetItem( 0, new PyString( reason ) );
73 
74  return args;
75 }
Python string.
Definition: PyRep.h:430
Python tuple.
Definition: PyRep.h:567
* args
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610

Here is the call graph for this function:

PyDict * GPSTransportClosed::_CreateKeywords ( const char *  reason)
staticprotected

Definition at line 77 of file PyExceptions.cpp.

References EVEBuildVersion, EVEProjectCodename, EVEProjectRegion, EVEVersionNumber, GetFileTimeNow(), MachoNetVersion, and PyDict::SetItemString().

78 {
79  PyDict* keywords = new PyDict;
80  //keywords->SetItemString( "origin", new PyString( "proxy" ) );
81  keywords->SetItemString( "reasonArgs", new PyDict );
82  keywords->SetItemString( "clock", new PyLong( GetFileTimeNow() ) );
83  //keywords->SetItemString( "loggedOnUserCount", );
84  keywords->SetItemString( "region", new PyString( EVEProjectRegion ) );
85  keywords->SetItemString( "reason", new PyString( reason ) );
86  keywords->SetItemString( "version", new PyFloat( EVEVersionNumber ) );
87  keywords->SetItemString( "build", new PyInt( EVEBuildVersion ) );
88  //keywords->SetItemString( "reasonCode", );
89  keywords->SetItemString( "codename", new PyString( EVEProjectCodename ) );
90  keywords->SetItemString( "machoVersion", new PyInt( MachoNetVersion ) );
91 
92  return keywords;
93 }
Python string.
Definition: PyRep.h:430
static const char *const EVEProjectCodename
Definition: EVEVersion.h:37
Python's dictionary.
Definition: PyRep.h:719
Python floating point number.
Definition: PyRep.h:292
static const uint16 MachoNetVersion
Definition: EVEVersion.h:33
static const double EVEVersionNumber
Definition: EVEVersion.h:32
static const int32 EVEBuildVersion
Definition: EVEVersion.h:34
Python integer.
Definition: PyRep.h:231
double GetFileTimeNow()
Definition: utils_time.cpp:84
static const char *const EVEProjectRegion
Definition: EVEVersion.h:35
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812
Python long integer.
Definition: PyRep.h:261

Here is the call graph for this function:

void GPSTransportClosed::AddKeyword ( const char *  name,
PyRep value 
)

Adds keyword to exception.

Parameters
[in]nameThe keyword.
[in]valueValue to be associated with the keyword.

Definition at line 56 of file PyExceptions.cpp.

References GetReasonArgs(), and PyDict::SetItemString().

57 {
58  GetReasonArgs()->SetItemString( name, value );
59 }
PyDict * GetReasonArgs() const
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812

Here is the call graph for this function:

PyDict * GPSTransportClosed::GetReasonArgs ( ) const

Definition at line 61 of file PyExceptions.cpp.

References PyRep::AsDict(), and PyObjectEx_Type1::FindKeyword().

Referenced by AddKeyword().

62 {
63  PyRep* r = FindKeyword( "reasonArgs" );
64  assert( r );
65 
66  return r->AsDict();
67 }
Base Python wire object.
Definition: PyRep.h:66
PyDict * AsDict()
Definition: PyRep.h:142
PyRep * FindKeyword(const char *keyword) const
Definition: PyRep.cpp:853

Here is the call graph for this function:

Here is the caller graph for this function:


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