csvdom.h
// Copyright (c) 1999-2018 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_CSVDOM_H
#define RUDIMENTS_CSVDOM_H
#include <rudiments/private/csvdomincludes.h>
class RUDIMENTS_DLLSPEC csvdom : public csvsax, public dom {
public:
csvdom();
csvdom(bool stringcacheenabled);
virtual ~csvdom();
bool parseFile(const char *filename);
bool parseString(const char *string);
void createRootNode();
uint64_t getColumnCount();
const char *getColumnName(uint64_t position);
bool getColumnPosition(const char *name, uint64_t *position);
bool upperCaseColumn(uint64_t position);
bool upperCaseColumn(const char *name);
bool upperCaseColumns();
bool lowerCaseColumn(uint64_t position);
bool lowerCaseColumn(const char *name);
bool lowerCaseColumns();
bool rightTrimColumn(uint64_t position);
bool rightTrimColumn(const char *name);
bool rightTrimColumns();
bool leftTrimColumn(uint64_t position);
bool leftTrimColumn(const char *name);
bool leftTrimColumns();
bool bothTrimColumn(uint64_t position);
bool bothTrimColumn(const char *name);
bool bothTrimColumns();
bool renameColumn(uint64_t position,
const char *name, bool quoted);
bool renameColumn(const char *oldname,
const char *newname, bool quoted);
bool renameColumn(const char * const *oldnames,
const char *newname, bool quoted);
bool renameAllColumns(const char *oldname,
const char *newname, bool quoted);
bool renameAllColumns(const char * const *oldnames,
const char *newname, bool quoted);
bool insertColumnBefore(uint64_t position,
const char *name, bool quoted);
bool insertColumnBefore(const char *name,
const char *newname, bool quoted);
bool insertColumnAfter(uint64_t position,
const char *name, bool quoted);
bool insertColumnAfter(const char *name,
const char *newname, bool quoted);
bool moveColumn(uint64_t oldposition, uint64_t newposition);
bool moveColumn(const char *name, uint64_t position);
bool deleteColumn(uint64_t position);
bool deleteColumn(const char *name);
bool getColumnIsEmpty(uint64_t position);
bool getColumnIsEmpty(const char *name);
bool deleteEmptyColumns();
uint64_t getRowCount();
domnode *getRow(uint64_t position);
const char *getField(uint64_t row, uint64_t column);
const char *getField(uint64_t row, const char *column);
bool setField(uint64_t row, uint64_t column,
const char *value, bool quoted);
bool setField(uint64_t row, const char *column,
const char *value, bool quoted);
bool rightTrimField(uint64_t row, uint64_t column);
bool rightTrimField(uint64_t row, const char *column);
bool leftTrimField(uint64_t row, uint64_t column);
bool leftTrimField(uint64_t row, const char *column);
bool bothTrimField(uint64_t row, uint64_t column);
bool bothTrimField(uint64_t row, const char *column);
void rightTrimFields();
void leftTrimFields();
void bothTrimFields();
bool insertRowBefore(uint64_t position);
bool insertRowAfter(uint64_t position);
bool moveRow(uint64_t oldposition, uint64_t newposition);
bool deleteRow(uint64_t position);
bool getRowIsEmpty(uint64_t position);
bool deleteEmptyRows();
void carryValueDown(uint64_t position);
void carryValueDown(const char *name);
void carryAllValuesDown();
bool write(output *out, bool indent) const;
protected:
virtual bool headerStart();
virtual bool column(const char *name, bool quoted);
virtual bool headerEnd();
virtual bool bodyStart();
virtual bool rowStart();
virtual bool field(const char *value, bool quoted);
virtual bool rowEnd();
virtual bool bodyEnd();
#include <rudiments/private/csvdom.h>
};
#endif
csvdom
Definition: csvdom.h:10
csvdom::write
bool write(output *out, bool indent) const
csvdom::getRowIsEmpty
bool getRowIsEmpty(uint64_t position)
csvdom::moveColumn
bool moveColumn(uint64_t oldposition, uint64_t newposition)
csvdom::getRowCount
uint64_t getRowCount()
csvdom::rightTrimColumn
bool rightTrimColumn(const char *name)
csvdom::getColumnIsEmpty
bool getColumnIsEmpty(const char *name)
csvdom::getColumnPosition
bool getColumnPosition(const char *name, uint64_t *position)
csvdom::insertRowAfter
bool insertRowAfter(uint64_t position)
csvdom::leftTrimFields
void leftTrimFields()
csvdom::deleteEmptyRows
bool deleteEmptyRows()
csvdom::rightTrimField
bool rightTrimField(uint64_t row, uint64_t column)
csvdom::deleteRow
bool deleteRow(uint64_t position)
csvdom::upperCaseColumns
bool upperCaseColumns()
csvdom::getColumnIsEmpty
bool getColumnIsEmpty(uint64_t position)
csvdom::setField
bool setField(uint64_t row, uint64_t column, const char *value, bool quoted)
csvdom::createRootNode
void createRootNode()
csvdom::leftTrimField
bool leftTrimField(uint64_t row, const char *column)
csvdom::carryValueDown
void carryValueDown(const char *name)
csvdom::bothTrimFields
void bothTrimFields()
csvdom::getField
const char * getField(uint64_t row, const char *column)
csvdom::bothTrimColumns
bool bothTrimColumns()
csvdom::rightTrimColumns
bool rightTrimColumns()
csvdom::parseFile
bool parseFile(const char *filename)
csvdom::leftTrimField
bool leftTrimField(uint64_t row, uint64_t column)
csvdom::insertColumnBefore
bool insertColumnBefore(uint64_t position, const char *name, bool quoted)
csvdom::insertColumnAfter
bool insertColumnAfter(uint64_t position, const char *name, bool quoted)
csvdom::bodyStart
virtual bool bodyStart()
csvdom::column
virtual bool column(const char *name, bool quoted)
csvdom::rowStart
virtual bool rowStart()
csvdom::getColumnName
const char * getColumnName(uint64_t position)
csvdom::renameColumn
bool renameColumn(uint64_t position, const char *name, bool quoted)
csvdom::rowEnd
virtual bool rowEnd()
csvdom::bodyEnd
virtual bool bodyEnd()
csvdom::getField
const char * getField(uint64_t row, uint64_t column)
csvdom::rightTrimFields
void rightTrimFields()
csvdom::lowerCaseColumn
bool lowerCaseColumn(uint64_t position)
csvdom::bothTrimColumn
bool bothTrimColumn(uint64_t position)
csvdom::insertColumnBefore
bool insertColumnBefore(const char *name, const char *newname, bool quoted)
csvdom::renameAllColumns
bool renameAllColumns(const char *oldname, const char *newname, bool quoted)
csvdom::leftTrimColumn
bool leftTrimColumn(const char *name)
csvdom::headerEnd
virtual bool headerEnd()
csvdom::getRow
domnode * getRow(uint64_t position)
csvdom::lowerCaseColumn
bool lowerCaseColumn(const char *name)
csvdom::leftTrimColumn
bool leftTrimColumn(uint64_t position)
csvdom::headerStart
virtual bool headerStart()
csvdom::upperCaseColumn
bool upperCaseColumn(const char *name)
csvdom::bothTrimField
bool bothTrimField(uint64_t row, const char *column)
csvdom::renameColumn
bool renameColumn(const char *oldname, const char *newname, bool quoted)
csvdom::carryValueDown
void carryValueDown(uint64_t position)
csvdom::insertRowBefore
bool insertRowBefore(uint64_t position)
csvdom::csvdom
csvdom(bool stringcacheenabled)
csvdom::field
virtual bool field(const char *value, bool quoted)
csvdom::rightTrimField
bool rightTrimField(uint64_t row, const char *column)
csvdom::moveColumn
bool moveColumn(const char *name, uint64_t position)
csvdom::carryAllValuesDown
void carryAllValuesDown()
csvdom::bothTrimField
bool bothTrimField(uint64_t row, uint64_t column)
csvdom::getColumnCount
uint64_t getColumnCount()
csvdom::lowerCaseColumns
bool lowerCaseColumns()
csvdom::renameColumn
bool renameColumn(const char *const *oldnames, const char *newname, bool quoted)
csvdom::bothTrimColumn
bool bothTrimColumn(const char *name)
csvdom::deleteColumn
bool deleteColumn(uint64_t position)
csvdom::renameAllColumns
bool renameAllColumns(const char *const *oldnames, const char *newname, bool quoted)
csvdom::deleteEmptyColumns
bool deleteEmptyColumns()
csvdom::upperCaseColumn
bool upperCaseColumn(uint64_t position)
csvdom::setField
bool setField(uint64_t row, const char *column, const char *value, bool quoted)
csvdom::deleteColumn
bool deleteColumn(const char *name)
csvdom::insertColumnAfter
bool insertColumnAfter(const char *name, const char *newname, bool quoted)
csvdom::csvdom
csvdom()
csvdom::moveRow
bool moveRow(uint64_t oldposition, uint64_t newposition)
csvdom::~csvdom
virtual ~csvdom()
csvdom::leftTrimColumns
bool leftTrimColumns()
csvdom::parseString
bool parseString(const char *string)
csvdom::rightTrimColumn
bool rightTrimColumn(uint64_t position)
csvsax
Definition: csvsax.h:12
dom
Definition: dom.h:10
domnode
Definition: domnode.h:122
output
Definition: output.h:9