API Reference | OSGeo FDO Provider for SDF |
00001 // 00002 // Copyright (C) 2004-2006 Autodesk, Inc. 00003 // 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of version 2.1 of the GNU Lesser 00006 // General Public License as published by the Free Software Foundation. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US 00016 00017 #ifndef _SdfIScrollableFeatureReader_ 00018 #define _SdfIScrollableFeatureReader_ 00019 00020 #include "Fdo.h" 00021 00022 class SdfIScrollableFeatureReader : public FdoIFeatureReader 00023 { 00024 public: 00025 00026 /// \brief 00027 /// Returns the number of records of the query result. 00028 /// 00029 /// \return 00030 /// Returns number of records. 00031 virtual int Count() = 0; 00032 00033 /// \brief 00034 /// Positions the reader at the first record of the query result. 00035 /// 00036 /// \return 00037 /// Returns true if a record is found or false if the result is empty. 00038 virtual bool ReadFirst() = 0; 00039 00040 /// \brief 00041 /// Position the reader at the last record of the query result. 00042 /// 00043 /// \return 00044 /// Returns true if a record is found or false if the result is empty. 00045 virtual bool ReadLast() = 0; 00046 00047 /// \brief 00048 /// Advances the reader to the previous item. 00049 /// 00050 /// \remarks 00051 /// The default position of the reader is prior to the first item. 00052 /// Therefore you must call ReadFirst or ReadLast to 00053 /// begin accessing any data. 00054 /// 00055 /// \return 00056 /// Returns true if a record is found or false if reading is complete. 00057 virtual bool ReadPrevious() = 0; 00058 00059 /// \brief 00060 /// Provides the ad-hoc access to the query result. 00061 /// 00062 /// \remarks 00063 /// It positions the position of the reader at a given record 00064 /// defined by the key. If the record is not found, 00065 /// then the reader position is unset and false value is returned. 00066 /// Once the reader’s position becames unset, 00067 /// the caller needs to call ReadFirst, ReadLast or ReadAt to re-position 00068 /// the reader at a valid location. 00069 /// 00070 /// \param key 00071 /// The key that identifies a record. 00072 /// 00073 /// \return 00074 /// Returns true if a record is found or false otherwise. 00075 virtual bool ReadAt(FdoPropertyValueCollection* key) = 0; 00076 00077 /// \brief 00078 /// Provides an ad-hoc access to the query result. 00079 /// 00080 /// \remarks 00081 /// The recordindex is the one-based nth item in the query result. 00082 /// If successful, this method will position the reader at the feature identified by the recordindex. 00083 /// 00084 /// \param recordindex 00085 /// The index of the row. 00086 /// 00087 /// \return 00088 /// Returns true if a record is found or false otherwise. 00089 virtual bool ReadAtIndex( unsigned int recordindex ) = 0; 00090 00091 /// \brief 00092 /// Given a key of a feature, IndexOf will return the one based index or the record number of the feature within 00093 /// the returned query result. 00094 /// \remarks 00095 /// If the record is not found, then zero is retuned. 00096 /// This is the mirror function of the GetAtIndex function. 00097 /// This method does not affect the reader position. 00098 /// GetAtIndex need to be called to move the reader to the returned index. 00099 /// 00100 /// \param key 00101 /// The key that identifies a record. 00102 /// 00103 /// \return 00104 /// Returns true if a record is found or false otherwise. 00105 virtual unsigned int IndexOf(FdoPropertyValueCollection* key) = 0; 00106 }; 00107 00108 #endif
Comments? |