FDO API Reference Feature Data Objects

IExpressionCapabilities.h

Go to the documentation of this file.
00001 #ifndef _IEXPRESSIONCAPABILITIES_H_
00002 #define _IEXPRESSIONCAPABILITIES_H_
00003 // 
00004 
00005 //
00006 // Copyright (C) 2004-2006  Autodesk, Inc.
00007 // 
00008 // This library is free software; you can redistribute it and/or
00009 // modify it under the terms of version 2.1 of the GNU Lesser
00010 // General Public License as published by the Free Software Foundation.
00011 // 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 // 
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this library; if not, write to the Free Software
00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 //
00021 
00022 #ifdef _WIN32
00023 #pragma once
00024 #endif
00025 
00026 #include <FdoStd.h>
00027 #include <Fdo/Expression/ExpressionType.h>
00028 #include <Fdo/Connections/Capabilities/FunctionDefinitionCollection.h>
00029 
00030 // Number function names
00031 #define  FDO_FUNCTION_CEIL   L"Ceil"    // Returns the smallest integer greater than or equal to the expression value
00032 #define  FDO_FUNCTION_FLOOR  L"Floor"   // Returns the largest integer equal to or less than the expression value
00033 
00034 // Aggregates function names
00035 #define  FDO_FUNCTION_AVG    L"Avg"     // Returns the average value of an expression
00036 #define  FDO_FUNCTION_COUNT  L"Count"   // Returns the number of objects in the query
00037 #define  FDO_FUNCTION_MAX    L"Max"     // Returns the maximum value of an expression
00038 #define  FDO_FUNCTION_MIN    L"Min"     // Returns the minimum value of an expression
00039 #define  FDO_FUNCTION_SUM    L"Sum"     // Returns the sum of values of an expression
00040 #define  FDO_FUNCTION_SPATIALEXTENTS L"SpatialExtents" // Returns the minimum bounding rectangle of a Geometry expression
00041 
00042 
00043 // Strings function names
00044 #define  FDO_FUNCTION_LOWER  L"Lower"   // Returns strings with all lowercase letters
00045 #define  FDO_FUNCTION_UPPER  L"Upper"   // Returns strings with all letters uppercase
00046 #define  FDO_FUNCTION_CONCAT L"Concat"  // Returns the string concatenation of 2 expressions"
00047 
00048 
00049 /// \brief
00050 /// The FdoIExpressionCapbilities interface declares the feature provider's level
00051 /// of support for FdoExpression classes.
00052 class FdoIExpressionCapabilities : public FdoIDisposable
00053 {
00054 protected:
00055 
00056     /// \brief
00057     /// Constructs and return an FdoFunctionDefinitionCollection that contains a common list of
00058     /// function definition. Providers can pick the function they support and add them to their supported
00059     /// functions list. This method is internal to providers implementations.
00060     /// 
00061     /// \return
00062     /// Returns FdoFunctionDefinitionCollection
00063     /// 
00064     FDO_API static FdoFunctionDefinitionCollection* GetWellKnownFunctions();
00065 
00066 public:
00067     /// \brief
00068     /// Returns an array of FdoExpressionType objects the feature provider supports.
00069     /// 
00070     /// \param length 
00071     /// Input the number of expression types
00072     /// 
00073     /// \return
00074     /// Returns the list of expression types
00075     /// 
00076     FDO_API virtual FdoExpressionType* GetExpressionTypes(FdoInt32& length) = 0;
00077 
00078     /// \brief
00079     /// Returns a collection of FdoFunctionDefinition objects the feature provider supports within expressions.
00080     /// 
00081     /// \return
00082     /// Returns the collection of function definitions
00083     /// 
00084     FDO_API virtual FdoFunctionDefinitionCollection* GetFunctions() = 0;
00085 };
00086 #endif
00087 
00088 

Comments or suggestions? Send us feedback.