COOPY » Guide  version 0.6.5
Public Member Functions | Static Public Member Functions | Data Fields
coopy::fold::FoldedSheet Class Reference

#include <FoldedSheet.h>

Inheritance diagram for coopy::fold::FoldedSheet:
coopy::store::TypedSheet< FoldedCell > coopy::store::DataSheet coopy::store::RefCount

Public Member Functions

virtual std::string cellString (int x, int y) const
virtual std::string cellString (int x, int y, bool &escaped) const
virtual bool cellString (int x, int y, const std::string &str)
 sets the contents of cell in column x, row y to a specified string value
virtual bool cellString (int x, int y, const std::string &str, bool escaped)
 sets the contents of cell in column x, row y to a specified string value, or to NULL if "escaped" is set.
virtual coopy::store::SheetCell cellSummary (int x, int y) const
virtual bool cellSummary (int x, int y, const coopy::store::SheetCell &c)
 sets the contents of cell in column x, row y to a specified value.
virtual DataSheet * getNestedSheet (int x, int y)
virtual bool hasExternalColumnNames () const
void clear ()
virtual bool resize (int w, int h)
void resize (int w, int h, const FoldedCell &zero)
void nonDestructiveResize (int w, int h, const FoldedCell &zero)
int width () const
int height () const
FoldedCellcell (int x, int y)
const FoldedCellcell (int x, int y) const
virtual bool deleteColumn (const ColumnRef &column)
virtual ColumnRef insertColumn (const ColumnRef &base)
virtual ColumnRef insertColumn (const ColumnRef &base, const ColumnInfo &info)
virtual bool modifyColumn (const ColumnRef &base, const ColumnInfo &info)
virtual ColumnRef moveColumn (const ColumnRef &src, const ColumnRef &base)
virtual bool deleteRow (const RowRef &src)
virtual RowRef insertRow (const RowRef &base)
virtual Poly< SheetRowinsertRow ()
virtual RowRef moveRow (const RowRef &src, const RowRef &base)
virtual bool applySchema (const SheetSchema &ss)
virtual std::string getDescription () const
virtual bool canEscape () const
virtual SheetCell getCell (int x, int y) const
virtual bool setCell (int x, int y, const SheetCell &c)
 set contents of cell in column x, row y
std::string encode (const SheetStyle &style) const
 Render table as serialized text, using the specified style.
std::string toString () const
 Render table as serialized text, using a default style.
virtual bool clearCache ()
 Remove any cached values if used, e.g.
virtual SheetSchema * getSchema () const
virtual bool deleteRows (const RowRef &first, const RowRef &last)
virtual bool deleteData (int offset=0)
virtual bool hasDimension () const
virtual bool forceWidth (int width)
virtual bool forceHeight (int height)
virtual bool copyData (const DataSheet &src)
virtual bool canWrite ()
virtual bool canResize ()
virtual Poly< SheetRowinsertRowOrdered (const RowRef &base)
virtual bool applyRowCache (const RowCache &cache, int row, SheetCell *result)
virtual bool addedHeader ()
virtual std::vector< std::string > getNestedDescription () const
virtual std::string desc () const
virtual std::string getHash (bool cache=false) const
virtual std::string getRawHash () const
virtual DataSheet & tail ()
virtual const DataSheet & tail_const () const
virtual const DataSheet & dataTail () const
virtual bool isSequential () const
virtual Poly< Appearance > getCellAppearance (int x, int y)
virtual Poly< Appearance > getRowAppearance (int y)
virtual Poly< Appearance > getColAppearance (int x)
virtual bool hasSheetName () const
virtual bool hasRowOffset () const
virtual bool setPool (Pool *pool)
virtual Pool * getPool () const
virtual void setMeta (SheetSchema *hint)
virtual SheetSchemagetMeta () const
virtual bool beginTransaction ()
virtual bool rollbackTransaction ()
virtual bool endTransaction ()
virtual void * getDatabase () const
virtual coopy::cmp::ComparegetComparisonMethod ()
int addReference ()
int removeReference ()
int getReferenceCount ()

Static Public Member Functions

static std::string encodeCell (const SheetCell &str, const SheetStyle &style)
 Encode a cell value as text using a specified style.

Data Fields

std::vector< std::vector
< FoldedCell > > 
arr
int h
int w
FoldedCell zero

Detailed Description

Definition at line 56 of file FoldedSheet.h.


