OSGeo FDO Provider for SHP API Reference

OSGeo FDO Provider for SHP API

API Reference OSGeo FDO Provider for SHP

IScrollableFeatureReader.h

Go to the documentation of this file.
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 _ShpIScrollableFeatureReader_
00018 #define _ShpIScrollableFeatureReader_
00019 
00020 #include "Fdo.h"
00021 
00022 class ShpIScrollableFeatureReader : public FdoIFeatureReader
00023 {
00024 public:
00025 
00026     /// <summary>Returns the number of records of the query result.</summary>
00027     /// <returns>Returns number of records.</returns> 
00028     virtual int Count() = 0;
00029     
00030     /// <summary>Position the reader at the first record of the query result. This method returns false if the query result is empty.</summary>
00031     /// <returns>Returns true if a record is found or false if the result is empty.</returns>
00032     virtual bool ReadFirst() = 0;
00033 
00034     /// <summary>Position the reader at the last record of the query result. This method returns false if the query result is empty.</summary>
00035     /// <returns>Returns true if a record is found or false if the result is empty.</returns>
00036     virtual bool ReadLast() = 0;
00037 
00038     /// <summary>Advances the reader to the previous item and returns true if there is
00039     /// another object to read or false if reading is complete.  The default
00040     /// position of the reader is prior to the first item.  Therefore you
00041     /// must call ReadFirst or ReadLast to begin accessing any data.</summary>
00042     /// <returns>Returns true if a record is found or false otherwise.</returns>
00043     virtual bool ReadPrevious() = 0;
00044 
00045     /// <summary>provide the ad-hoc access to the query result. It positions the position of the reader at a given record 
00046     /// defined by the key. If the record is not found, then the reader position is unset and false value is returned. 
00047     /// Once the reader’s position becames unset, the caller needs to call ReadFirst, ReadLast or ReadAt to re-position 
00048     /// the reader at a valid location.</returns>
00049     /// <param name="key">The key that identifies a record.</param> 
00050     /// <returns>Returns true if a record is found or false otherwise.</returns>
00051     virtual bool ReadAt(FdoPropertyValueCollection* key) = 0;
00052 
00053     /// <summary>Provides an ad-hoc access to the query result. The recordindex is the one-based nth item in the query result. 
00054     /// If successful, this method will position the reader at the feature identified by the recordindex.</summary>
00055     /// <param name="recordindex">The index of the row.</param> 
00056     /// <returns>Returns true if a record is found or false otherwise.</returns>
00057     virtual bool  ReadAtIndex( unsigned int recordindex ) = 0;
00058 
00059     /// <summary>Given a key of a feature, IndexOf will return the one based index or the record number of the feature within 
00060     /// the returned query result. If the record is not found, then zero is retuned. This is the mirror function of the GetAtIndex function. This method does not affect the reader position. 
00061     ///  GetAtIndex need to be called to move the reader to the returned index.</summary>
00062     /// <param name="key">The key that identifies a record.</param> 
00063     /// <returns>Returns true if a record is found or false otherwise.</returns>
00064     virtual unsigned int IndexOf(FdoPropertyValueCollection* key) = 0;
00065 };
00066 
00067 #endif

Comments?