OSJSONMessageBuffer Class Reference
The JSON message buffer class is derived from the OSMessageBuffer base class. More...
#include <OSJSONMessageBuffer.h>
Public Member Functions | |
EXTJSONMETHOD int | getIndent () |
This method returns current JSON output indent value. | |
EXTJSONMETHOD int | getIndentChar () |
This method returns current JSON output indent character value (default is space). | |
EXTJSONMETHOD void | setIndent (OSUINT8 indent) |
This method sets JSON output indent to the given value. | |
Protected Member Functions | |
EXTJSONMETHOD | OSJSONMessageBuffer (Type bufferType, OSRTContext *pContext=0) |
The protected constructor creates a new context and sets the buffer class type. |
Detailed Description
The JSON message buffer class is derived from the OSMessageBuffer base class.
It is the base class for the OSJSONEncodeBuffer and OSJSONDecodeBuffer classes. It contains variables and methods specific to encoding or decoding JSON messages. It is used to manage the buffer into which a message is to be encoded or decoded.
Definition at line 42 of file OSJSONMessageBuffer.h.
Constructor & Destructor Documentation
EXTJSONMETHOD OSJSONMessageBuffer::OSJSONMessageBuffer | ( | Type | bufferType, | |
OSRTContext * | pContext = 0 | |||
) | [protected] |
The protected constructor creates a new context and sets the buffer class type.
- Parameters:
-
bufferType Type of message buffer that is being created (for example, JSONEncode or JSONDecode). pContext Pointer to a context to use. If NULL, new context will be allocated.
Member Function Documentation
EXTJSONMETHOD int OSJSONMessageBuffer::getIndent | ( | ) |
This method returns current JSON output indent value.
- Returns:
- Current indent value (>= 0) if OK, negative status code if error.
EXTJSONMETHOD int OSJSONMessageBuffer::getIndentChar | ( | ) |
This method returns current JSON output indent character value (default is space).
- Returns:
- Current indent character (> 0) if OK, negative status code if error.
EXTJSONMETHOD void OSJSONMessageBuffer::setIndent | ( | OSUINT8 | indent | ) |
This method sets JSON output indent to the given value.
- Parameters:
-
indent Number of spaces per indent. Default is 3.
The documentation for this class was generated from the following file: