3#include <NDEVR/BaseValues.h>
5#include <NDEVR/Buffer.h>
34 void DumpFields(
const char* szDestFileName,
const char** fields,
size_t numFields);
45 template<
class t_type>
48 uint04 index = Constant<uint04>::Invalid;
51 for (
uint04 i = 0; i < columns.size(); ++i)
53 if (column == columns[i].archName)
56 final_offset = szRowSize - (row_skip_size + columns[i].uLength);
59 row_skip_size += columns[i].uLength;
64 clFile.seekg(m_data_start, std::ios_base::beg);
65 buff.ensureCapacity(stHeader.uNumRecords);
66 size_t uNumRecords = 0;
68 while (uNumRecords < stHeader.uNumRecords)
71 clFile.read(&deleted, 1);
74 clFile.seekg(szRowSize, std::ios_base::cur);
78 if (row_skip_size > 0)
80 clFile.seekg(row_skip_size, std::ios_base::cur);
83 s.setSize(columns[index].uLength);
84 clFile.read(s.begin(), columns[index].uLength);
89 clFile.seekg(final_offset, std::ios_base::cur);
103 char arcLastUpdate[3];
107 uint02 uFirstRecordOffset;
127 uint04 uDisplacement;
129 uint01 uDecimalPlaces;
141 const DbfRecord_s& rstRecord;
148 FieldInfo_s(
const DbfRecord_s& rec) :
155 std::ifstream clFile;
156 DbfHeader_s stHeader;
157 Buffer<DbfRecord_s> columns;
160 uint04 szLargestFieldSize;
The equivelent of std::vector but with a bit more control.
void add(t_type &&object)
Adds object to the end of the buffer.
void DumpFields(const char *szDestFileName, const char **fields, size_t numFields)
Dumps only the specified fields from the .dbf file to a destination text file.
Buffer< t_type > readColumn(const StringView &column)
Reads all values from a named column and returns them converted to the requested type.
void DumpAll(const char *szDestFileName)
Dumps all records from the .dbf file to a destination text file.
uint04 recordCount() const
Returns the number of records in the .dbf file.
DBFParser(const File &file)
Constructs a DBFParser by opening and parsing the header of the given .dbf file.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
decltype(auto) getAs() const
Converts a string into an object.
String & trimWhiteSpace()
Trims any white space (tabs, spaces, etc) from the beginning and end of the string.
The primary namespace for the NDEVR SDK.
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
static constexpr bool IsInvalid(const Angle< t_type > &value)
Checks whether the given Angle holds an invalid value.