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

Packed row. More...

#include "PyRep.h"

Inheritance diagram for PyPackedRow:
Collaboration diagram for PyPackedRow:

Public Types

typedef PyList storage_type
 
typedef storage_type::iterator iterator
 
typedef
storage_type::const_iterator 
const_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

 PyPackedRow (DBRowDescriptor *header)
 
 PyPackedRow (const PyPackedRow &oth)
 
 PyPackedRow (PyPackedRow &&oth)=delete
 
PyPackedRowoperator= (const PyPackedRow &oth)
 
PyPackedRowoperator= (PyPackedRow &&oth)=delete
 
PyRepClone () const
 Clones object. More...
 
bool visit (PyVisitor &v) const
 Visits object. More...
 
DBRowDescriptorheader () const
 
const_iterator begin () const
 
const_iterator end () const
 
void clear ()
 
PyRepGetField (size_t index) const
 
bool SetField (uint32 index, PyRep *value)
 
bool SetField (const char *colName, PyRep *value)
 
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 ~PyPackedRow ()
 
- 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

DBRowDescriptor *const mHeader
 
storage_type *const mFields
 
- 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

Packed row.

Special row which packs all its values with zero-compression algorithm.

Definition at line 961 of file PyRep.h.

Member Typedef Documentation

Definition at line 965 of file PyRep.h.

Definition at line 964 of file PyRep.h.

Constructor & Destructor Documentation

PyPackedRow::PyPackedRow ( DBRowDescriptor header)

Definition at line 1010 of file PyRep.cpp.

Referenced by Clone().

1011 : PyRep(PyRep::PyTypePackedRow), mHeader(header), mFields(new PyList(header->ColumnCount()) ) { }
storage_type *const mFields
Definition: PyRep.h:1001
uint32 ColumnCount() const
Definition: PyDatabase.cpp:60
PyRep(PyType t)
Definition: PyRep.cpp:73
DBRowDescriptor *const mHeader
Definition: PyRep.h:1000
Python list.
Definition: PyRep.h:639

Here is the caller graph for this function:

PyPackedRow::PyPackedRow ( const PyPackedRow oth)

Definition at line 1012 of file PyRep.cpp.

DBRowDescriptor * header() const
Definition: PyRep.h:983
storage_type *const mFields
Definition: PyRep.h:1001
uint32 ColumnCount() const
Definition: PyDatabase.cpp:60
PyRep(PyType t)
Definition: PyRep.cpp:73
DBRowDescriptor *const mHeader
Definition: PyRep.h:1000
Python list.
Definition: PyRep.h:639
PyPackedRow::PyPackedRow ( PyPackedRow &&  oth)
delete
PyPackedRow::~PyPackedRow ( )
protectedvirtual

Definition at line 1015 of file PyRep.cpp.

References mFields, mHeader, and PyDecRef.

1016 {
1017  PyDecRef( mHeader );
1018  PyDecRef( mFields );
1019 }
storage_type *const mFields
Definition: PyRep.h:1001
#define PyDecRef(op)
Definition: PyRep.h:57
DBRowDescriptor *const mHeader
Definition: PyRep.h:1000

Member Function Documentation

const_iterator PyPackedRow::begin ( ) const
inline

Definition at line 986 of file PyRep.h.

References PyList::begin(), and mFields.

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

986 { return mFields->begin(); }
storage_type *const mFields
Definition: PyRep.h:1001
const_iterator begin() const
Definition: PyRep.h:660

Here is the call graph for this function:

Here is the caller graph for this function:

void PyPackedRow::clear ( )
inline

Definition at line 988 of file PyRep.h.

References PyList::clear(), and mFields.

988 { mFields->clear(); }
storage_type *const mFields
Definition: PyRep.h:1001
void clear()
Definition: PyRep.cpp:627

Here is the call graph for this function:

PyRep * PyPackedRow::Clone ( ) const
virtual

Clones object.

Returns
Indentical copy of object.

Implements PyRep.

Definition at line 1021 of file PyRep.cpp.

References PyPackedRow().

1022 {
1023  return new PyPackedRow( *this );
1024 }
PyPackedRow(DBRowDescriptor *header)
Definition: PyRep.cpp:1010

Here is the call graph for this function:

const_iterator PyPackedRow::end ( ) const
inline

Definition at line 987 of file PyRep.h.

