Changes between Initial Version and Version 1 of FdoLiteralValueIsNull


Ignore:
Timestamp:
10/18/07 07:27:44 (17 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FdoLiteralValueIsNull

    v1 v1  
     1
     2== FDO !LiteralValue !IsNull Support ==
     3
     4=== Overview ===
     5
     6Right now there are 3 independent !IsNull() methods that are not related to each other (one in !FdoDataValue, one in !FdoGeometryValue, and one in !FdoRaster).
     7
     8We can not mix !FdoRaster with !FdoLiteralValue because are two different interfaces and we don’t use them in the same place as !FdoLiteralValue. Instead we can promote !IsNull() function from !FdoDataValue and !FdoGeometryValue to !FdoLiteralValue.
     9
     10In this case classes like !FdoCommonFilterExecutor will benefit by this change by calling !IsNull function without care about the type of the object. E.G:
     11
     12
     13{{{
     14bool FdoCommonFilterExecutor::IsResultNull ()
     15{
     16    FdoPropertyType propType = GetResultPropertyType();
     17    if (propType == FdoPropertyType_DataProperty)
     18        return ((FdoDataValue*)m_retvals.back())->IsNull();
     19    else if (propType == FdoPropertyType_GeometricProperty)
     20        return ((FdoGeometryValue*)m_retvals.back())->IsNull();
     21    else
     22        throw FdoException::Create(FdoException::NLSGetMessage(UNEXPECTEDERROR));
     23}
     24}}}
     25
     26Will become:
     27
     28
     29{{{
     30bool FdoCommonFilterExecutor::IsResultNull ()
     31{
     32    return ((FdoLiteralValue*)m_retvals.back())->IsNull();
     33}
     34}}}
     35
     36=== API Changes ===
     37
     38!IsNull will be supported by adding the !IsNull() function to !FdoLiteralValue class.
     39
     40
     41{{{
     42FDO_API virtual bool FdoLiteralValue::IsNull() = 0;
     43}}}