ENodeType GetNodeType()
const;
153 stringGetTypeName()
const;
156 boolIsObject()
const;
159 boolIsArray()
const;
162 boolIsString()
const;
165 boolIsInteger()
const;
168 boolIsDouble()
const;
171 boolIsBoolean()
const;
174 boolIsNull()
const;
177 boolIsContainer()
const;
180 boolIsScalar()
const;
201 size_tGetSize()
const;
204 voidAppendString(
const string&
value);
210 voidAppendDouble(
double value);
213 voidAppendBoolean(
bool value);
230 voidDeleteAt(
size_tindex);
237 voidSetString(
const string&
key,
const string&
value);
243 voidSetDouble(
const string&
key,
double value);
246 voidSetBoolean(
const string&
key,
bool value);
249 voidSetNull(
const string&
key);
256 voidDeleteByKey(
const string&
key);
260 boolHasKey(
const string&
key)
const;
275 stringGetString(
const string&
key)
const;
285 doubleGetDouble(
const string&
key)
const;
290 boolGetBoolean(
const string&
key)
const;
294 const stringAsString()
const;
299 Int8AsInteger()
const;
304 doubleAsDouble()
const;
308 boolAsBoolean()
const;
312fVerbatimIfString = 1 << 0,
313fOmitOutermostBrackets = 1 << 1,
314fStandardJson = 1 << 2
324fStandardJson = EReprFlags::fStandardJson,
345 stringGetKey()
const;
361 operator bool()
const;
420 "GetByKey(): no such key \""<<
key<<
'\"');
445 return m_Impl->GetNode();
460 return m_Impl->IsValid();
474 inlineCJsonIterator::operator
bool()
const 476 returnm_Impl->IsValid();
479 inlineCJsonIterator::operator
bool()
481 returnm_Impl->IsValid();
544 boolWriteMessage(
const CJsonNode& root_node);
545 boolCompleteMessage();
546 voidGetOutputBuffer(
const char** output_buffer,
547 size_t* output_buffer_size);
548 boolNextOutputBuffer();
558 boolx_SendNode(
const CJsonNode& node);
559 voidx_PushNode(
const CJsonNode& node);
580 const char** output_buffer,
size_t* output_buffer_size)
Exception class for use by CJsonNode.
NCBI_EXCEPTION_DEFAULT(CJsonException, CException)
@ eKeyNotFound
No such key in the object node.
@ eIndexOutOfRange
JSON array index exceeds the maximum index.
@ eInvalidNodeType
Operation is not valid for this node type.
Iterator for JSON arrays and objects.
CJsonNode operator*() const
An alternative way to get the value of the current element.
bool Next()
Skip to the next element if there is one, in which case TRUE is returned.
CNetRef< SJsonIteratorImpl > m_Impl
CJsonIterator & operator++()
An operator version of Next().
bool IsValid() const
Return true if this iterator is still valid.
CJsonNode GetNode() const
Return the value of the current element.
string GetKey() const
When iterating over a JSON object, return the key of the current element.
Int8 AsInteger() const
Provided that this is a numeric node (that is, either an integer or a floating point node),...
bool IsNull() const
Return true for a null node. Return false otherwise.
int TParseFlags
Binary OR of EParseFlags.
double GetDouble(const string &key) const
For a JSON object node, return the floating point number referred to by the specified key.
bool IsArray() const
Return true for a JSON array. Return false otherwise.
int TReprFlags
Binary OR of EReprFlags.
Int8 GetInteger(const string &key) const
For a JSON object node, return the integer referred to by the specified key.
bool IsBoolean() const
Return true for a boolean node. Return false otherwise.
EParseFlags
Parse methods flags.
const string AsString() const
Provided that this is a string node, return the string value of this node.
string GetString(const string &key) const
For a JSON object node, return the string referred to by the specified key.
static CJsonNode NewDoubleNode(double value)
Create a new JSON double node.
static CJsonNode NewBooleanNode(bool value)
Create a new JSON boolean node.
bool AsBoolean() const
Provided that this is a boolean node, return the boolean value of this node.
ENodeType GetNodeType() const
Return a ENodeType constant identifying the node type.
bool IsDouble() const
Return true for a double node. Return false otherwise.
bool GetBoolean(const string &key) const
For a JSON object node, return the boolean referred to by the specified key.
static CJsonNode NewIntegerNode(Int8 value)
Create a new JSON integer node.
bool IsInteger() const
Return true for an integer node. Return false otherwise.
bool IsObject() const
Return true for a JSON object. Return false otherwise.
static CJsonNode NewStringNode(const string &value)
Create a new JSON string node.
EIterationMode
Different modes of array and object iteration.
ENodeType
JSON node type.
bool IsContainer() const
Return true if the node is either an object or an array.
bool IsScalar() const
Return true if the node is any of the JSON scalar types.
EReprFlags
String representation flags.
CJsonNode GetByKey(const string &key) const
For a JSON object node, return the value associated with the specified key.
CJsonNode GetByKeyOrNull(const string &key) const
For a JSON object node, return the value associated with the specified key.
bool IsString() const
Return true for a string node. Return false otherwise.
double AsDouble() const
Provided that this is a numeric node (that is, either a floating point or an integer node),...
Exception class for use by CJsonNode.
NCBI_EXCEPTION_DEFAULT(CJsonOverUTTPException, CException)
@ eUnexpectedClosingBracket
@ eChunkContinuationExpected
@ eUnexpectedTrailingToken
bool m_HashValueIsExpected
list< CJsonNode > TNodeStack
const CJsonNode GetMessage() const
CUTTPWriter & m_UTTPWriter
list< SOutputStackFrame > TOutputStack
CJsonOverUTTPWriter(CUTTPWriter &writer)
TOutputStack m_OutputStack
void GetOutputBuffer(const char **output_buffer, size_t *output_buffer_size)
SOutputStackFrame m_CurrentOutputNode
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Class for reading series of chunks sent by a CUTTPWriter instance as a stream of bytes.
Class that serializes series of chunks of data for sending over binary streams.
void GetOutputBuffer(const char **output_buffer, size_t *output_buffer_size)
Return data to be sent over the output stream and extend internal pointers to the next buffer.
bool NextOutputBuffer()
Proceed to the next output buffer.
#define NCBI_THROW_FMT(exception_class, err_code, message)
The same as NCBI_THROW but with message processed as output to ostream.
virtual const char * GetErrCodeString(void) const
Get error code interpreted as text.
CVect2< NCBI_PROMOTE(int,U) > operator*(int v1, const CVect2< U > &v2)
bool IsValid(const CSeq_point &pt, CScope *scope)
Checks that point >= 0 and point < length of Bioseq.
int64_t Int8
8-byte (64-bit) signed integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_XCONNECT_EXPORT
const struct ncbi::grid::netcache::search::fields::KEY key
const GenericPointer< typename T::ValueType > T2 value
#define NCBI_NET_COMPONENT(component)
This interface should not be used directly.
virtual bool IsValid() const =0
virtual SJsonNodeImpl * GetNode() const =0
virtual string GetKey() const =0
static bool SetInteger(wxSpinCtrl *spinctrl, int value)
static bool GetInteger(wxSpinCtrl *spinctrl, int *value)
This file contains declaration of the CDiscreteDistribution class.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4