示例#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.cpp 项目: kobake/KppLibs
CPipe::~CPipe()
{
	_Dispose();
}