References PyList::end(), and mFields.

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

987 { return mFields->end(); }
storage_type *const mFields
Definition: PyRep.h:1001
const_iterator end() const
Definition: PyRep.h:661

Here is the call graph for this function:

Here is the caller graph for this function:

PyRep* PyPackedRow::GetField ( size_t  index) const
inline

Definition at line 990 of file PyRep.h.

References PyList::GetItem(), and mFields.

Referenced by StaticDataMgr::SetBPMatlType(), and MarshalStream::VisitPackedRow().

990 { return mFields->GetItem( index ); }
storage_type *const mFields
Definition: PyRep.h:1001
PyRep * GetItem(size_t index) const
Returns Python object.
Definition: PyRep.h:674

Here is the call graph for this function:

Here is the caller graph for this function:

int32 PyPackedRow::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 1047 of file PyRep.cpp.

References PyRep::hash().

1048 {
1049  assert(false);
1050  return PyRep::hash();
1051 }
virtual int32 hash() const
virtual function to generate a hash value of a object.
Definition: PyRep.cpp:96

Here is the call graph for this function:

DBRowDescriptor* PyPackedRow::header ( ) const
inline

Definition at line 983 of file PyRep.h.

References mHeader.

Referenced by UnmarshalStream::LoadPackedRow(), SetField(), PyDumpVisitor::VisitPackedRow(), PyVisitor::VisitPackedRow(), and MarshalStream::VisitPackedRow().

983 { return mHeader; }
DBRowDescriptor *const mHeader
Definition: PyRep.h:1000

Here is the caller graph for this function:

PyPackedRow & PyPackedRow::operator= ( const PyPackedRow oth)

Definition at line 1053 of file PyRep.cpp.

References mFields.

1054 {
1055  *mFields = *oth.mFields;
1056 
1057  return *this;
1058 }
storage_type *const mFields
Definition: PyRep.h:1001
PyPackedRow& PyPackedRow::operator= ( PyPackedRow &&  oth)
delete
bool PyPackedRow::SetField ( uint32  index,
PyRep value 
)

Definition at line 1031 of file PyRep.cpp.

References header(), mFields, PyDecRef, and PyList::SetItem().

Referenced by FillPackedRow(), LiveUpdateDB::GenerateUpdates(), InventoryItem::GetChargeStatusRow(), SovereigntyDataMgr::GetCurrentSovData(), InventoryItem::GetItemRow(), InventoryItem::GetItemStatusRow(), MarketDB::GetMarketGroups(), UnmarshalStream::LoadPackedRow(), SystemManager::MakeSetState(), marshal_EVEMarshalTest(), StaticDataMgr::SetBPMatlType(), and SetField().

1032 {
1033  if (!header()->VerifyValue( index, value ) ) {
1034  PyDecRef( value );
1035  return false;
1036  }
1037 
1038  mFields->SetItem( index, value );
1039  return true;
1040 }
DBRowDescriptor * header() const
Definition: PyRep.h:983
storage_type *const mFields
Definition: PyRep.h:1001
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:682
#define PyDecRef(op)
Definition: PyRep.h:57

Here is the call graph for this function:

Here is the caller graph for this function:

bool PyPackedRow::SetField ( const char *  colName,
PyRep value 
)

Definition at line 1042 of file PyRep.cpp.

References header(), and SetField().

1043 {
1044  return SetField( header()->FindColumn( colName ), value );
1045 }
DBRowDescriptor * header() const
Definition: PyRep.h:983
bool SetField(uint32 index, PyRep *value)
Definition: PyRep.cpp:1031

Here is the call graph for this function:

bool PyPackedRow::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 1026 of file PyRep.cpp.

References PyVisitor::VisitPackedRow().

1027 {
1028  return v.VisitPackedRow( this );
1029 }
virtual bool VisitPackedRow(const PyPackedRow *rep)
PackedRow type visitor.
Definition: PyVisitor.cpp:99

Here is the call graph for this function:

Member Data Documentation

storage_type* const PyPackedRow::mFields
protected

Definition at line 1001 of file PyRep.h.

Referenced by begin(), clear(), end(), GetField(), operator=(), SetField(), and ~PyPackedRow().

DBRowDescriptor* const PyPackedRow::mHeader
protected

Definition at line 1000 of file PyRep.h.

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


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