OpenCPN Partial API docs
Loading...
Searching...
No Matches
wxJSONRefData Class Reference

The reference counted JSON value data (internal use). More...

Public Member Functions

 wxJSONRefData ()
 Constructor.
 
int GetRefCount () const
 
int GetRefCount () const
 

Public Attributes

int m_refCount
 the references count
 
wxJSONType m_type
 The actual type of the value held by this object.
 
wxJSONValueHolder m_value
 The JSON value held by this object.
 
wxString m_valString
 The JSON string value.
 
wxJSONInternalArray m_valArray
 The JSON array value.
 
wxJSONInternalMap m_valMap
 The JSON object value.
 
int m_commentPos
 The position of the comment line(s), if any.
 
wxArrayString m_comments
 The array of comment lines; may be empty.
 
int m_lineNo
 The line number when this value was read.
 
wxMemoryBuffer * m_memBuff
 The pointer to the memory buffer object.
 

Friends

class wxJSONValue
 
class wxJSONWriter
 

Detailed Description

The reference counted JSON value data (internal use).

Starting from version 0.4, the JSON value class use the reference counting tecnique (also know as copy-on-write) described in the wxWidgets documentation in order to speed up processing. The class is used internally by the wxJSONValue class which does all processing. To know more about COW see json_internals_cow

Definition at line 350 of file jsonval.h.

Constructor & Destructor Documentation

◆ wxJSONRefData()

wxJSONRefData::wxJSONRefData ( )

Constructor.

Definition at line 72 of file jsonval.cpp.

◆ ~wxJSONRefData()

wxJSONRefData::~wxJSONRefData ( )
virtual

Definition at line 86 of file jsonval.cpp.

Member Function Documentation

◆ GetRefCount()

int wxJSONRefData::GetRefCount ( ) const

Definition at line 93 of file jsonval.cpp.

Friends And Related Symbol Documentation

◆ wxJSONValue

wxJSONValue
friend

Definition at line 352 of file jsonval.h.

◆ wxJSONWriter

wxJSONWriter
friend

Definition at line 353 of file jsonval.h.

Member Data Documentation

◆ m_commentPos

int wxJSONRefData::m_commentPos

The position of the comment line(s), if any.

The data member contains one of the following constants:

  • wxJSONVALUE_COMMENT_BEFORE
  • wxJSONVALUE_COMMENT_AFTER
  • wxJSONVALUE_COMMENT_INLINE

Definition at line 394 of file jsonval.h.

◆ m_comments

wxArrayString wxJSONRefData::m_comments

The array of comment lines; may be empty.

Definition at line 397 of file jsonval.h.

◆ m_lineNo

int wxJSONRefData::m_lineNo

The line number when this value was read.

This data member is used by the wxJSONReader class and it is used to store the line number of the JSON text document where the value appeared. This value is compared to the line number of a comment line in order to obtain the value which a comment refersto.

Definition at line 407 of file jsonval.h.

◆ m_memBuff

wxMemoryBuffer * wxJSONRefData::m_memBuff

The pointer to the memory buffer object.

Note that despite using reference counting, the wxMemoryBuffer is not a copy-on-write structure so the wxJSON library uses some tricks in order to avoid the side effects of copying / assigning wxMemoryBuffer objects

Definition at line 415 of file jsonval.h.

◆ m_refCount

int wxJSONRefData::m_refCount

the references count

Definition at line 364 of file jsonval.h.

◆ m_type

wxJSONType wxJSONRefData::m_type

The actual type of the value held by this object.

Definition at line 367 of file jsonval.h.

◆ m_valArray

wxJSONInternalArray wxJSONRefData::m_valArray

The JSON array value.

Definition at line 382 of file jsonval.h.

◆ m_valMap

wxJSONInternalMap wxJSONRefData::m_valMap

The JSON object value.

Definition at line 385 of file jsonval.h.

◆ m_valString

wxString wxJSONRefData::m_valString

The JSON string value.

Definition at line 379 of file jsonval.h.

◆ m_value

wxJSONValueHolder wxJSONRefData::m_value

The JSON value held by this object.

This data member contains the JSON data types defined by the JSON syntax with the exception of the complex objects. This data member is an union of the primitive types so that it is simplier to cast them in other compatible types.

Definition at line 376 of file jsonval.h.


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