void VJSONValue::SetArray( VJSONArray *inArray) { if (inArray == NULL) { _Dispose(); fType = JSON_undefined; } else if (fType == JSON_array) { CopyRefCountable( &fArray, inArray); } else { _Dispose(); fType = JSON_array; fArray = RetainRefCountable( inArray); } }
VJSONValue& VJSONValue::operator=( const VJSONValue& inOther) { if (this != &inOther) { _Dispose(); _CopyFrom( inOther); } return *this; }
void VJSONValue::SetObject( VJSONObject *inObject) { if (inObject == NULL) { _Dispose(); fType = JSON_undefined; } else if (fType == JSON_object) { CopyRefCountable( &fObject, inObject); } else { _Dispose(); fType = JSON_object; fObject = RetainRefCountable( inObject); } }
void VJSONValue::SetString( const VString& inString) { if (inString.IsNull()) { _Dispose(); fType = JSON_null; } else if (fType == JSON_string) { fString.FromString( inString); } else { _Dispose(); fType = JSON_string; fString.InitWithString( inString); } }
void VJSONValue::SetTime(const VTime& inTime) { _Dispose(); if (inTime.IsNull()) fType = JSON_null; else { fType = JSON_date; fTimeStamp = inTime.GetMilliseconds(); } }
void VJSONValue::SetString( const VInlineString& inString) { if (fType == JSON_string) { fString.FromString( inString); } else { _Dispose(); fType = JSON_string; fString.InitWithString( inString); } }
void VJSONValue::SetBool( bool inValue) { _Dispose(); fType = inValue ? JSON_true : JSON_false; }
void VJSONValue::SetNumber( double inNumber) { _Dispose(); fType = JSON_number; fNumber = inNumber; }
void VJSONValue::SetUndefined() { _Dispose(); fType = JSON_undefined; }
void VJSONValue::SetNull() { _Dispose(); fType = JSON_null; }
VJSONValue::~VJSONValue() { _Dispose(); }
CPipe::~CPipe() { _Dispose(); }