- Main Page
- Related Pages
- Modules
- Classes
- Files

# IReader.h

Go to the documentation of this file.

    00001 #ifndef _IREADER_H_
    00002 #define _IREADER_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/Schema/ClassDefinition.h>
    00028 #include <Fdo/Raster/IRaster.h>
    00029 #include <Fdo/Expression/LOBValue.h>
    00030
    00031 /// \brief
    00032 /// The FdoIFeatureReader interface provides a forward-only, read-only iterator
    00033 /// for reading feature data.  A reference to an FdoIFeatureReader is returned
    00034 /// from the Select and SelectAndLock commands. Because the initial position of the
    00035 /// FdoIFeatureReader is prior to the first item, you must call
    00036 /// ReadNext to begin accessing any data.
    00037 class FdoIReader: public FdoIDisposable
    00038 {
    00039 public:
    00040     /// \brief
    00041     /// Gets the Boolean value of the specified property. No conversion is
    00042     /// performed, thus the property must be FdoDataType_Boolean or an
    00043     /// exception is thrown.
    00044     ///
    00045     /// \param propertyName
    00046     /// Input the property name.
    00047     ///
    00048     /// \return
    00049     /// Returns the Boolean value.
    00050     ///
    00051     FDO_API virtual bool GetBoolean(FdoString* propertyName) = 0;
    00052
    00053     /// \brief
    00054     /// Gets the byte value of the specified property. No conversion is
    00055     /// performed, thus the property must be FdoDataType_Byte or an
    00056     /// exception is thrown.
    00057     ///
    00058     /// \param propertyName
    00059     /// Input the property name.
    00060     ///
    00061     /// \return
    00062     /// Returns the byte value.
    00063     ///
    00064     FDO_API virtual FdoByte GetByte(FdoString* propertyName) = 0;
    00065
    00066     /// \brief
    00067     ///  Gets the date and time value of the specified property. No conversion is
    00068     /// performed, thus the property must be FdoDataType_DateTime or an
    00069     /// exception is thrown.
    00070     ///
    00071     /// \param propertyName
    00072     /// Input the property name.
    00073     ///
    00074     /// \return
    00075     /// Returns the date and time value.
    00076     ///
    00077     FDO_API virtual FdoDateTime GetDateTime(FdoString* propertyName) = 0;
    00078
    00079     /// \brief
    00080     /// Gets the double-precision floating point value of the specified property. No
    00081     /// conversion is performed, thus the property must be FdoDataType_Double
    00082     /// or an exception is thrown.
    00083     ///
    00084     /// \param propertyName
    00085     /// Input the property name.
    00086     ///
    00087     /// \return
    00088     /// Returns the double floating point value
    00089     ///
    00090     FDO_API virtual double GetDouble(FdoString* propertyName) = 0;
    00091
    00092     /// \brief
    00093     /// Gets the 16-bit integer value of the specified property. No conversion is
    00094     /// performed, thus the property must be FdoDataType_Int16 or an exception
    00095     /// is thrown.
    00096     ///
    00097     /// \param propertyName
    00098     /// Input the property name.
    00099     ///
    00100     /// \return
    00101     /// Returns the FdoInt16 value.
    00102     ///
    00103     FDO_API virtual FdoInt16 GetInt16(FdoString* propertyName) = 0;
    00104
    00105     /// \brief
    00106     /// Gets the 32-bit integer value of the specified property. No conversion is
    00107     /// performed, thus the property must be FdoDataType_Int32 or an exception
    00108     /// is thrown.
    00109     ///
    00110     /// \param propertyName
    00111     /// Input the property name.
    00112     ///
    00113     /// \return
    00114     /// Returns the FdoInt32 value
    00115     ///
    00116     FDO_API virtual FdoInt32 GetInt32(FdoString* propertyName) = 0;
    00117
    00118     /// \brief
    00119     /// Gets the 64-bit integer value of the specified property. No conversion is
    00120     /// performed, thus the property must be FdoDataType_Int64 or an exception
    00121     /// is thrown.
    00122     ///
    00123     /// \param propertyName
    00124     /// Input the property name.
    00125     ///
    00126     /// \return
    00127     /// Returns the FdoInt64 value.
    00128     ///
    00129     FDO_API virtual FdoInt64 GetInt64(FdoString* propertyName) = 0;
    00130
    00131     /// \brief
    00132     /// Gets the Single floating point value of the specified property. No
    00133     /// conversion is performed, thus the property must be FdoDataType_Single
    00134     /// or an exception is thrown.
    00135     ///
    00136     /// \param propertyName
    00137     /// Input the property name.
    00138     ///
    00139     /// \return
    00140     /// Returns the single value
    00141     ///
    00142     FDO_API virtual float GetSingle(FdoString* propertyName) = 0;
    00143
    00144     /// \brief
    00145     /// Gets the string value of the specified property. No conversion is
    00146     /// performed, thus the property must be FdoDataType_String or an exception
    00147     /// is thrown.
    00148     ///
    00149     /// \param propertyName
    00150     /// Input the property name.
    00151     ///
    00152     /// \return
    00153     /// Returns the string value
    00154     ///
    00155     FDO_API virtual FdoString* GetString(FdoString* propertyName) = 0;
    00156
    00157     /// \brief
    00158     /// Gets a LOBValue reference. The LOB is fully read in and data available.
    00159     /// Because no conversion is performed, the property must be FdoDataType_BLOB or
    00160     /// FdoDataType_CLOB etc. (a LOB type)
    00161     ///
    00162     /// \param propertyName
    00163     /// Input the property name.
    00164     ///
    00165     /// \return
    00166     /// Returns the reference to LOBValue
    00167     ///
    00168     FDO_API virtual FdoLOBValue* GetLOB(FdoString* propertyName) = 0;
    00169
    00170     /// \brief
    00171     /// Gets a reference of the specified LOB property as a FdoBLOBStreamReader or
    00172     /// FdoCLOBStreamReader etc. to allow reading in blocks of data.
    00173     /// Because no conversion is performed, the property must be FdoDataType_BLOB
    00174     /// or FdoDataType_CLOB etc. (a LOB type)
    00175     /// Cast the FdoIStreamReader to the appropiate LOB Stream Reader.
    00176     ///
    00177     /// \param propertyName
    00178     /// Input the property name.
    00179     ///
    00180     /// \return
    00181     /// Returns a reference to a LOB stream reader
    00182     ///
    00183     FDO_API virtual FdoIStreamReader* GetLOBStreamReader(const wchar_t* propertyName ) = 0;
    00184
    00185     /// \brief
    00186     /// Returns true if the value of the specified property is null.
    00187     ///
    00188     /// \param propertyName
    00189     /// Input the property name.
    00190     ///
    00191     /// \return
    00192     /// Returns true if the value is null.
    00193     ///
    00194     FDO_API virtual bool IsNull(FdoString* propertyName) = 0;
    00195
    00196
    00197
    00198     /// \brief
    00199     /// Gets the geometry value of the specified property as a byte array in
    00200     /// FGF format. Because no conversion is performed, the property must be
    00201     /// of Geometric type; otherwise, an exception is thrown.
    00202     ///
    00203     /// \param propertyName
    00204     /// Input the property name.
    00205     ///
    00206     /// \return
    00207     /// Returns the byte array in FGF format.
    00208     ///
    00209     FDO_API virtual FdoByteArray* GetGeometry(FdoString* propertyName) = 0;
    00210
    00211
    00212     /// \brief
    00213     /// Gets the raster object of the specified property.
    00214     /// Because no conversion is performed, the property must be
    00215     /// of Raster type; otherwise, an exception is thrown.
    00216     ///
    00217     /// \param propertyName
    00218     /// Input the property name.
    00219     ///
    00220     /// \return
    00221     /// Returns the raster object.
    00222     ///
    00223     FDO_API virtual FdoIRaster* GetRaster(FdoString* propertyName) = 0;
    00224
    00225     /// \brief
    00226     /// Advances the reader to the next item and returns true if there is
    00227     /// another object to read or false if reading is complete. The default
    00228     /// position of the reader is prior to the first item. Thus you must
    00229     /// call ReadNext to begin accessing any data.
    00230     ///
    00231     /// \return
    00232     /// Returns true if there is a next item.
    00233     ///
    00234     FDO_API virtual bool ReadNext() = 0;
    00235
    00236     /// \brief
    00237     /// Closes the FdoIFeatureReader object, freeing any resources it may be holding.
    00238     ///
    00239     /// \return
    00240     /// Returns nothing
    00241     ///
    00242     FDO_API virtual void Close() = 0;
    00243 };
    00244 #endif
    00245
    00246

Please send us your comment about this page