COOPY » Guide  version 0.6.5
Public Types | Public Member Functions | Static Public Member Functions | Data Fields
coopy::store::EscapedTypedSheet< T > Class Template Reference

#include <TypedSheet.h>

Inheritance diagram for coopy::store::EscapedTypedSheet< T >:
coopy::store::DataSheet coopy::store::RefCount

Public Types

typedef std::pair< T, bool > pairCellType
typedef T cellType

Public Member Functions

 EscapedTypedSheet ()
void clear ()
void resize (int w, int h, const T &zero)
int width () const
int height () const
T & cell (int x, int y)
const T & cell (int x, int y) const
std::pair< T, bool > & pcell (int x, int y)
const std::pair< T, bool > & pcell (int x, int y) const
virtual std::string cellString (int x, int y) const =0
virtual std::string cellString (int x, int y, bool &escaped) const =0
virtual bool cellString (int x, int y, const std::string &str, bool escaped)=0
 sets the contents of cell in column x, row y to a specified string value, or to NULL if "escaped" is set.
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 RowRef moveRow (const RowRef &src, const RowRef &base)
virtual bool applySchema (const SheetSchema &ss)
virtual std::string getDescription () 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 SheetCell cellSummary (int x, int y) const
virtual bool cellSummary (int x, int y, const SheetCell &c)
 sets the contents of cell in column x, row y to a specified value.
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 SheetSchemagetSchema () 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 Poly< SheetRowinsertRow ()
virtual bool copyData (const DataSheet &src)
virtual bool canWrite ()
virtual bool canResize ()
virtual bool hasExternalColumnNames () const
virtual bool resize (int w, int h)
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 DataSheettail ()
virtual const DataSheettail_const () const
virtual const DataSheetdataTail () const
virtual bool isSequential () const
virtual DataSheetgetNestedSheet (int x, int y)
virtual Poly< AppearancegetCellAppearance (int x, int y)
virtual Poly< AppearancegetRowAppearance (int y)
virtual Poly< AppearancegetColAppearance (int x)
virtual bool hasSheetName () const
virtual bool hasRowOffset () const
virtual bool setPool (Pool *pool)
virtual PoolgetPool () 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

TypedSheet< std::pair< T, bool > > s

Detailed Description

template<class T>
class coopy::store::EscapedTypedSheet< T >

Definition at line 230 of file TypedSheet.h.


Member Typedef Documentation

template<class T>
typedef T coopy::store::EscapedTypedSheet< T >::cellType

Definition at line 234 of file TypedSheet.h.

template<class T>
typedef std::pair<T,bool> coopy::store::EscapedTypedSheet< T >::pairCellType

Definition at line 233 of file TypedSheet.h.


Constructor & Destructor Documentation

template<class T>
coopy::store::EscapedTypedSheet< T >::EscapedTypedSheet ( ) [inline]

Definition at line 242 of file TypedSheet.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]
template<class T>
virtual bool coopy::store::EscapedTypedSheet< T >::applySchema ( const SheetSchema ss) [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 334 of file TypedSheet.h.

Referenced by coopy::store::ShortTextBook::provideSheet().

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]
template<class T>
T& coopy::store::EscapedTypedSheet< T >::cell ( int  x,
int  y 
) [inline]

Definition at line 262 of file TypedSheet.h.

Referenced by coopy::store::CsvTextBook::readCsvs(), and write().

template<class T>
const T& coopy::store::EscapedTypedSheet< T >::cell ( int  x,
int  y 
) const [inline]

Definition at line 266 of file TypedSheet.h.

