Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
This class reads attributes from .dbf
files.
More...
#include <ilviews/maps/format/shapefile/dbfreader.h>
Public Member Functions | |
IlvShapeDBFReader (IL_STDPREF istream &stream) | |
Initializes an IlvShapeDBFReader to read from the specified input stream. | |
IlvShapeDBFReader (const char *filename) | |
Initializes an IlvShapeDBFReader to read from the file whose name is specified. | |
int | getCurrentIndex () |
Returns the index of the next field that will be read. | |
const IlvFeatureAttributeInfo * | getInfo () |
Returns a description of the attributes. | |
IlvMapsError | getInitStatus () |
Checks the initialization status of this reader. | |
IlvFeatureAttributeProperty * | getNextRecord (IlvMapsError &status) |
Reads the next record in the .dbf file. The caller is responsible for deallocation of returned data. | |
int | getRecordCount () |
Returns the number of records contained in the .dbf file from which the attributes are read. | |
IlvFeatureAttributeProperty * | readRecord (int index, IlvMapsError &status) |
Reads the record corresponding to the specified index (see restrictions below). Restrictions:. |
This class reads attributes from .dbf
files.
Library: ilvmaps
This class can be used to read shape files with the .dbf
extension. The .dbf
files contain the attributes of the map objects.
This reader can be used as an iterator on a .dbf
file. It can also be used to directly access the records in the file (or more precisely their index) if it was created with the constructor that takes a file name as argument.
IlvShapeDBFReader::IlvShapeDBFReader | ( | const char * | filename | ) |
Initializes an IlvShapeDBFReader
to read from the file whose name is specified.
filename | The name of the input file. |
IlvShapeDBFReader::IlvShapeDBFReader | ( | IL_STDPREF istream & | stream | ) |
Initializes an IlvShapeDBFReader
to read from the specified input stream.
stream | The input stream. |
int IlvShapeDBFReader::getCurrentIndex | ( | ) |
Returns the index of the next field that will be read.
const IlvFeatureAttributeInfo* IlvShapeDBFReader::getInfo | ( | ) |
Returns a description of the attributes.
Returns the types and names of the field contained in the .dbf
file.
IlvFeatureAttributeInfo
that describes this attribute file. IlvMapsError IlvShapeDBFReader::getInitStatus | ( | ) |
Checks the initialization status of this reader.
IlvMaps::NoError()
if the initialization of this reader is successful, or an error if an error occured during the initalization. IlvFeatureAttributeProperty* IlvShapeDBFReader::getNextRecord | ( | IlvMapsError & | status | ) |
Reads the next record in the .dbf
file. The caller is responsible for deallocation of returned data.
status | An IlvMapsError to store the status of the read process. |
int IlvShapeDBFReader::getRecordCount | ( | ) |
Returns the number of records contained in the .dbf
file from which the attributes are read.
IlvFeatureAttributeProperty* IlvShapeDBFReader::readRecord | ( | int | index, | |
IlvMapsError & | status | |||
) |
Reads the record corresponding to the specified index (see restrictions below).
Restrictions:.
IlvShapeFileReader
. index | The index of the record to be read, in the range [0, this->getRecordCount()] . | |
status | An IlvMapsError to store the status of the read process. |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.