Пример #1
0
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);
    }
}
Пример #2
0
VJSONValue& VJSONValue::operator=( const VJSONValue& inOther)
{
    if (this != &inOther)
    {
        _Dispose();
        _CopyFrom( inOther);
    }
    return *this;
}
Пример #3
0
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);
    }
}
Пример #4
0
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);
    }
}
Пример #5
0
void VJSONValue::SetTime(const VTime& inTime)
{
	_Dispose();
	if (inTime.IsNull())
		fType = JSON_null;
	else
	{
		fType = JSON_date;
		fTimeStamp = inTime.GetMilliseconds();
	}
}
Пример #6
0
void VJSONValue::SetString( const VInlineString& inString)
{
    if (fType == JSON_string)
    {
        fString.FromString( inString);
    }
    else
    {
        _Dispose();
        fType = JSON_string;
        fString.InitWithString( inString);
    }
}
Пример #7
0
void VJSONValue::SetBool( bool inValue)
{
    _Dispose();
    fType = inValue ? JSON_true : JSON_false;
}
Пример #8
0
void VJSONValue::SetNumber( double inNumber)
{
    _Dispose();
    fType = JSON_number;
    fNumber = inNumber;
}
Пример #9
0
void VJSONValue::SetUndefined()
{
    _Dispose();
    fType = JSON_undefined;
}
Пример #10
0
void VJSONValue::SetNull()
{
    _Dispose();
    fType = JSON_null;
}
Пример #11
0
VJSONValue::~VJSONValue()
{
    _Dispose();
}
Пример #12
0
CPipe::~CPipe()
{
	_Dispose();
}