Botcraft 1.21.4
Loading...
Searching...
No Matches
ProtocolCraft::PluginObject Class Referenceabstract

#include <PluginObject.hpp>

Public Member Functions

virtual ~PluginObject ()
 
virtual void Read (const unsigned char *ptr, unsigned long long int &length)=0
 Deserialize raw data into this object.
 
virtual const unsigned char * Write (unsigned long long int &size)=0
 Write this object into raw data.
 
virtual const char * Serialize ()=0
 Serialize this object into a null terminated json string.
 

Detailed Description

Definition at line 5 of file PluginObject.hpp.

Constructor & Destructor Documentation

◆ ~PluginObject()

virtual ProtocolCraft::PluginObject::~PluginObject ( )
inlinevirtual

Definition at line 8 of file PluginObject.hpp.

Member Function Documentation

◆ Read()

virtual void ProtocolCraft::PluginObject::Read ( const unsigned char *  ptr,
unsigned long long int &  length 
)
pure virtual

Deserialize raw data into this object.

Parameters
ptrPointer to the start of the data
lengthAvailable data, will be updated with data read

◆ Serialize()

virtual const char * ProtocolCraft::PluginObject::Serialize ( )
pure virtual

Serialize this object into a null terminated json string.

Returns
A pointer to the start of the string

◆ Write()

virtual const unsigned char * ProtocolCraft::PluginObject::Write ( unsigned long long int &  size)
pure virtual

Write this object into raw data.

Parameters
sizeWill be assigned to the data size
Returns
A pointer to the serialized data

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