NIM PC Cross Platform SDK
nim_cpp_wrapper_util::Json::StaticString Class Reference

Lightweight wrapper to tag static string. More...

#include <value.h>

Public Member Functions

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

Detailed Description

Lightweight wrapper to tag static string.

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

Example of usage:

static const StaticString code("code");
object[code] = 1234;
Lightweight wrapper to tag static string.
Definition: value.h:149
Represents a JSON value.
Definition: value.h:196

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