Public Member Functions | Private Attributes | List of all members
Json::StaticString Class Reference

Lightweight wrapper to tag static string. More...

#include <json.h>

Public Member Functions

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

Private Attributes

const char * c_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 458 of file json.h.

Constructor & Destructor Documentation

Json::StaticString::StaticString ( const char *  czstring)
inlineexplicit

Definition at line 460 of file json.h.

Member Function Documentation

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

Definition at line 464 of file json.h.

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

Definition at line 462 of file json.h.

Member Data Documentation

const char* Json::StaticString::c_str_
private

Definition at line 467 of file json.h.


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


mission_planning
Author(s): ivan
autogenerated on Thu Nov 12 2015 19:08:20