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

Lightweight wrapper to tag static string. More...

#include <json.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 384 of file json.h.


Constructor & Destructor Documentation

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

Definition at line 387 of file json.h.


Member Function Documentation

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

Definition at line 397 of file json.h.

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

Definition at line 392 of file json.h.


Member Data Documentation

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

Definition at line 403 of file json.h.


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


find_object_2d
Author(s): Mathieu Labbe
autogenerated on Thu Aug 27 2015 13:00:34