OpendTect  7.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Friends | List of all members
Network::RequestPacket Class Reference
Inheritance diagram for Network::RequestPacket:
[legend]

Classes

union  Header
 

Public Member Functions

 RequestPacket (const RequestPacket &)
 
 RequestPacket (od_int32 payloadsize=0)
 
void addErrMsg (BufferString &) const
 
void * allocPayload (od_int32 size)
 
uiRetVal getPayload (IOPar &) const
 
PtrMan< PacketInterpretergetPayload (ObjectSet< ArrayNDInfo > &, TypeSet< OD::DataRepType > &) const
 
uiRetVal getPayload (OD::JSON::Object &) const
 
template<class T >
ArrayND< T > * getPayload (uiRetVal &) const
 
void * getRawHeader ()
 
const void * getRawHeader () const
 
void getStringPayload (BufferString &) const
 
bool isError () const
 
bool isNewRequest () const
 
bool isOK () const
 checks whether the header is reasonable More...
 
bool isRequestEnd () const
 
const void * payload () const
 
void * payload (bool takeover=false)
 
od_int32 payloadSize () const
 
od_int32 requestID () const
 
void setIsError ()
 
void setIsLast ()
 
int setIsNewRequest ()
 conveniently returns reqID() More...
 
template<class T >
bool setPayload (const ArrayND< T > &)
 
bool setPayload (const IOPar &)
 
PtrMan< PacketFillersetPayload (const ObjectSet< ArrayNDInfo > &, const TypeSet< OD::DataRepType > &)
 
bool setPayload (const OD::JSON::Object &)
 
void setPayload (void *, od_int32 size)
 buf becomes mine More...
 
void setRequestID (od_int32)
 for multi-packet requests More...
 
void setStringPayload (const char *)
 
void setSubID (od_int16)
 
od_int16 subID () const
 
od_int32 totalSize () const
 
- Public Member Functions inherited from RefCount::Referenced
void addObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
int nrRefs () const
 Only for expert use. More...
 
void ref () const
 
bool refIfReffed () const
 Don't use in production, for debugging. More...
 
void removeObserver (WeakPtrBase *obs)
 Not for normal use. May become private. More...
 
bool tryRef () const
 Not for normal use. May become private. More...
 
void unRef () const
 
void unRefNoDelete () const
 

Static Public Member Functions

static od_int32 getPayloadSize (const void *)
 
static od_int32 headerSize ()
 
static void setSystemSizeLimit (od_int32)
 
static od_int32 systemSizeLimit ()
 
- Static Public Member Functions inherited from RefCount::Referenced
static bool isSane (const Referenced *)
 

Protected Member Functions

 ~RequestPacket ()
 
- Protected Member Functions inherited from RefCount::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
virtual ~Referenced ()
 
Referencedoperator= (const Referenced &)
 

Static Protected Member Functions

static od_int16 cBeginSubID ()
 
static od_int16 cEndSubID ()
 
static od_int16 cErrorSubID ()
 
static od_int16 cMoreSubID ()
 

Protected Attributes

Header header_
 
char * payload_ = nullptr
 

Private Member Functions

PacketFillerfinalize (const OD::JSON::Object &)
 
PacketInterpreterreadJsonHeader (OD::JSON::Object &, uiRetVal &) const
 

Static Private Member Functions

static OD::JSON::Object getDefaultJsonHeader (bool fortxt, od_int32 sz)
 

Friends

class PacketFiller
 
class PacketInterpreter
 

Detailed Description

<>

Constructor & Destructor Documentation

◆ RequestPacket() [1/2]

Network::RequestPacket::RequestPacket ( od_int32  payloadsize = 0)

◆ RequestPacket() [2/2]

Network::RequestPacket::RequestPacket ( const RequestPacket )

◆ ~RequestPacket()

Network::RequestPacket::~RequestPacket ( )
protected

Member Function Documentation

◆ addErrMsg()

void Network::RequestPacket::addErrMsg ( BufferString ) const

◆ allocPayload()

void* Network::RequestPacket::allocPayload ( od_int32  size)

◆ cBeginSubID()

static od_int16 Network::RequestPacket::cBeginSubID ( )
inlinestaticprotected

◆ cEndSubID()

static od_int16 Network::RequestPacket::cEndSubID ( )
inlinestaticprotected

◆ cErrorSubID()

static od_int16 Network::RequestPacket::cErrorSubID ( )
inlinestaticprotected

