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

# IFeatureReader.h

Go to the documentation of this file.

    00001 #ifndef FDO_XML_IFEATUREREADER_H_
    00002 #define FDO_XML_IFEATUREREADER_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 #include <Fdo/Commands/Feature/IReader.h>
    00031
    00032 /// \brief
    00033 /// The FdoIFeatureReader interface provides a forward-only, read-only iterator
    00034 /// for reading feature data.  A reference to an FdoIFeatureReader is returned
    00035 /// from the Select and SelectAndLock commands. Because the initial position of the
    00036 /// FdoIFeatureReader is prior to the first item, you must call
    00037 /// ReadNext to begin accessing any data.
    00038 class FdoIFeatureReader: public FdoIReader
    00039 {
    00040 public:
    00041     /// \brief
    00042     /// Gets the definition of the object currently being read. If the user
    00043     /// has requested only a subset of the class properties, the class
    00044     /// definition reflects what the user has asked, rather than the full class
    00045     /// definition.
    00046     ///
    00047     /// \return
    00048     /// Returns the class definition object.
    00049     ///
    00050     FDO_API virtual FdoClassDefinition* GetClassDefinition() = 0;
    00051
    00052     /// \brief
    00053     /// Gets a value indicating the depth of nesting for the current reader.
    00054     /// The depth value increases each time GetFeatureObject is called and a new
    00055     /// reader is returned. The outermost reader has a depth of 0.
    00056     ///
    00057     /// \return
    00058     /// Returns the depth
    00059     ///
    00060     FDO_API virtual FdoInt32 GetDepth() = 0;
    00061
    00062     /// \brief
    00063     /// Gets the geometry value of the specified property as a byte array in
    00064     /// FGF format. Because no conversion is performed, the property must be
    00065     /// of Geometric type; otherwise, an exception is thrown.
    00066     /// This method is a language-specific performance optimization that returns a
    00067     /// pointer to the array data, rather than to an object that encapsulates
    00068     /// the array.  The array's memory area is only guaranteed to be valid
    00069     /// until a call to ReadNext() or Close(), or the disposal of this reader
    00070     /// object.
    00071     ///
    00072     /// \param propertyName
    00073     /// Input the property name.
    00074     /// \param count
    00075     /// Output the number of bytes in the array.
    00076     ///
    00077     /// \return
    00078     /// Returns a pointer to the byte array in FGF format.
    00079     ///
    00080     FDO_API virtual const FdoByte * GetGeometry(FdoString* propertyName, FdoInt32 * count) = 0;
    00081
    00082     /// \brief
    00083     /// Gets the geometry value of the specified property as a byte array in
    00084     /// FGF format. Because no conversion is performed, the property must be
    00085     /// of Geometric type; otherwise, an exception is thrown.
    00086     ///
    00087     /// \param propertyName
    00088     /// Input the property name.
    00089     ///
    00090     /// \return
    00091     /// Returns the byte array in FGF format.
    00092     ///
    00093     FDO_API virtual FdoByteArray* GetGeometry(FdoString* propertyName) = 0;
    00094
    00095     /// \brief
    00096     /// Gets a reference to an FdoIFeatureReader to read the data contained in
    00097     /// the object or object collection property. If the property is not an
    00098     /// object property, an exception is thrown.
    00099     ///
    00100     /// \param propertyName
    00101     /// Input the property name.
    00102     ///
    00103     /// \return
    00104     /// Returns the nested feature reader
    00105     ///
    00106     FDO_API virtual FdoIFeatureReader* GetFeatureObject(FdoString* propertyName) = 0;
    00107 };
    00108 #endif
    00109
    00110

Please send us your comment about this page