Changes between Version 13 and Version 14 of FDORfc5


Ignore:
Timestamp:
Jul 31, 2007, 12:57:17 PM (17 years ago)
Author:
thomasknoell
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc5

    v13 v14  
    2626The purpose of this RFC is to enhance the class ''!FdoFunctionDefinition''. This class allows a provider to define a set of supported expression functions. The list of supported expression functions is accessible as part of the expression capabilities that can be retrieved from a connection.
    2727
    28 The enhancement will add a new property to the class allowing the specification of the function class type a given function belongs to. The valid function types will be defined in an enumeration and initially contain values to indicate aggregate, conversion, date, mathematical, numeric, string, geometry and custom functions. The enumeration will also include a value to indicate an upspecified function class type. This function class type will represent the default value.
    29 
    30 The enhancement will allow a consumer of the list of supported expression functions to sort them according to their class type. This may help in presenting the functions in a user-defined UI as similar functions can be grouped. The following shows examples of functions grouped according to their corresponding function class:
     28The enhancement will add a new property to the class allowing the specification of the function category a given function belongs to. The valid categories will be defined in an enumeration and initially contain values to indicate aggregate, conversion, date, mathematical, numeric, string, geometry and custom function categories. The enumeration will also include a value to indicate an upspecified function category. This function category represents the default value.
     29
     30The enhancement will allow a consumer of the list of supported expression functions to sort them according to their category. This may help in presenting the functions in a user-defined UI as similar functions can be grouped. The following shows examples of functions grouped according to their corresponding category:
    3131
    3232AGGREGATE:
     
    3737
    3838DATE:
    39 ''!AddMonths'', ''!CurrentDate'', ''!ToString''
     39''!AddMonths'', ''!CurrentDate'', ''Extract''
    4040
    4141MATH:
     
    5151''Area'', ''Length''
    5252
    53 Any provider may support additional functions that may not be classified as either a aggregate, conversion, date, mathematical, numeric, string or geometry function. Those functions may be grouped as ''!FdoFunctionClassType_Custom'' instead.
    54 
    55 
    56 The function class will be set via the currently available interfaces (''create'' method). To allow this the interfaces will be enhanced with an optional function class type parameter which will be set to the default value.
     53Any provider may support additional functions that may not be classified as either a aggregate, conversion, date, mathematical, numeric, string or geometry function. Those functions may be classified as custom functions instead.
     54
     55The function category will be set via the currently available interfaces (''create'' method). To allow this the interfaces will be enhanced with an optional function category parameter which will be set to the default value.
    5756
    5857
     
    6665
    6766{{{
    68 enum FdoFunctionClassType {
    69 
    70                  FdoFunctionClassType_Aggregate,
    71                  FdoFunctionClassType_Conversion,
    72                  FdoFunctionClassType_Custom,
    73                  FdoFunctionClassType_Date,
    74                  FdoFunctionClassType_Geometry,
    75                  FdoFunctionClassType_Math,
    76                  FdoFunctionClassType_Numeric,
    77                  FdoFunctionClassType_String,
    78                  FdoFunctionClassType_Unspecified
    79 
    80 }  //  enum FdoFunctionClassType
     67enum FdoFunctionCategoryType {
     68
     69                 FdoFunctionCategoryType_Aggregate,
     70                 FdoFunctionCategoryType_Conversion,
     71                 FdoFunctionCategoryType_Custom,
     72                 FdoFunctionCategoryType_Date,
     73                 FdoFunctionCategoryType_Geometry,
     74                 FdoFunctionCategoryType_Math,
     75                 FdoFunctionCategoryType_Numeric,
     76                 FdoFunctionCategoryType_String,
     77                 FdoFunctionCategoryType_Unspecified
     78
     79}  //  enum FdoFunctionCategoryType
    8180}}}
    8281
     
    9392                           FdoDataType                     returnType,
    9493                           FdoArgumentDefinitionCollection *arguments,
    95                            FdoFunctionClassType            functionClassType);
     94                           FdoFunctionCategoryType         functionCategoryType);
    9695
    9796    FdoFunctionDefinition (FdoString                       *name,
     
    10099                           FdoDataType                     returnType,
    101100                           FdoArgumentDefinitionCollection *arguments,
    102                            FdoFunctionClassType            functionClassType);
     101                           FdoFunctionCategoryType         functionCategoryType);
    103102
    104103    FdoFunctionDefinition (FdoString                        *name,
     
    106105                           bool                             isAggregate,
    107106                           FdoSignatureDefinitionCollection *signatures,
    108                            FdoFunctionClassType             functionClassType);
     107                           FdoFunctionCategoryType          functionCategoryType);
    109108...
    110109
     
    112111...
    113112    /// \brief
    114     /// Returns the function class for the current function definition.
    115     ///
    116     /// \return
    117     /// Returns FdoFunctionClassType
    118     ///
    119     FDO_API FdoFunctionClassType GetFunctionClassType();
     113    /// Returns the category for the function described in the current function definition.
     114    ///
     115    /// \return
     116    /// Returns FdoFunctionCategoryType
     117    ///
     118    FDO_API FdoFunctionCategoryType GetFunctionCategoryType();
    120119
    121120    /// \brief
     
    130129    /// \param arguments
    131130    /// Input the argument definition list
    132     /// \param functionClassType
    133     /// Input the function class type the function belongs to. If not specified the function is classified as unspecified. Valid
    134     /// values for this parameter are defined in the enumeration FdoFunctionClassType.
     131    /// \param functionCategoryType
     132    /// Input the category the function belongs to. If not specified the function is classified as unspecified. Valid
     133    /// values for this parameter are defined in the enumeration FdoFunctionCategoryType.
    135134    ///
    136135    /// \return
     
    141140                                                  FdoDataType                     returnType,
    142141                                                  FdoArgumentDefinitionCollection *arguments,
    143                                                   FdoFunctionClassType            functionClassType = FdoFunctionClassType_Unspecified);
     142                                                  FdoFunctionCategoryType         functionCategoryType = FdoFunctionCategoryType_Unspecified);
    144143
    145144    /// \brief
     
    156155    /// \param arguments
    157156    /// Input the argument definition list
    158     /// \param functionClassType
    159     /// Input the function class type the function belongs to. If not specified the function is classified as unspecified. Valid
    160     /// values for this parameter are defined in the enumeration FdoFunctionClassType.
     157    /// \param functionCategoryType
     158    /// Input the category the function belongs to. If not specified the function is classified as unspecified. Valid
     159    /// values for this parameter are defined in the enumeration FdoFunctionCategoryType.
    161160    ///
    162161    /// \return
     
    168167                                                  FdoDataType                     returnType,
    169168                                                  FdoArgumentDefinitionCollection *arguments,
    170                                                   FdoFunctionClassType            functionClassType = FdoFunctionClassType_Unspecified);
     169                                                  FdoFunctionCategoryType         functionCategoryType = FdoFunctionCategoryType_Unspecified);
    171170
    172171    /// \brief
     
    181180    /// \param signatures
    182181    /// Input the list of possible function signatures
    183     /// \param functionClassType
    184     /// Input the function class type the function belongs to. If not specified the function is classified as unspecified. Valid
    185     /// values for this parameter are defined in the enumeration FdoFunctionClassType.
     182    /// \param functionCategoryType
     183    /// Input the category the function belongs to. If not specified the function is classified as unspecified. Valid
     184    /// values for this parameter are defined in the enumeration FdoFunctionCategoryType.
    186185    ///
    187186    /// \return
     
    192191                                                  bool                             isAggregate,
    193192                                                  FdoSignatureDefinitionCollection *signatures,
    194                                                   FdoFunctionClassType             functionClassType = FdoFunctionClassType_Unspecified);
     193                                                  FdoFunctionCategoryType          functionCategoryType = FdoFunctionCategoryType_Unspecified);
    195194...
    196195
    197196protected:
    198197...
    199     FdoFunctionClassType m_functionClassType;
     198    FdoFunctionCategoryType m_functionCategoryType;
    200199...
    201200
     
    208207
    209208{{{
    210 public __value enum FunctionClassType {
    211 
    212                  FunctionClassType_Aggregate   = FdoFunctionClassType_Aggregate,
    213                  FunctionClassType_Conversion  = FdoFunctionClassType_Conversion,
    214                  FunctionClassType_Custom      = FdoFunctionClassType_Custom,
    215                  FunctionClassType_Date        = FdoFunctionClassType_Date,
    216                  FunctionClassType_Geometry    = FdoFunctionClassType_Geometry,
    217                  FunctionClassType_Math        = FdoFunctionClassType_Math,
    218                  FunctionClassType_Numeric     = FdoFunctionClassType_Numeric,
    219                  FunctionClassType_String      = FdoFunctionClassType_String,
    220                  FunctionClassType_Unspecified = FdoFunctionClassType_Unspecified
    221 
    222 }  //  enum FunctionClassType
     209public __value enum FunctionCategoryType {
     210
     211                 FunctionCategoryType_Aggregate   = FdoFunctionCategoryType_Aggregate,
     212                 FunctionCategoryType_Conversion  = FdoFunctionCategoryType_Conversion,
     213                 FunctionCategoryType_Custom      = FdoFunctionCategoryType_Custom,
     214                 FunctionCategoryType_Date        = FdoFunctionCategoryType_Date,
     215                 FunctionCategoryType_Geometry    = FdoFunctionCategoryType_Geometry,
     216                 FunctionCategoryType_Math        = FdoFunctionCategoryType_Math,
     217                 FunctionCategoryType_Numeric     = FdoFunctionCategoryType_Numeric,
     218                 FunctionCategoryType_String      = FdoFunctionCategoryType_String,
     219                 FunctionCategoryType_Unspecified = FdoFunctionCategoryType_Unspecified
     220
     221}  //  enum FunctionCategoryType
    223222}}}
    224223
     
    232231{
    233232public:
     233
     234...
     235
    234236    /// \brief
    235237    ///  Constructs an instance of a FunctionDefinition using the specified arguments.
     
    239241    /// \param description
    240242    /// Input a brief description.
     243    /// \param returnPropertyType
     244    /// Input the function return property type
    241245    /// \param returnType
    242246    /// Input the function return type
    243247    /// \param arguments
    244248    /// Input the argument definition list
    245     /// \param functionClassType
    246     /// Input the function class type the function belongs to. Valid values for this parameter are defined
    247     /// in the enumeration FunctionClassType.
     249    ///
     250    /// \return
     251    /// Returns FunctionDefinition
     252    ///
     253    FunctionDefinition (System::String *name,
     254                        System::String *description,
     255                        NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType returnPropertyType,
     256                        NAMESPACE_OSGEO_FDO_SCHEMA::DataType returnType,
     257                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinitionCollection *arguments);
     258
     259    /// \brief
     260    ///  Constructs an instance of a FunctionDefinition using the specified arguments.
     261    ///
     262    /// \param name
     263    /// Input the name of the function.
     264    /// \param description
     265    /// Input a brief description.
     266    /// \param returnType
     267    /// Input the function return type
     268    /// \param arguments
     269    /// Input the argument definition list
     270    /// \param functionCategoryType
     271    /// Input the category the function belongs to. Valid values for this parameter are defined
     272    /// in the enumeration FunctionCategoryType.
    248273    ///
    249274    /// \return
     
    254279                        NAMESPACE_OSGEO_FDO_SCHEMA::DataType returnType,
    255280                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinitionCollection *arguments,
    256                         NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionClassType functionClassType);
     281                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionCategoryType functionCategoryType);
    257282
    258283    /// \brief
     
    267292    /// \param signatures
    268293    /// Input the list of possible function signatures
    269     /// \param functionClassType
    270     /// Input the function class type the function belongs to. Valid values for this parameter are defined
    271     /// in the enumeration FunctionClassType.
     294    /// \param functionCategoryType
     295    /// Input the category the function belongs to. Valid values for this parameter are defined
     296    /// in the enumeration FunctionCategoryType.
    272297    ///
    273298    /// \return
     
    278303                        System::Boolean isAggregate,
    279304                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::SignatureDefinitionCollection *signatures,
    280                         NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionClassType functionClassType);
    281 
    282 ...
    283 
    284     /// \brief
    285     ///  Gets the function class type of the function.
    286     ///
    287     /// \return
    288     /// Returns the function class type
    289     ///
    290         __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionClassType get_FunctionClassType();
     305                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionCategoryType functionCategoryType);
     306
     307    /// \brief
     308    ///  Constructs an instance of a FunctionDefinition using the specified arguments.
     309    ///
     310    /// \param name
     311    /// Input the name of the function.
     312    /// \param description
     313    /// Input a brief description.
     314    /// \param returnPropertyType
     315    /// Input the function return property type
     316    /// \param returnType
     317    /// Input the function return type
     318    /// \param arguments
     319    /// Input the argument definition list
     320    /// \param functionCategoryType
     321    /// Input the category the function belongs to. Valid values for this parameter are defined
     322    /// in the enumeration FunctionCategoryType.
     323    ///
     324    /// \return
     325    /// Returns FunctionDefinition
     326    ///
     327    FunctionDefinition (System::String *name,
     328                        System::String *description,
     329                        NAMESPACE_OSGEO_FDO_SCHEMA::PropertyType returnPropertyType,
     330                        NAMESPACE_OSGEO_FDO_SCHEMA::DataType returnType,
     331                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::ArgumentDefinitionCollection *arguments,
     332                        NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionCategoryType functionCategoryType);
     333
     334...
     335
     336    /// \brief
     337    ///  Gets the category the function belongs to.
     338    ///
     339    /// \return
     340    /// Returns the function category
     341    ///
     342        __property NAMESPACE_OSGEO_FDO_CONNECTIONS_CAPABILITIES::FunctionCategoryType get_FunctionCategoryType();
    291343
    292344...
     
    341393                                                true,
    342394                                                maxSignatures,
    343                                                 FdoFunctionClassType_Aggregate);
     395                                                FdoFunctionCategoryType_Aggregate);
    344396
    345397    FdoPtr<FdoFunctionDefinition> concatFunc =
     
    348400                                                false,
    349401                                                concatSignatures,
    350                                                 FdoFunctionClassType_String);
     402                                                FdoFunctionCategoryType_String);
    351403
    352404}}}