◆ cMoreSubID()

static od_int16 Network::RequestPacket::cMoreSubID ( )
inlinestaticprotected

◆ finalize()

PacketFiller* Network::RequestPacket::finalize ( const OD::JSON::Object )
private

◆ getDefaultJsonHeader()

static OD::JSON::Object Network::RequestPacket::getDefaultJsonHeader ( bool  fortxt,
od_int32  sz 
)
staticprivate

◆ getPayload() [1/4]

uiRetVal Network::RequestPacket::getPayload ( IOPar ) const

◆ getPayload() [2/4]

PtrMan<PacketInterpreter> Network::RequestPacket::getPayload ( ObjectSet< ArrayNDInfo > &  ,
TypeSet< OD::DataRepType > &   
) const

◆ getPayload() [3/4]

uiRetVal Network::RequestPacket::getPayload ( OD::JSON::Object ) const

◆ getPayload() [4/4]

template<class T >
ArrayND< T > * Network::RequestPacket::getPayload ( uiRetVal uirv) const
inline

◆ getPayloadSize()

static od_int32 Network::RequestPacket::getPayloadSize ( const void *  )
static

◆ getRawHeader() [1/2]

void* Network::RequestPacket::getRawHeader ( )
inline

◆ getRawHeader() [2/2]

const void* Network::RequestPacket::getRawHeader ( ) const
inline

◆ getStringPayload()

void Network::RequestPacket::getStringPayload ( BufferString ) const

◆ headerSize()

static od_int32 Network::RequestPacket::headerSize ( )
inlinestatic

◆ isError()

bool Network::RequestPacket::isError ( ) const
inline

◆ isNewRequest()

bool Network::RequestPacket::isNewRequest ( ) const
inline

◆ isOK()

bool Network::RequestPacket::isOK ( ) const

checks whether the header is reasonable

◆ isRequestEnd()

bool Network::RequestPacket::isRequestEnd ( ) const
inline

◆ payload() [1/2]

const void* Network::RequestPacket::payload ( ) const

◆ payload() [2/2]

void* Network::RequestPacket::payload ( bool  takeover = false)

takeover: delete char[]

◆ payloadSize()

od_int32 Network::RequestPacket::payloadSize ( ) const

◆ readJsonHeader()

PacketInterpreter* Network::RequestPacket::readJsonHeader ( OD::JSON::Object ,
uiRetVal  
) const
private

◆ requestID()

od_int32 Network::RequestPacket::requestID ( ) const

◆ setIsError()

void Network::RequestPacket::setIsError ( )
inline

◆ setIsLast()

void Network::RequestPacket::setIsLast ( )
inline

◆ setIsNewRequest()

int Network::RequestPacket::setIsNewRequest ( )

conveniently returns reqID()

◆ setPayload() [1/5]

template<class T >
bool Network::RequestPacket::setPayload ( const ArrayND< T > &  arr)
inline

◆ setPayload() [2/5]

bool Network::RequestPacket::setPayload ( const IOPar )

◆ setPayload() [3/5]

PtrMan<PacketFiller> Network::RequestPacket::setPayload ( const ObjectSet< ArrayNDInfo > &  ,
const TypeSet< OD::DataRepType > &   
)

◆ setPayload() [4/5]

bool Network::RequestPacket::setPayload ( const OD::JSON::Object )

◆ setPayload() [5/5]

void Network::RequestPacket::setPayload ( void *  ,
od_int32  size 
)

buf becomes mine

◆ setRequestID()

void Network::RequestPacket::setRequestID ( od_int32  )

for multi-packet requests

◆ setStringPayload()

void Network::RequestPacket::setStringPayload ( const char *  )

◆ setSubID()

void Network::RequestPacket::setSubID ( od_int16  )

◆ setSystemSizeLimit()

static void Network::RequestPacket::setSystemSizeLimit ( od_int32  )
static

◆ subID()

od_int16 Network::RequestPacket::subID ( ) const

◆ systemSizeLimit()

static od_int32 Network::RequestPacket::systemSizeLimit ( )
static

◆ totalSize()

od_int32 Network::RequestPacket::totalSize ( ) const
inline

Friends And Related Function Documentation

◆ PacketFiller

friend class PacketFiller
friend

◆ PacketInterpreter

friend class PacketInterpreter
friend

Member Data Documentation

◆ header_

Header Network::RequestPacket::header_
protected

◆ payload_

char* Network::RequestPacket::payload_ = nullptr
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024