C++ TargetRTS
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
RTJsonEncoding Class Reference
Inheritance diagram for RTJsonEncoding:
RTAsciiEncoding RTEncoding

Public Member Functions

 RTJsonEncoding (RTOBuffer *)
 
virtual int put (const void *, const RTObject_class *) override
 Encode a data object and write the encoding to the output buffer.
 
virtual int put_char (char) override
 
virtual int put_msg (const RTMessage *)
 
virtual int put_opaque (int, const char *) override
 
virtual int put_enum (int, int, const RTFieldDescriptor *) override
 
virtual int put_array (const void *, int, const RTObject_class *) override
 
virtual int put_indirect (const void *, const RTObject_class *) override
 
virtual int put_address (const void *) override
 
- Public Member Functions inherited from RTAsciiEncoding
 RTAsciiEncoding (RTOBuffer *buffer)
 Construct an ASCII encoder object.
 
int getError (void)
 
virtual int flush (void) override
 Flush the output buffer.
 
virtual int put (const void *data, const RTObject_class *type) override
 Encode a data object and write the encoding to the output buffer.
 
virtual int put_address (const void *) override
 
virtual int put_bool (bool) override
 
virtual int put_char (char) override
 
virtual int put_int (int) override
 
virtual int put_long (long) override
 
virtual int put_long_long (long long) override
 
virtual int put_short (short) override
 
virtual int put_uchar (unsigned char) override
 
virtual int put_unsigned (unsigned) override
 
virtual int put_ulong (unsigned long) override
 
virtual int put_ushort (unsigned short) override
 
virtual int put_unsignedint (unsigned int) override
 
virtual int put_unsignedlong (unsigned long) override
 
virtual int put_unsignedlonglong (unsigned long long) override
 
virtual int put_unsignedshort (unsigned short) override
 
virtual int put_unsignedchar (unsigned char) override
 
virtual int put_string (const char *) override
 
virtual int put_opaque (int, const char *) override
 
virtual int put_enum (int, int, const RTFieldDescriptor *) override
 
virtual int put_array (const void *, int, const RTObject_class *) override
 
virtual int put_indirect (const void *, const RTObject_class *) override
 
virtual int put_struct (const void *, const RTObject_class *) override
 
virtual int write_string (const char *str) override
 Write a string verbatimely to the output buffer of the encoder.
 
virtual int flush (void)=0
 
virtual int put (const void *, const RTObject_class *)=0
 
virtual int put_address (const void *)=0
 
virtual int put_bool (bool)=0
 
virtual int put_char (char)=0
 
virtual int put_int (int)=0
 
virtual int put_long (long)=0
 
virtual int put_long_long (long long)=0
 
virtual int put_short (short)=0
 
virtual int put_uchar (unsigned char)=0
 
virtual int put_unsigned (unsigned)=0
 
virtual int put_ulong (unsigned long)=0
 
virtual int put_ushort (unsigned short)=0
 
virtual int put_unsignedint (unsigned int)=0
 
virtual int put_unsignedlong (unsigned long)=0
 
virtual int put_unsignedlonglong (unsigned long long)=0
 
virtual int put_unsignedshort (unsigned short)=0
 
virtual int put_unsignedchar (unsigned char)=0
 
virtual int put_string (const char *)=0
 
virtual int put_opaque (int, const char *)=0
 
virtual int put_enum (int value, int numChoices, const RTFieldDescriptor *choices)=0
 
virtual int put_array (const void *array_base, int numElements, const RTObject_class *elementType)=0
 
virtual int put_indirect (const void *pointer, const RTObject_class *targetType)=0
 
virtual int put_struct (const void *record, const RTObject_class *recordType)=0
 
virtual int write_string (const char *)
 

Protected Member Functions

int putFields (const void *, const RTObject_class *, int &first) override
 
- Protected Member Functions inherited from RTAsciiEncoding
virtual int putType (const RTObject_class *)
 
int putName (const char *)
 
virtual int putFields (const void *, const RTObject_class *, int &first)
 
int putAddress (const void *)
 
int putFieldListStart (void)
 
int putFieldSeparator (void)
 
int putFieldListFinish (void)
 
int putCode (const char *, int, Spacing)
 

Additional Inherited Members

- Protected Types inherited from RTAsciiEncoding
enum  Spacing { SpaceNone , SpaceAround }
 
- Protected Attributes inherited from RTAsciiEncoding
RTOBufferoutput
 
Spacing before
 

Member Function Documentation

◆ put()

virtual int RTJsonEncoding::put ( const void *  data,
const RTObject_class type 
)
overridevirtual

Encode a data object and write the encoding to the output buffer.

Parameters
dataData object to encode.
typeType descriptor describing the type of the data object.
Returns
1 if successfully encoded and written to the output buffer, 0 otherwise

Reimplemented from RTAsciiEncoding.

◆ put_address()

virtual int RTJsonEncoding::put_address ( const void *  )
overridevirtual

Reimplemented from RTAsciiEncoding.

◆ put_array()

virtual int RTJsonEncoding::put_array ( const void *  ,
int  ,
const RTObject_class  
)
overridevirtual

Reimplemented from RTAsciiEncoding.

◆ put_char()

virtual int RTJsonEncoding::put_char ( char  )
overridevirtual

Reimplemented from RTAsciiEncoding.

◆ put_enum()

virtual int RTJsonEncoding::put_enum ( int  ,
int  ,
const RTFieldDescriptor  
)
overridevirtual

Reimplemented from RTAsciiEncoding.

◆ put_indirect()

virtual int RTJsonEncoding::put_indirect ( const void *  ,
const RTObject_class  
)
overridevirtual

Reimplemented from RTAsciiEncoding.

◆ put_opaque()

virtual int RTJsonEncoding::put_opaque ( int  ,
const char *   
)
overridevirtual

Reimplemented from RTAsciiEncoding.

◆ putFields()

int RTJsonEncoding::putFields ( const void *  ,
const RTObject_class ,
int &  first 
)
overrideprotectedvirtual

Reimplemented from RTAsciiEncoding.


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