OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimCsvFile.h>
Classes | |
class | Record |
Public Types | |
typedef std::vector< ossimString > | StringListType |
Public Member Functions | |
ossimCsvFile (const ossimString &separatorList=",") | |
~ossimCsvFile () | |
bool | open (const ossimFilename &file, const ossimString &flags="r") |
For now we will only support the read flag and open existing csv files. More... | |
void | close () |
bool | readHeader () |
ossimRefPtr< ossimCsvFile::Record > | nextRecord () |
Read one record and returns null if no more records exist or returns a valid pointer if a record exists. More... | |
const StringListType & | fieldHeaderList () const |
Returns the header of the CSV file. More... | |
ossim_int32 | indexOfField (const ossimString &fieldName) const |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Static Public Attributes | |
static ossim_int32 | INVALID_INDEX = -1 |
Protected Member Functions | |
bool | readCsvLine (std::istream &inStream, ossimCsvFile::StringListType &tokens) const |
![]() | |
virtual | ~ossimReferenced () |
Protected Attributes | |
StringListType | theFieldHeaderList |
ossimRefPtr< ossimCsvFile::Record > | theRecordBuffer |
std::istream * | theInputStream |
ossimString | theSeparatorList |
bool | theOpenFlag |
Friends | |
class | Record |
Definition at line 12 of file ossimCsvFile.h.
typedef std::vector<ossimString> ossimCsvFile::StringListType |
Definition at line 15 of file ossimCsvFile.h.
ossimCsvFile::ossimCsvFile | ( | const ossimString & | separatorList = "," | ) |
Definition at line 102 of file ossimCsvFile.cpp.
ossimCsvFile::~ossimCsvFile | ( | ) |
Definition at line 109 of file ossimCsvFile.cpp.
References close().
void ossimCsvFile::close | ( | ) |
Definition at line 229 of file ossimCsvFile.cpp.
References theFieldHeaderList, theInputStream, theOpenFlag, and theRecordBuffer.
Referenced by open(), and ~ossimCsvFile().
const ossimCsvFile::StringListType & ossimCsvFile::fieldHeaderList | ( | ) | const |
Returns the header of the CSV file.
Definition at line 261 of file ossimCsvFile.cpp.
References theFieldHeaderList.
ossim_int32 ossimCsvFile::indexOfField | ( | const ossimString & | fieldName | ) | const |
ossimRefPtr< ossimCsvFile::Record > ossimCsvFile::nextRecord | ( | ) |
Read one record and returns null if no more records exist or returns a valid pointer if a record exists.
Definition at line 243 of file ossimCsvFile.cpp.
References readCsvLine(), readHeader(), theFieldHeaderList, theInputStream, theOpenFlag, theRecordBuffer, and ossimCsvFile::Record::values().
bool ossimCsvFile::open | ( | const ossimFilename & | file, |
const ossimString & | flags = "r" |
||
) |
For now we will only support the read flag and open existing csv files.
Later we can add support for creating and writing csv files
Definition at line 200 of file ossimCsvFile.cpp.
References ossimString::begin(), ossimString::c_str(), close(), Record, theInputStream, theOpenFlag, and theRecordBuffer.
|
protected |
Definition at line 114 of file ossimCsvFile.cpp.
Referenced by nextRecord(), and readHeader().
bool ossimCsvFile::readHeader | ( | ) |
Definition at line 218 of file ossimCsvFile.cpp.
References readCsvLine(), theFieldHeaderList, theInputStream, and theOpenFlag.
Referenced by nextRecord().
|
friend |
Definition at line 67 of file ossimCsvFile.h.
Referenced by open().
|
static |
Definition at line 94 of file ossimCsvFile.h.
Referenced by indexOfField().
|
protected |
Definition at line 98 of file ossimCsvFile.h.
Referenced by close(), fieldHeaderList(), indexOfField(), nextRecord(), and readHeader().
|
protected |
Definition at line 100 of file ossimCsvFile.h.
Referenced by close(), nextRecord(), open(), and readHeader().
|
protected |
Definition at line 102 of file ossimCsvFile.h.
Referenced by close(), nextRecord(), open(), and readHeader().
|
protected |
Definition at line 99 of file ossimCsvFile.h.
Referenced by close(), nextRecord(), and open().
|
protected |
Definition at line 101 of file ossimCsvFile.h.