示例#1
0
int Value_money_null::Compare(
	const I_Value& 	inOther, 
	COMPARE_TYPE 	inCompareType ) const 
{
	argused1( inCompareType );
	FBL_CHECK( get_Type() == inOther.get_Type() ); 

	// If one of values (this or inOther) have null...
	if( get_IsNull() )
    {
	    if( inOther.get_IsNull() )
	        return 0; // Both are NULL
	    else 
	        return -1; // Any NULL is less then NOT NULL                               
    }
    else 
    {
    	if( inOther.get_IsNull() )
           	return 1; // Any NOT NULL is greater then NULL
    	else
    	{
			// ... have not null values - compare them.
			return Value_money::Compare( inOther );
    	}
    }								
}
示例#2
0
void Value_Raw::Assign( const I_Value& inValue )  
{
	if( inValue.get_IsNull() )
	{
		put_IsNull( true );
	}
	else
	{
		if( get_Type() == inValue.get_Type() )
		{
			vuint32 Len = static_cast<vuint32>(inValue.end() - inValue.begin());
			put_Data( (vuint8*)inValue.begin(), Len );
		}
		else
		{
			ConvertValue( &inValue,	this );
		}
	}
}