osgEarth 2.1.1
|
Public Types | |
enum | DuplicationPolicy { noDuplication = 0, duplicate, duplicateOnCopy } |
Public Member Functions | |
CZString (int index) | |
CZString (const char *cstr, DuplicationPolicy allocate) | |
CZString (const CZString &other) | |
~CZString () | |
CZString & | operator= (const CZString &other) |
bool | operator< (const CZString &other) const |
bool | operator== (const CZString &other) const |
int | index () const |
const char * | c_str () const |
bool | isStaticString () const |
Private Member Functions | |
void | swap (CZString &other) |
Private Attributes | |
const char * | cstr_ |
int | index_ |
Definition at line 194 of file JsonUtils.
{ noDuplication = 0, duplicate, duplicateOnCopy };
Value::CZString::CZString | ( | int | index | ) |
Definition at line 435 of file JsonUtils.cpp.
Value::CZString::CZString | ( | const char * | cstr, |
DuplicationPolicy | allocate | ||
) |
Definition at line 441 of file JsonUtils.cpp.
: cstr_( allocate == duplicate ? valueAllocator()->makeMemberName(cstr) : cstr ) , index_( allocate ) { }
Value::CZString::CZString | ( | const CZString & | other | ) |
Definition at line 448 of file JsonUtils.cpp.
: cstr_( other.index_ != noDuplication && other.cstr_ != 0 ? valueAllocator()->makeMemberName( other.cstr_ ) : other.cstr_ ) , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate) : other.index_ ) { }
Value::CZString::~CZString | ( | ) |
Definition at line 457 of file JsonUtils.cpp.
{ if ( cstr_ && index_ == duplicate ) valueAllocator()->releaseMemberName( const_cast<char *>( cstr_ ) ); }
const char * Value::CZString::c_str | ( | ) | const |
Definition at line 503 of file JsonUtils.cpp.
{ return cstr_; }
int Value::CZString::index | ( | ) | const |
Definition at line 496 of file JsonUtils.cpp.
{ return index_; }
bool Value::CZString::isStaticString | ( | ) | const |
Definition at line 509 of file JsonUtils.cpp.
{ return index_ == noDuplication; }
bool Value::CZString::operator< | ( | const CZString & | other | ) | const |
Definition at line 479 of file JsonUtils.cpp.
Value::CZString & Value::CZString::operator= | ( | const CZString & | other | ) |
bool Value::CZString::operator== | ( | const CZString & | other | ) | const |
Definition at line 487 of file JsonUtils.cpp.
void Value::CZString::swap | ( | CZString & | other | ) | [private] |
const char* osgEarth::Json::Value::CZString::cstr_ [private] |
int osgEarth::Json::Value::CZString::index_ [private] |