EvEmu
0.8.4
11 September 2021
|
Base Python wire object. More...
#include "PyRep.h"
Public Types | |
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 | |
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 |
PyInt * | AsInt () |
const PyInt * | AsInt () const |
PyLong * | AsLong () |
const PyLong * | AsLong () const |
PyFloat * | AsFloat () |
const PyFloat * | AsFloat () const |
PyBool * | AsBool () |
const PyBool * | AsBool () const |
PyBuffer * | AsBuffer () |
const PyBuffer * | AsBuffer () const |
PyString * | AsString () |
const PyString * | AsString () const |
PyWString * | AsWString () |
const PyWString * | AsWString () const |
PyToken * | AsToken () |
const PyToken * | AsToken () const |
PyTuple * | AsTuple () |
const PyTuple * | AsTuple () const |
PyList * | AsList () |
const PyList * | AsList () const |
PyDict * | AsDict () |
const PyDict * | AsDict () const |
PyNone * | AsNone () |
const PyNone * | AsNone () const |
PySubStruct * | AsSubStruct () |
const PySubStruct * | AsSubStruct () const |
PySubStream * | AsSubStream () |
const PySubStream * | AsSubStream () const |
PyChecksumedStream * | AsChecksumedStream () |
const PyChecksumedStream * | AsChecksumedStream () const |
PyObject * | AsObject () |
const PyObject * | AsObject () const |
PyObjectEx * | AsObjectEx () |
const PyObjectEx * | AsObjectEx () const |
PyPackedRow * | AsPackedRow () |
const PyPackedRow * | AsPackedRow () 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 PyRep * | Clone () const =0 |
Clones object. More... | |
virtual bool | visit (PyVisitor &v) const =0 |
Visits object. More... | |
virtual int32 | hash () const |
virtual function to generate a hash value of a object. More... | |
![]() | |
RefObject (size_t initRefCount) | |
Initializes reference count. More... | |
virtual | ~RefObject () |
Destructor; must be virtual. More... | |
size_t | GetCount () |
Static Public Member Functions | |
static std::string | StringContent (PyRep *pRep) |
static int64 | IntegerValue (PyRep *pRep) |
static uint32 | IntegerValueU32 (PyRep *pRep) |
Protected Member Functions | |
PyRep (PyType t) | |
PyRep (const PyRep &oth) | |
PyRep (PyRep &&oth)=delete | |
PyRep & | operator= (const PyRep &oth)=default |
PyRep & | operator= (PyRep &&oth)=default |
virtual | ~PyRep () |
![]() | |
void | IncRef () const |
Increments reference count of object by one. More... | |
void | DecRef () const |
Decrements reference count of object by one. More... | |
Protected Attributes | |
const PyType | mType |
![]() | |
size_t | mRefCount |
Reference count of instance. More... | |
bool | mDeleted |
enum PyRep::PyType |
Python wire object types.
Definition at line 72 of file PyRep.h.
|
protected |
-- possibly rewrite to use shared_ptr/unique_ptr, then we can remove the RefObject inheritance here.
Definition at line 73 of file PyRep.cpp.
|
protected |
Definition at line 74 of file PyRep.cpp.
|
protecteddelete |
|
inlineprotectedvirtual |
|
inline |
Definition at line 128 of file PyRep.h.
References IsBool().
Referenced by ClientSession::EncodeChanges(), IntegerValue(), IntegerValueU32(), and MarshalStream::VisitPackedRow().
|
inline |
|
inline |
Definition at line 130 of file PyRep.h.
References IsBuffer().
Referenced by PyTraceLog::_logInternBufferMessage().
|
inline |
Definition at line 131 of file PyRep.h.
References IsBuffer().
|
inline |
Definition at line 150 of file PyRep.h.
References IsChecksumedStream().
Referenced by PyPacket::Decode().
|
inline |
Definition at line 151 of file PyRep.h.
References IsChecksumedStream().
|
inline |
Definition at line 142 of file PyRep.h.
References IsDict().
Referenced by UserError::_GetDictKeywords(), UserError::_GetTupleKeywords(), CorporationDB::AddVoteCase(), CharacterPortrait::Build(), PyPacket::Clone(), PyCallStream::Clone(), PyObjectEx_Type1::GetKeywords(), PyObjectEx_Type2::GetKeywords(), and GPSTransportClosed::GetReasonArgs().
|
inline |
|
inline |
Definition at line 126 of file PyRep.h.
References IsFloat().
Referenced by CharacterAppearance::Build(), CharacterPortrait::Build(), IntegerValue(), IntegerValueU32(), Scan::RequestScans(), CharacterDB::SetAvatar(), CharacterDB::SetAvatarSculpts(), and MarshalStream::VisitPackedRow().
|
inline |
|
inline |
Definition at line 122 of file PyRep.h.
References IsInt().
Referenced by EntityService::CreateBoundObject(), FleetObject::CreateBoundObject(), PosMgr::CreateBoundObject(), PlanetORB::CreateBoundObject(), PlanetMgrService::CreateBoundObject(), RepairService::CreateBoundObject(), ReprocessingService::CreateBoundObject(), CorpStationMgr::CreateBoundObject(), AgentMgrService::CreateBoundObject(), DBRowDescriptor::GetColumnType(), IntegerValue(), IntegerValueU32(), CharacterDB::SetAvatarModifiers(), CharacterDB::SetAvatarSculpts(), and MarshalStream::VisitPackedRow().
|
inline |
|
inline |
Definition at line 140 of file PyRep.h.
References IsList().
Referenced by CorporationDB::AddVoteCase(), CharacterAppearance::Build(), and SetSQLDumper::VisitTuple().
|
inline |
|
inline |
Definition at line 124 of file PyRep.h.
References IsLong().
Referenced by IntegerValue(), IntegerValueU32(), and MarshalStream::VisitPackedRow().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 152 of file PyRep.h.
References IsObject().
Referenced by PyAddress::Decode(), and PyPacket::Decode().
|
inline |
Definition at line 153 of file PyRep.h.
References IsObject().
|
inline |
Definition at line 154 of file PyRep.h.
References IsObjectEx().
Referenced by CRowSet::_GetRowDesc(), CIndexedRowSet::_GetRowDesc(), CFilterRowSet::_GetRowDesc(), and CharacterAppearance::Build().
|
inline |
Definition at line 155 of file PyRep.h.
References IsObjectEx().
|
inline |
Definition at line 156 of file PyRep.h.
References IsPackedRow().
Referenced by CRowSet::GetRow(), CIndexedRowSet::GetRow(), CFilterRowSet::GetRow(), and StaticDataMgr::SetBPMatlType().
|
inline |
Definition at line 157 of file PyRep.h.
References IsPackedRow().
|
inline |
Definition at line 132 of file PyRep.h.
References IsString().
Referenced by PyTraceLog::_logInternBufferPacket(), PyTraceLog::_logInternStringMessage(), DBRowDescriptor::GetColumnName(), UnmarshalStream::LoadObject(), StringContent(), and PyXMLGenerator::VisitDict().
|
inline |
Definition at line 133 of file PyRep.h.
References IsString().
|
inline |
Definition at line 148 of file PyRep.h.
References IsSubStream().
Referenced by PyPacket::Decode().
|
inline |
Definition at line 149 of file PyRep.h.
References IsSubStream().
|
inline |
Definition at line 146 of file PyRep.h.
References IsSubStruct().
|
inline |
Definition at line 147 of file PyRep.h.
References IsSubStruct().
|
inline |
Definition at line 136 of file PyRep.h.
References IsToken().
Referenced by PyObjectEx_Type1::GetType().
|
inline |
|
inline |
Definition at line 138 of file PyRep.h.
References IsTuple().
Referenced by DBRowDescriptor::_GetColumn(), DBRowDescriptor::_GetColumnList(), ClientSession::_GetValueTuple(), EVEClientSession::_HandleCommand(), CharacterAppearance::Build(), CharacterPortrait::Build(), PyPacket::Clone(), PyCallStream::Clone(), EVENotificationStream::Clone(), AllianceRegistry::CreateBoundObject(), CorpRegistryService::CreateBoundObject(), Colony::CreateRoute(), PyAddress::Decode(), PyPacket::Decode(), PyCallStream::Decode(), EVENotificationStream::Decode(), ClientSession::EncodeChanges(), ClientSession::EncodeInitialState(), PyObjectEx_Type1::GetArgs(), PyObjectEx_Type2::GetArgs(), PyObjectEx_Type1::GetKeywords(), PyObjectEx_Type2::GetKeywords(), PyObjectEx_Type1::GetType(), and Scan::RequestScans().
|
inline |
|
inline |
Definition at line 134 of file PyRep.h.
References IsWString().
Referenced by PasswordString::GetPassword(), and StringContent().
|
inline |
Definition at line 135 of file PyRep.h.
References IsWString().
|
pure virtual |
Clones object.
Implemented in PyChecksumedStream, PySubStream, PySubStruct, PyPackedRow, PyObjectEx, PyObject, PyDict, PyList, PyTuple, PyToken, PyWString, PyString, PyBuffer, PyNone, PyBool, PyFloat, PyLong, and PyInt.
Referenced by CachedObjectMgr::_UpdateCache(), PyCachedObject::Clone(), PyCachedCall::Clone(), WarRegistryService::CreateBoundObject(), InvBrokerService::CreateBoundObject(), DogmaIMService::CreateBoundObject(), TradeService::CreateBoundObject(), CharMgrService::CreateBoundObject(), PyCachedCall::Decode(), PyCachedObject::Encode(), PyCachedObjectDecoder::EncodeHint(), CachedObjectMgr::GetCachedObject(), CachedObjectMgr::LoadCachedFromFile(), UnmarshalStream::LoadSavedStreamElement(), and StargateSE::MakeSlimItem().
void PyRep::Dump | ( | FILE * | into, |
const char * | pfx | ||
) | const |
Dumps object to file.
[in] | into | File into which dump should be written. |
[in] | pfx | Prefix which is put in front of each line. |
Definition at line 84 of file PyRep.cpp.
References visit().
Referenced by EVEClientSession::_HandleCommand(), Client::_SendQueuedUpdates(), Client::_VerifyFuncResult(), CorporationDB::AddVoteCase(), PyCallable::Call(), EntityService::CreateBoundObject(), FleetObject::CreateBoundObject(), PosMgr::CreateBoundObject(), AggressionMgrService::CreateBoundObject(), PlanetORB::CreateBoundObject(), RepairService::CreateBoundObject(), SkillMgrService::CreateBoundObject(), PlanetMgrService::CreateBoundObject(), JumpCloneService::CreateBoundObject(), ShipService::CreateBoundObject(), KeeperService::CreateBoundObject(), CharMgrService::CreateBoundObject(), PyAddress::Decode(), PyCallStream::Decode(), EVENotificationStream::Decode(), PyCallArgs::Dump(), PyCachedObject::Dump(), PyCachedObjectDecoder::Dump(), PyCachedCall::Dump(), FleetService::FleetBroadcast(), LiveUpdateDB::GenerateUpdates(), AllianceDB::GetApplications(), CorporationDB::GetApplications(), FleetService::GetAvailableFleets(), Colony::GetColony(), AllianceDB::GetContacts(), CorporationDB::GetContacts(), PlanetSE::GetExtractorsForPlanet(), Agent::GetInfoServiceDetails(), ShipItem::GetLinkedWeapons(), AllianceDB::GetMembers(), AgentBound::GetMissionObjectiveInfo(), AllianceDB::GetMyApplications(), CorporationDB::GetMyApplications(), MarketMgr::GetNewPriceHistory(), MarketMgr::GetOldPriceHistory(), MarketDB::GetOrders(), PlanetSE::GetPlanetInfo(), PlanetSE::GetPlanetResourceInfo(), TowerSE::GetProcessInfo(), PlanetSE::GetResourceData(), ShipItem::GetShipInfo(), AccountDB::GetWalletDivisionsInfo(), FleetService::GetWings(), Inventory::List(), CharacterDB::ListStationBlueprintItems(), CharacterDB::ListStationItems(), CharacterDB::ListStations(), CustomsSE::MakeSlimItem(), StructureSE::MakeSlimItem(), WreckSE::MakeSlimItem(), marshal_EVEMarshalTest(), CachedObjectMgr::OIDToString(), Scan::ProbeScanResult(), Client::QueueDestinyUpdate(), AttributeMap::SendChanges(), FleetService::SendFleetUpdate(), InventoryItem::SendItemChange(), Scan::ShipScanResult(), ActiveModule::ShowEffect(), Scan::SystemScanStarted(), UnmarshalLogText(), and Agent::UpdateStandings().
void PyRep::Dump | ( | LogType | type, |
const char * | pfx | ||
) | const |
Dumps object to console.
[in] | type | Log type to use for dump. |
[in] | pfx | Prefix which is put in front of each line. |
Definition at line 90 of file PyRep.cpp.
References visit().
|
inline |
Definition at line 98 of file PyRep.h.
References mType.
Referenced by PyTraceLog::_logInternBufferPacket(), and PyRowsetReader::iterator::GetType().
|
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.
Reimplemented in PyPackedRow, PyTuple, PyWString, PyString, PyBuffer, PyNone, PyFloat, PyLong, and PyInt.
Definition at line 96 of file PyRep.cpp.
References sLog, and TypeString().
Referenced by ClientSession::_Set(), PyFloat::hash(), PyPackedRow::hash(), PyDict::_hash::operator()(), PyDict::_comp::operator()(), and PyDict::SetItem().
Definition at line 118 of file PyRep.cpp.
References AsBool(), AsFloat(), AsInt(), AsLong(), IsBool(), IsFloat(), IsInt(), IsLong(), PyInt::value(), PyLong::value(), PyFloat::value(), and PyBool::value().
Referenced by PyAddress::_DecodeCallID(), PyAddress::_DecodeObjectID(), CorporationDB::AddVoteCase(), CharacterAppearance::Build(), CharacterPortrait::Build(), AllianceRegistry::CreateBoundObject(), CorpRegistryService::CreateBoundObject(), Colony::CreateRoute(), PyAddress::Decode(), PyPacket::Decode(), PyCallStream::Decode(), EVENotificationStream::Decode(), ClientSession::GetCurrentInt(), ClientSession::GetCurrentLong(), ClientSession::GetLastInt(), ClientSession::GetLastLong(), CorpRegistryBound::GetSearchValues(), PlanetMgr::KillExtractorHead(), PlanetMgr::RemoveLink(), PlanetMgr::RemovePin(), PlanetMgr::RemoveRoute(), PlanetMgr::SetLinkLevel(), PlanetMgr::SetSchematic(), and PlanetMgr::UpgradeCommandCenter().
Definition at line 134 of file PyRep.cpp.
References AsBool(), AsFloat(), AsInt(), AsLong(), IsBool(), IsFloat(), IsInt(), IsLong(), PyInt::value(), PyLong::value(), PyFloat::value(), and PyBool::value().
Referenced by _IoN(), PlanetMgr::CreatePin(), and Scan::RequestScans().
|
inline |
Definition at line 103 of file PyRep.h.
References mType, and PyTypeBool.
Referenced by AsBool(), DBTYPE_IsCompatible(), IntegerValue(), and IntegerValueU32().
|
inline |
Definition at line 104 of file PyRep.h.
References mType, and PyTypeBuffer.
Referenced by AsBuffer(), and DBTYPE_IsCompatible().
|
inline |
Definition at line 114 of file PyRep.h.
References mType, and PyTypeChecksumedStream.
Referenced by AsChecksumedStream(), and PyPacket::Decode().
|
inline |
Definition at line 110 of file PyRep.h.
References mType, and PyTypeDict.
Referenced by AsDict(), and PyCachedCall::Decode().
|
inline |
Definition at line 102 of file PyRep.h.
References mType, and PyTypeFloat.
Referenced by AsFloat(), IntegerValue(), IntegerValueU32(), and CharacterDB::SetAvatarSculpts().
|
inline |
Definition at line 100 of file PyRep.h.
References mType, and PyTypeInt.
Referenced by _IoN(), AsInt(), EntityService::CreateBoundObject(), FleetObject::CreateBoundObject(), PosMgr::CreateBoundObject(), PlanetORB::CreateBoundObject(), PlanetMgrService::CreateBoundObject(), ReprocessingService::CreateBoundObject(), AgentMgrService::CreateBoundObject(), CorpStationMgr::CreateBoundObject(), Colony::CreateRoute(), IntegerValue(), IntegerValueU32(), and CharacterDB::SetAvatarModifiers().
|
inline |
Definition at line 109 of file PyRep.h.
References mType, and PyTypeList.
Referenced by CorporationDB::AddVoteCase(), AsList(), and SetSQLDumper::VisitTuple().
|
inline |
Definition at line 101 of file PyRep.h.
References mType, and PyTypeLong.
Referenced by AsLong(), IntegerValue(), and IntegerValueU32().
|
inline |
Definition at line 111 of file PyRep.h.
References mType, and PyTypeNone.
Referenced by AsNone(), DBTYPE_IsCompatible(), StringContent(), and MarshalStream::VisitPackedRow().
|
inline |
Definition at line 115 of file PyRep.h.
References mType, and PyTypeObject.
Referenced by AsObject(), PyAddress::Decode(), PyPacket::Decode(), and PyCachedObjectDecoder::Decode().
|
inline |
Definition at line 116 of file PyRep.h.
References mType, and PyTypeObjectEx.
Referenced by AsObjectEx().
|
inline |
Definition at line 117 of file PyRep.h.
References mType, and PyTypePackedRow.
Referenced by AsPackedRow().
|
inline |
Definition at line 105 of file PyRep.h.
References mType, and PyTypeString.
Referenced by AsString(), UnmarshalStream::LoadObject(), and StringContent().
|
inline |
Definition at line 113 of file PyRep.h.
References mType, and PyTypeSubStream.
Referenced by AsSubStream(), and PyPacket::Decode().
|
inline |
Definition at line 112 of file PyRep.h.
References mType, and PyTypeSubStruct.
Referenced by AsSubStruct().
|
inline |
Definition at line 107 of file PyRep.h.
References mType, and PyTypeToken.
Referenced by AsToken().
|
inline |
Definition at line 108 of file PyRep.h.
References mType, and PyTypeTuple.
Referenced by EVEClientSession::_HandleCommand(), AsTuple(), AllianceRegistry::CreateBoundObject(), CorpRegistryService::CreateBoundObject(), Colony::CreateRoute(), PyPacket::Decode(), PyCallStream::Decode(), PyCachedObjectDecoder::Decode(), and PyTraceLog::logTrace().
|
inline |
Definition at line 106 of file PyRep.h.
References mType, and PyTypeWString.
Referenced by AsWString(), DBTYPE_IsCompatible(), and StringContent().
|
static |
Definition at line 103 of file PyRep.cpp.
References _log, AsString(), AsWString(), PyString::content(), PyWString::content(), IsNone(), IsString(), IsWString(), and TypeString().
Referenced by PyAddress::_DecodeService(), CorporationDB::AddVoteCase(), PyAddress::Decode(), PyCallStream::Decode(), EVENotificationStream::Decode(), ClientSession::GetCurrentString(), ClientSession::GetLastString(), and CorpRegistryBound::GetSearchValues().
const char * PyRep::TypeString | ( | ) | const |
Definition at line 76 of file PyRep.cpp.
References mType, PyTypeError, PyTypeMin, and s_mTypeString.
Referenced by CorporationDB::AddVoteCase(), EntityService::CreateBoundObject(), FleetObject::CreateBoundObject(), PosMgr::CreateBoundObject(), PlanetORB::CreateBoundObject(), PlanetMgrService::CreateBoundObject(), ReprocessingService::CreateBoundObject(), AllianceRegistry::CreateBoundObject(), AgentMgrService::CreateBoundObject(), CorpStationMgr::CreateBoundObject(), CorpRegistryService::CreateBoundObject(), Colony::CreateRoute(), PyAddress::Decode(), PyPacket::Decode(), PyCachedObjectDecoder::Decode(), PyCachedCall::Decode(), hash(), UnmarshalStream::LoadObject(), and StringContent().
|
pure virtual |
Visits object.
[in] | v | Visitor to be used for visiting. |
true | Visit successful. |
false | Error during visit. |
Implemented in PyChecksumedStream, PySubStream, PySubStruct, PyPackedRow, PyObjectEx, PyObject, PyDict, PyList, PyTuple, PyToken, PyWString, PyString, PyBuffer, PyNone, PyBool, PyFloat, PyLong, and PyInt.
Referenced by Dump(), ObjectToSQL(), CachedObjectMgr::OIDToString(), MarshalStream::SaveStream(), tcp_callback(), PyVisitor::VisitChecksumedStream(), PyDumpVisitor::VisitObject(), PyVisitor::VisitObject(), PyDumpVisitor::VisitObjectEx(), PyVisitor::VisitObjectEx(), MarshalStream::VisitObjectEx(), MarshalStream::VisitPackedRow(), PyVisitor::VisitSubStream(), and PyVisitor::VisitSubStruct().
|
protected |
Definition at line 223 of file PyRep.h.
Referenced by GetType(), IsBool(), IsBuffer(), IsChecksumedStream(), IsDict(), IsFloat(), IsInt(), IsList(), IsLong(), IsNone(), IsObject(), IsObjectEx(), IsPackedRow(), IsString(), IsSubStream(), IsSubStruct(), IsToken(), IsTuple(), IsWString(), and TypeString().