Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
This class reads attributes from .dbf
files.
More...
#include <ilviews/maps/format/shapefile/dbfreader.h>
Public Member Functions | |
IlvShapeDBFReader (const char *filename) | |
Initializes a new IlvShapeDBFReader to read from the file whose name is specified. More... | |
IlvShapeDBFReader (std::istream &stream) | |
Initializes a new IlvShapeDBFReader to read from the specified input stream. More... | |
int | getCurrentIndex () const |
Returns the index of the next field that will be read. More... | |
const IlvFeatureAttributeInfo * | getInfo () const |
Returns a description of the attributes. More... | |
IlvMapsError | getInitStatus () |
Checks the initialization status of this reader. More... | |
IlvFeatureAttributeProperty * | getNextRecord (IlvMapsError &status) |
Reads the next record in the .dbf file. The caller is responsible for deallocation of returned data. More... | |
int | getRecordCount () |
Returns the number of records contained in the .dbf file from which the attributes are read. More... | |
IlvFeatureAttributeProperty * | readRecord (int index, IlvMapsError &status) |
Reads the record corresponding to the specified index. More... | |
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.
IlvShapeFileReader
. IlvShapeDBFReader::IlvShapeDBFReader | ( | const char * | filename | ) |
Initializes a new IlvShapeDBFReader
to read from the file whose name is specified.
filename | The name of the input file. |
IlvShapeDBFReader::IlvShapeDBFReader | ( | std::istream & | stream | ) |
Initializes a new IlvShapeDBFReader
to read from the specified input stream.
stream | The input stream. |
int IlvShapeDBFReader::getCurrentIndex | ( | ) | const |
Returns the index of the next field that will be read.
const IlvFeatureAttributeInfo* IlvShapeDBFReader::getInfo | ( | ) | const |
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.
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 2018, 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.