template<class T>
virtual std::string coopy::store::EscapedTypedSheet< T >::cellString ( int  x,
int  y 
) const [pure 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.

Implements coopy::store::DataSheet.

Implemented in coopy::store::CsvSheet.

template<class T>
virtual std::string coopy::store::EscapedTypedSheet< T >::cellString ( int  x,
int  y,
bool &  escaped 
) const [pure 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.

Implemented in coopy::store::CsvSheet.

template<class T>
virtual bool coopy::store::EscapedTypedSheet< T >::cellString ( int  x,
int  y,
const std::string &  str,
bool  escaped 
) [pure 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.

Implemented in coopy::store::CsvSheet.

virtual bool coopy::store::DataSheet::cellString ( int  x,
int  y,
const std::string &  str 
) [inline, virtual, inherited]
virtual SheetCell coopy::store::DataSheet::cellSummary ( int  x,
int  y 
) const [inline, virtual, inherited]
virtual bool coopy::store::DataSheet::cellSummary ( int  x,
int  y,
const SheetCell c 
) [inline, virtual, inherited]

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

Reimplemented in coopy::fold::FoldedSheet, coopy::store::PolySheet, and coopy::store::gnumeric::GnumericSheet.

Definition at line 130 of file DataSheet.h.

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

template<class T>
void coopy::store::EscapedTypedSheet< T >::clear ( ) [inline]

Reimplemented in coopy::store::CsvSheet.

Definition at line 245 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().

template<class T>
virtual bool coopy::store::EscapedTypedSheet< T >::deleteColumn ( const ColumnRef column) [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 299 of file TypedSheet.h.

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

Reimplemented from coopy::store::DataSheet.

Definition at line 321 of file TypedSheet.h.

Referenced by generateNumbers().

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]
template<class T>
virtual std::string coopy::store::EscapedTypedSheet< T >::getDescription ( ) const [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Reimplemented in coopy::store::CsvSheet.

Definition at line 338 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::store::DataSheet::getNestedSheet ( int  x,
int  y 
) [inline, virtual, inherited]

Reimplemented in coopy::fold::FoldedSheet, and coopy::store::PolySheet.

Definition at line 338 of file DataSheet.h.

Referenced by coopy::store::PolySheet::getNestedSheet(), and writePart().

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::store::DataSheet::hasExternalColumnNames ( ) const [inline, virtual, inherited]
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().

template<class T>
int coopy::store::EscapedTypedSheet< T >::height ( ) const [inline, virtual]
Returns:
height of table

Implements coopy::store::DataSheet.

Definition at line 258 of file TypedSheet.h.

Referenced by main(), and coopy::store::CsvTextBook::readCsvs().

template<class T>
virtual ColumnRef coopy::store::EscapedTypedSheet< T >::insertColumn ( const ColumnRef base,
const ColumnInfo info 
) [inline, virtual]

Implements coopy::store::DataSheet.

Definition at line 307 of file TypedSheet.h.

template<class T>
virtual ColumnRef coopy::store::EscapedTypedSheet< T >::insertColumn ( const ColumnRef base) [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 303 of file TypedSheet.h.

template<class T>
virtual RowRef coopy::store::EscapedTypedSheet< T >::insertRow ( const RowRef base) [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 325 of file TypedSheet.h.

Referenced by generateNumbers().

Poly< SheetRow > DataSheet::insertRow ( ) [virtual, inherited]
Poly< SheetRow > DataSheet::insertRowOrdered ( const RowRef base) [virtual, inherited]
virtual bool coopy::store::DataSheet::isSequential ( ) const [inline, virtual, inherited]
template<class T>
virtual bool coopy::store::EscapedTypedSheet< T >::modifyColumn ( const ColumnRef base,
const ColumnInfo info 
) [inline, virtual]

Implements coopy::store::DataSheet.

Definition at line 312 of file TypedSheet.h.

template<class T>
virtual ColumnRef coopy::store::EscapedTypedSheet< T >::moveColumn ( const ColumnRef src,
const ColumnRef base 
) [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 317 of file TypedSheet.h.

template<class T>
virtual RowRef coopy::store::EscapedTypedSheet< T >::moveRow ( const RowRef src,
const RowRef base 
) [inline, virtual]

Reimplemented from coopy::store::DataSheet.

Definition at line 330 of file TypedSheet.h.

template<class T>
std::pair<T,bool>& coopy::store::EscapedTypedSheet< T >::pcell ( int  x,
int  y 
) [inline]

Definition at line 270 of file TypedSheet.h.

Referenced by coopy::store::CsvSheet::addRow().

template<class T>
const std::pair<T,bool>& coopy::store::EscapedTypedSheet< T >::pcell ( int  x,
int  y 
) const [inline]

Definition at line 274 of file TypedSheet.h.

int coopy::store::RefCount::removeReference ( ) [inline, inherited]
template<class T>
void coopy::store::EscapedTypedSheet< T >::resize ( int  w,
int  h,
const T &  zero 
) [inline]

Definition at line 249 of file TypedSheet.h.

virtual bool coopy::store::DataSheet::resize ( int  w,
int  h 
) [inline, virtual, inherited]
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().

template<class T>
int coopy::store::EscapedTypedSheet< T >::width ( ) const [inline, virtual]
Returns:
width of table

Implements coopy::store::DataSheet.

Definition at line 254 of file TypedSheet.h.

Referenced by coopy::store::CsvSheet::addRow(), and main().


Field Documentation

template<class T>
TypedSheet<std::pair<T,bool> > coopy::store::EscapedTypedSheet< T >::s

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