Public Member Functions | Private Attributes
Json::StaticString Class Reference

Lightweight wrapper to tag static string. More...

#include <value.h>

List of all members.

Public Member Functions

const char * c_str () const
 operator const char * () const
 StaticString (const char *czstring)

Private Attributes

const char * str_

Detailed Description

Lightweight wrapper to tag static string.

Value constructor and objectValue member assignement takes advantage of the StaticString and avoid the cost of string duplication when storing the string or the member name.

Example of usage:

 Json::Value aValue( StaticString("some text") );
 Json::Value object;
 static const StaticString code("code");
 object[code] = 1234;

Definition at line 62 of file value.h.


Constructor & Destructor Documentation

Json::StaticString::StaticString ( const char *  czstring) [inline, explicit]

Definition at line 65 of file value.h.


Member Function Documentation

const char* Json::StaticString::c_str ( ) const [inline]

Definition at line 75 of file value.h.

Json::StaticString::operator const char * ( ) const [inline]

Definition at line 70 of file value.h.


Member Data Documentation

const char* Json::StaticString::str_ [private]

Definition at line 81 of file value.h.


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


bwi_tools
Author(s): Piyush Khandelwal
autogenerated on Thu Jun 6 2019 17:57:27