cocos2d-x  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 assignement takes advantage of the StaticString and avoid the cost of string duplication when storing the string or the member name.

Example of usage:

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

Constructor & Destructor Documentation

StaticString ( const char *  czstring)

Member Function Documentation

const char* c_str ( ) const
operator const char * ( ) const

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