Member Function Documentation

virtual bool coopy::store::DataSheet::addedHeader ( ) [inline, virtual, inherited]
int coopy::store::RefCount::addReference ( ) [inline, inherited]
bool DataSheet::applyRowCache ( const RowCache cache,
int  row,
SheetCell result 
) [virtual, inherited]
virtual bool coopy::store::TypedSheet< FoldedCell >::applySchema ( const SheetSchema ss) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 215 of file TypedSheet.h.

virtual bool coopy::store::DataSheet::beginTransaction ( ) [inline, virtual, inherited]
virtual bool coopy::store::DataSheet::canEscape ( ) const [inline, virtual, inherited]
Returns:
true iff cells in this table may be NULL

Definition at line 139 of file DataSheet.h.

virtual bool coopy::store::DataSheet::canResize ( ) [inline, virtual, inherited]
virtual bool coopy::store::DataSheet::canWrite ( ) [inline, virtual, inherited]
const FoldedCell & coopy::store::TypedSheet< FoldedCell >::cell ( int  x,
int  y 
) const [inline, inherited]

Definition at line 83 of file TypedSheet.h.

FoldedCell & coopy::store::TypedSheet< FoldedCell >::cell ( int  x,
int  y 
) [inline, inherited]

Definition at line 79 of file TypedSheet.h.

Referenced by cellSummary(), and getNestedSheet().

virtual bool coopy::fold::FoldedSheet::cellString ( int  x,
int  y,
const std::string &  str,
bool  escaped 
) [inline, virtual]

sets the contents of cell in column x, row y to a specified string value, or to NULL if "escaped" is set.

Reimplemented from coopy::store::DataSheet.

Definition at line 75 of file FoldedSheet.h.

References cellSummary().

virtual std::string coopy::fold::FoldedSheet::cellString ( int  x,
int  y,
bool &  escaped 
) const [inline, virtual]
Returns:
contents of cell in column x, row y, as a string. The "escaped" variable is set to true iff the cell has a NULL value.

Reimplemented from coopy::store::DataSheet.

Definition at line 65 of file FoldedSheet.h.

References cellSummary(), coopy::store::SheetCell::escaped, and coopy::store::SheetCell::text.

virtual std::string coopy::fold::FoldedSheet::cellString ( int  x,
int  y 
) const [inline, virtual]
Returns:
contents of cell in column x, row y, as a string. The value returned by a cell with a NULL value is unspecified.

Reimplemented from coopy::store::TypedSheet< FoldedCell >.

Definition at line 60 of file FoldedSheet.h.

Referenced by readPart().

virtual bool coopy::fold::FoldedSheet::cellString ( int  x,
int  y,
const std::string &  str 
) [inline, virtual]

sets the contents of cell in column x, row y to a specified string value

Reimplemented from coopy::store::DataSheet.

Definition at line 71 of file FoldedSheet.h.

References cellSummary().

SheetCell FoldedSheet::cellSummary ( int  x,
int  y 
) const [virtual]
virtual bool coopy::fold::FoldedSheet::cellSummary ( int  x,
int  y,
const coopy::store::SheetCell c 
) [inline, virtual]

sets the contents of cell in column x, row y to a specified value.

Reimplemented from coopy::store::DataSheet.

Definition at line 81 of file FoldedSheet.h.

References coopy::store::TypedSheet< FoldedCell >::cell(), coopy::fold::FoldedCell::datum, and coopy::fold::FoldedCell::sheet.

void coopy::store::TypedSheet< FoldedCell >::clear ( ) [inline, inherited]

Definition at line 30 of file TypedSheet.h.

virtual bool coopy::store::DataSheet::clearCache ( ) [inline, virtual, inherited]

Remove any cached values if used, e.g.

in proxies for remote tables.

Reimplemented in coopy::store::remotesql::RemoteSqlSheet, and coopy::store::sqlite::SqliteSheet.

Definition at line 191 of file DataSheet.h.

bool DataSheet::copyData ( const DataSheet src) [virtual, inherited]
virtual const DataSheet& coopy::store::DataSheet::dataTail ( ) const [inline, virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 329 of file DataSheet.h.

Referenced by coopy::store::PolySheet::dataTail(), and coopy::cmp::Patcher::getSheet().

virtual bool coopy::store::TypedSheet< FoldedCell >::deleteColumn ( const ColumnRef column) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 92 of file TypedSheet.h.

virtual bool coopy::store::DataSheet::deleteData ( int  offset = 0) [inline, virtual, inherited]
virtual bool coopy::store::TypedSheet< FoldedCell >::deleteRow ( const RowRef src) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 157 of file TypedSheet.h.

virtual bool coopy::store::DataSheet::deleteRows ( const RowRef first,
const RowRef last 
) [inline, virtual, inherited]
virtual std::string coopy::store::DataSheet::desc ( ) const [inline, virtual, inherited]
std::string DataSheet::encode ( const SheetStyle style) const [inherited]
std::string DataSheet::encodeCell ( const SheetCell str,
const SheetStyle style 
) [static, inherited]
virtual bool coopy::store::DataSheet::endTransaction ( ) [inline, virtual, inherited]
virtual bool coopy::store::DataSheet::forceHeight ( int  height) [inline, virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 246 of file DataSheet.h.

Referenced by coopy::store::PolySheet::forceHeight().

virtual bool coopy::store::DataSheet::forceWidth ( int  width) [inline, virtual, inherited]
virtual SheetCell coopy::store::DataSheet::getCell ( int  x,
int  y 
) const [inline, virtual, inherited]
Returns:
contents of cell in column x, row y

Definition at line 148 of file DataSheet.h.

References coopy::store::DataSheet::cellSummary().

Referenced by coopy::store::DataSheet::copyData().

virtual Poly<Appearance> coopy::store::DataSheet::getCellAppearance ( int  x,
int  y 
) [inline, virtual, inherited]
virtual Poly<Appearance> coopy::store::DataSheet::getColAppearance ( int  x) [inline, virtual, inherited]
virtual coopy::cmp::Compare* coopy::store::DataSheet::getComparisonMethod ( ) [inline, virtual, inherited]
virtual void* coopy::store::DataSheet::getDatabase ( ) const [inline, virtual, inherited]
virtual std::string coopy::store::TypedSheet< FoldedCell >::getDescription ( ) const [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 222 of file TypedSheet.h.

std::string DataSheet::getHash ( bool  cache = false) const [virtual, inherited]
SheetSchema * DataSheet::getMeta ( ) const [virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 12 of file DataSheet.cpp.

Referenced by coopy::store::PolySheet::getMeta(), and coopy::cmp::Patcher::metaHint().

virtual std::vector<std::string> coopy::store::DataSheet::getNestedDescription ( ) const [inline, virtual, inherited]
virtual DataSheet* coopy::fold::FoldedSheet::getNestedSheet ( int  x,
int  y 
) [inline, virtual]
virtual Pool* coopy::store::DataSheet::getPool ( ) const [inline, virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 367 of file DataSheet.h.

Referenced by coopy::store::PolySheet::getPool().

virtual std::string coopy::store::DataSheet::getRawHash ( ) const [inline, virtual, inherited]
int coopy::store::RefCount::getReferenceCount ( ) [inline, inherited]

Definition at line 40 of file RefCount.h.

virtual Poly<Appearance> coopy::store::DataSheet::getRowAppearance ( int  y) [inline, virtual, inherited]
virtual SheetSchema* coopy::store::DataSheet::getSchema ( ) const [inline, virtual, inherited]
virtual bool coopy::store::DataSheet::hasDimension ( ) const [inline, virtual, inherited]
virtual bool coopy::fold::FoldedSheet::hasExternalColumnNames ( ) const [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 93 of file FoldedSheet.h.

virtual bool coopy::store::DataSheet::hasRowOffset ( ) const [inline, virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 358 of file DataSheet.h.

Referenced by coopy::store::PolySheet::hasRowOffset(), and coopy::cmp::Patcher::metaHint().

virtual bool coopy::store::DataSheet::hasSheetName ( ) const [inline, virtual, inherited]

Reimplemented in coopy::store::CsvSheet, and coopy::store::PolySheet.

Definition at line 354 of file DataSheet.h.

Referenced by coopy::store::PolySheet::hasSheetName().

int coopy::store::TypedSheet< FoldedCell >::height ( ) const [inline, virtual, inherited]
Returns:
height of table

Implements coopy::store::DataSheet.

Definition at line 75 of file TypedSheet.h.

virtual ColumnRef coopy::store::TypedSheet< FoldedCell >::insertColumn ( const ColumnRef base) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 103 of file TypedSheet.h.

virtual ColumnRef coopy::store::TypedSheet< FoldedCell >::insertColumn ( const ColumnRef base,
const ColumnInfo info 
) [inline, virtual, inherited]

Implements coopy::store::DataSheet.

Definition at line 117 of file TypedSheet.h.

Poly< SheetRow > DataSheet::insertRow ( ) [virtual, inherited]
virtual RowRef coopy::store::TypedSheet< FoldedCell >::insertRow ( const RowRef base) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 165 of file TypedSheet.h.

Poly< SheetRow > DataSheet::insertRowOrdered ( const RowRef base) [virtual, inherited]
virtual bool coopy::store::DataSheet::isSequential ( ) const [inline, virtual, inherited]
virtual bool coopy::store::TypedSheet< FoldedCell >::modifyColumn ( const ColumnRef base,
const ColumnInfo info 
) [inline, virtual, inherited]

Implements coopy::store::DataSheet.

Definition at line 122 of file TypedSheet.h.

virtual ColumnRef coopy::store::TypedSheet< FoldedCell >::moveColumn ( const ColumnRef src,
const ColumnRef base 
) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 128 of file TypedSheet.h.

virtual RowRef coopy::store::TypedSheet< FoldedCell >::moveRow ( const RowRef src,
const RowRef base 
) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 182 of file TypedSheet.h.

void coopy::store::TypedSheet< FoldedCell >::nonDestructiveResize ( int  w,
int  h,
const FoldedCell &  zero 
) [inline, inherited]

Definition at line 54 of file TypedSheet.h.

int coopy::store::RefCount::removeReference ( ) [inline, inherited]
void coopy::store::TypedSheet< FoldedCell >::resize ( int  w,
int  h,
const FoldedCell &  zero 
) [inline, inherited]

Definition at line 40 of file TypedSheet.h.

virtual bool coopy::store::TypedSheet< FoldedCell >::resize ( int  w,
int  h 
) [inline, virtual, inherited]

Reimplemented from coopy::store::DataSheet.

Definition at line 35 of file TypedSheet.h.

virtual bool coopy::store::DataSheet::rollbackTransaction ( ) [inline, virtual, inherited]
virtual bool coopy::store::DataSheet::setCell ( int  x,
int  y,
const SheetCell c 
) [inline, virtual, inherited]

set contents of cell in column x, row y

Definition at line 157 of file DataSheet.h.

References coopy::store::DataSheet::cellSummary().

Referenced by coopy::store::DataSheet::applyRowCache(), and coopy::store::DataSheet::copyData().

void DataSheet::setMeta ( SheetSchema hint) [virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 18 of file DataSheet.cpp.

References NULL.

Referenced by coopy::store::PolySheet::setMeta(), and coopy::store::DataSheet::~DataSheet().

virtual bool coopy::store::DataSheet::setPool ( Pool pool) [inline, virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 362 of file DataSheet.h.

Referenced by coopy::store::TextBook::applyPool(), and coopy::store::PolySheet::setPool().

virtual DataSheet& coopy::store::DataSheet::tail ( ) [inline, virtual, inherited]
virtual const DataSheet& coopy::store::DataSheet::tail_const ( ) const [inline, virtual, inherited]

Reimplemented in coopy::store::PolySheet.

Definition at line 325 of file DataSheet.h.

Referenced by coopy::store::PolySheet::tail_const().

std::string coopy::store::DataSheet::toString ( ) const [inline, inherited]

Render table as serialized text, using a default style.

Definition at line 173 of file DataSheet.h.

References coopy::store::DataSheet::encode().

Referenced by coopy::cmp::SheetPatcher::changeColumn(), main(), coopy::store::TextBook::toString(), and coopy::store::socialcalc::SocialCalcTextBook::write().

int coopy::store::TypedSheet< FoldedCell >::width ( ) const [inline, virtual, inherited]
Returns:
width of table

Implements coopy::store::DataSheet.

Definition at line 71 of file TypedSheet.h.


Field Documentation

std::vector<std::vector<FoldedCell > > coopy::store::TypedSheet< FoldedCell >::arr [inherited]

Definition at line 22 of file TypedSheet.h.

int coopy::store::TypedSheet< FoldedCell >::h [inherited]

Definition at line 23 of file TypedSheet.h.

int coopy::store::TypedSheet< FoldedCell >::w [inherited]

Definition at line 23 of file TypedSheet.h.

Definition at line 24 of file TypedSheet.h.


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines