|
COOPY » Guide
version 0.6.5
|
Container for a workbook (collection of tables) backed by any kind of spreadsheet or database. More...
#include <PolyBook.h>
Public Member Functions | |
| PolyBook () | |
| virtual | ~PolyBook () |
| void | clear () |
| void | take (TextBook *book) |
| TextBook * | give () |
| PolyBook (const PolyBook &alt) | |
| const PolyBook & | operator= (const PolyBook &alt) |
| virtual std::vector< std::string > | getNames () |
| virtual int | getSheetCount () |
| virtual PolySheet | readSheet (const std::string &name) |
| bool | isValid () const |
| bool | readForReference (const char *fname, PolyBook &base) |
| bool | read (const char *fname, const char *ext=NULL, PolyBook *base=NULL) |
| bool | readIfExists (const char *fname) |
| bool | readAndWillWrite (const char *in_name, const char *in_format, const char *out_name, const char *out_format) |
| bool | attach (const char *fname, const char *ext=NULL) |
| bool | attachReadWrite (const char *fname) |
| bool | write (const char *fname, const char *ext=NULL) |
| bool | attach (coopy::store::Property &config, PolyBook *base=NULL) |
| coopy::store::Property | getType (const char *fname, const char *ext=NULL) |
| bool | flush () |
| bool | inplace () const |
| virtual bool | canWrite () const |
| virtual bool | copy (const TextBook &alt, const Property &options) |
| virtual bool | addSheet (const SheetSchema &schema) |
| virtual bool | namedSheets () const |
| virtual PolySheet | provideSheet (const SheetSchema &schema) |
| virtual std::string | desc () const |
| virtual TextBook & | tail () |
| virtual bool | setPool (Pool *pool) |
| virtual Pool * | getPool () const |
| virtual bool | writtenToFuture () const |
| virtual bool | open (const Property &config) |
| virtual PolySheet | readSheetByIndex (int index) |
| virtual bool | save (const char *fname, const char *format) |
| bool | operator== (const TextBook &alt) const |
| bool | equals (const TextBook &alt, const coopy::cmp::CompareFlags &flags) const |
| bool | fixSchema (const SheetSchema &in, SimpleSheetSchema &out) |
| bool | applyPool (DataSheet &sheet) |
| std::string | toString () |
| int | addReference () |
| int | removeReference () |
| int | getReferenceCount () |
Static Public Member Functions | |
| static bool | expand (coopy::store::Property &config) |
| static void | showFormats () |
| static std::vector < coopy::store::FormatDesc > | getFormatList () |
| static bool | copyFile (const char *src, const char *dest) |
| static bool | exists (const char *fname) |
Container for a workbook (collection of tables) backed by any kind of spreadsheet or database.
Definition at line 21 of file PolyBook.h.
| coopy::store::PolyBook::PolyBook | ( | ) | [inline] |
Definition at line 26 of file PolyBook.h.
| virtual coopy::store::PolyBook::~PolyBook | ( | ) | [inline, virtual] |
Definition at line 30 of file PolyBook.h.
References clear().
| coopy::store::PolyBook::PolyBook | ( | const PolyBook & | alt | ) | [inline] |
Definition at line 60 of file PolyBook.h.
References coopy::store::RefCount::addReference().
| int coopy::store::RefCount::addReference | ( | ) | [inline, inherited] |
Definition at line 30 of file RefCount.h.
Referenced by attach(), coopy::fold::FoldedCell::FoldedCell(), coopy::fold::FoldedCell::getOrCreateSheet(), operator=(), coopy::store::PolyValue::operator=(), coopy::store::PolySheet::operator=(), coopy::fold::FoldedCell::operator=(), PolyBook(), coopy::store::PolySheet::PolySheet(), coopy::store::PolyValue::PolyValue(), coopy::store::PolySheet::setSchema(), and take().
| virtual bool coopy::store::PolyBook::addSheet | ( | const SheetSchema & | schema | ) | [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 225 of file PolyBook.h.
References coopy::store::TextBook::addSheet().
| bool coopy::store::TextBook::applyPool | ( | DataSheet & | sheet | ) | [inline, inherited] |
Definition at line 92 of file TextBook.h.
References coopy::store::TextBook::getPool(), and coopy::store::DataSheet::setPool().
Referenced by coopy::store::TextBook::copy().
| bool coopy::store::PolyBook::attach | ( | const char * | fname, |
| const char * | ext = NULL |
||
| ) | [inline] |
Definition at line 150 of file PolyBook.h.
References NULL, and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply(), attachReadWrite(), generateExample(), main(), read(), readAndWillWrite(), readIfExists(), and write().
| bool PolyBook::attach | ( | coopy::store::Property & | config, |
| PolyBook * | base = NULL |
||
| ) |
Definition at line 265 of file PolyBook.cpp.
References coopy::store::RefCount::addReference(), coopy::store::Value::asBoolean(), coopy::store::Value::asString(), coopy::store::AttachConfig::baseBook, coopy::store::AttachConfig::canCreate, coopy::store::AttachConfig::canOverwrite, coopy::store::Property::check(), coopy::store::AttachConfig::data, dbg_printf, coopy::store::AttachConfig::ext, coopy::store::AttachConfig::fname, coopy::store::Property::get(), NULL, coopy::store::AttachConfig::options, coopy::store::AttachConfig::prevBook, coopy::store::AttachConfig::prevOptions, coopy::store::AttachConfig::shouldRead, coopy::store::AttachConfig::shouldWrite, and coopy::store::Property::toString().
| bool coopy::store::PolyBook::attachReadWrite | ( | const char * | fname | ) | [inline] |
Definition at line 165 of file PolyBook.h.
References attach(), and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply().
| virtual bool coopy::store::PolyBook::canWrite | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 215 of file PolyBook.h.
References coopy::store::TextBook::inplace().
| void coopy::store::PolyBook::clear | ( | ) | [inline] |
Definition at line 34 of file PolyBook.h.
References coopy::store::RefCount::removeReference().
Referenced by coopy::app::Options::apply(), operator=(), take(), and ~PolyBook().
Reimplemented from coopy::store::TextBook.
Definition at line 375 of file PolyBook.cpp.
Referenced by coopy::app::Diff::apply(), csvs_diff(), coopy::fold::FoldTool::fold(), and coopy::fold::FoldTool::unfold().
| bool PolyBook::copyFile | ( | const char * | src, |
| const char * | dest | ||
| ) | [static] |
Definition at line 361 of file PolyBook.cpp.
| virtual std::string coopy::store::PolyBook::desc | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 243 of file PolyBook.h.
References coopy::store::TextBook::desc().
| bool TextBook::equals | ( | const TextBook & | alt, |
| const coopy::cmp::CompareFlags & | flags | ||
| ) | const [inherited] |
Definition at line 16 of file TextBook.cpp.
References coopy::cmp::CompareFlags::assume_header, coopy::store::PolySheet::cellSummary(), dbg_printf, coopy::store::TextBook::getNames(), coopy::store::PolySheet::getSchema(), coopy::store::PolySheet::height(), coopy::store::PolySheet::hideHeaders(), coopy::store::PolySheet::isValid(), NULL, coopy::store::TextBook::readSheet(), coopy::store::PolySheet::setSchema(), coopy::store::SchemaSniffer::suggestSchema(), coopy::store::SheetCell::toString(), and coopy::store::PolySheet::width().
Referenced by coopy::app::Diff::apply(), and coopy::store::TextBook::operator==().
| bool TextBook::exists | ( | const char * | fname | ) | [static, inherited] |
Definition at line 248 of file TextBook.cpp.
Referenced by coopy::store::CsvTextBookFactory::open().
| bool PolyBook::expand | ( | coopy::store::Property & | config | ) | [static] |
Definition at line 119 of file PolyBook.cpp.
References coopy::store::Value::asString(), coopy::store::Property::check(), dbg_printf, coopy::format::FORMAT_BOOK_CSVS, coopy::format::FORMAT_BOOK_SQLITE, coopy::store::Property::get(), coopy::format::FormatSniffer::getFormat(), coopy::format::Format::id, coopy::format::FormatSniffer::open(), coopy::store::Property::put(), readHelperJson(), and coopy::store::Property::toString().
Referenced by getType(), and readAndWillWrite().
| bool TextBook::fixSchema | ( | const SheetSchema & | in, |
| SimpleSheetSchema & | out | ||
| ) | [inherited] |
Definition at line 255 of file TextBook.cpp.
References coopy::store::ColumnType::autoIncrement, coopy::store::ColumnType::autoIncrementSet, coopy::store::SimpleSheetSchema::copy(), coopy::store::ColumnType::foreignKey, coopy::store::ColumnType::foreignKeySet, coopy::store::ColumnType::foreignTable, coopy::store::SimpleSheetSchema::getColumnCount(), coopy::store::SimpleSheetSchema::getColumnInfo(), coopy::store::PoolColumnLink::getColumnName(), coopy::store::ColumnInfo::getName(), coopy::store::SimpleSheetSchema::getSheetName(), coopy::store::PoolColumnLink::getTableName(), coopy::store::PoolColumnLink::isInventor(), coopy::store::PoolColumnLink::isValid(), coopy::store::SimpleSheetSchema::modifyType(), coopy::store::ColumnType::primaryKey, and coopy::store::ColumnType::primaryKeySet.
Referenced by coopy::store::TextBook::copy(), and coopy::cmp::MergeOutputFilter::emitPreamble().
| bool PolyBook::flush | ( | ) |
Definition at line 314 of file PolyBook.cpp.
Referenced by coopy::app::Diff::apply(), generateExample(), and main().
| std::vector< FormatDesc > PolyBook::getFormatList | ( | ) | [static] |
Definition at line 327 of file PolyBook.cpp.
References coopy::store::FormatDesc::addExtension(), coopy::store::FormatDesc::addOption(), getFactoriesList(), and STRVAL.
| virtual std::vector<std::string> coopy::store::PolyBook::getNames | ( | ) | [inline, virtual] |
Implements coopy::store::TextBook.
Reimplemented in coopy::store::FilteredTextBook.
Definition at line 76 of file PolyBook.h.
References coopy::store::TextBook::getNames().
Referenced by coopy::app::Diff::apply(), coopy::fold::FoldTool::fold(), getSheetCount(), main(), and coopy::fold::FoldTool::unfold().
| virtual Pool* coopy::store::PolyBook::getPool | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 269 of file PolyBook.h.
References coopy::store::TextBook::getPool().
| int coopy::store::RefCount::getReferenceCount | ( | ) | [inline, inherited] |
Definition at line 40 of file RefCount.h.
| virtual int coopy::store::PolyBook::getSheetCount | ( | ) | [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 83 of file PolyBook.h.
References getNames().
Referenced by coopy::app::Diff::apply(), coopy::fold::FoldTool::fold(), and main().
| coopy::store::Property coopy::store::PolyBook::getType | ( | const char * | fname, |
| const char * | ext = NULL |
||
| ) | [inline] |
Definition at line 194 of file PolyBook.h.
References expand(), NULL, and coopy::store::Property::put().
Referenced by copyBook().
| TextBook* coopy::store::PolyBook::give | ( | ) | [inline] |
Definition at line 52 of file PolyBook.h.
References coopy::store::RefCount::removeReference().
Referenced by coopy::app::Diff::apply().
| bool coopy::store::PolyBook::inplace | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 208 of file PolyBook.h.
References coopy::store::TextBook::inplace().
Referenced by coopy::app::Diff::apply(), and WideSheetManager::mergeToLocal().
| bool coopy::store::PolyBook::isValid | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 94 of file PolyBook.h.
References NULL.
Referenced by coopy::app::Diff::apply(), and main().
| virtual bool coopy::store::PolyBook::namedSheets | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 231 of file PolyBook.h.
References coopy::store::TextBook::namedSheets().
Referenced by coopy::app::Diff::apply().
| virtual bool coopy::store::TextBook::open | ( | const Property & | config | ) | [inline, virtual, inherited] |
Reimplemented in coopy::store::mdb::AccessTextBook, coopy::store::json::JsonBook, coopy::store::ShortTextBook, coopy::store::mdb::JackTextBook, coopy::store::remotesql::RemoteSqlTextBook, and coopy::store::socialcalc::SocialCalcTextBook.
Definition at line 32 of file TextBook.h.
Referenced by main().
Definition at line 67 of file PolyBook.h.
References coopy::store::RefCount::addReference(), and clear().
| bool coopy::store::TextBook::operator== | ( | const TextBook & | alt | ) | const [inline, inherited] |
Definition at line 54 of file TextBook.h.
References coopy::store::TextBook::equals().
| virtual PolySheet coopy::store::PolyBook::provideSheet | ( | const SheetSchema & | schema | ) | [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 237 of file PolyBook.h.
References coopy::store::TextBook::provideSheet().
Referenced by coopy::fold::FoldTool::fold().
| bool coopy::store::PolyBook::read | ( | const char * | fname, |
| const char * | ext = NULL, |
||
| PolyBook * | base = NULL |
||
| ) | [inline] |
Definition at line 100 of file PolyBook.h.
References attach(), NULL, and coopy::store::Property::put().
Referenced by WideSheetManager::acceptSheet(), coopy::app::Options::apply(), coopy::app::Diff::apply(), copyFile(), WideSheetManager::diffSheet(), WideSheetManager::exportSheet(), coopy::app::Coopy::loadBook(), main(), WideSheetManager::mergeToLocal(), and readForReference().
| bool coopy::store::PolyBook::readAndWillWrite | ( | const char * | in_name, |
| const char * | in_format, | ||
| const char * | out_name, | ||
| const char * | out_format | ||
| ) | [inline] |
Definition at line 124 of file PolyBook.h.
References attach(), expand(), coopy::store::Property::nest(), NULL, and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply().
| bool coopy::store::PolyBook::readForReference | ( | const char * | fname, |
| PolyBook & | base | ||
| ) | [inline] |
Definition at line 96 of file PolyBook.h.
Referenced by coopy::app::Diff::apply().
| bool coopy::store::PolyBook::readIfExists | ( | const char * | fname | ) | [inline] |
Definition at line 114 of file PolyBook.h.
References attach(), and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply().
| virtual PolySheet coopy::store::PolyBook::readSheet | ( | const std::string & | name | ) | [inline, virtual] |
Implements coopy::store::TextBook.
Definition at line 87 of file PolyBook.h.
References coopy::store::TextBook::readSheet().
Referenced by coopy::fold::FoldTool::fold(), main(), and coopy::fold::FoldTool::unfold().
| virtual PolySheet coopy::store::TextBook::readSheetByIndex | ( | int | index | ) | [inline, virtual, inherited] |
Reimplemented in coopy::store::gnumeric::GnumericTextBook.
Definition at line 38 of file TextBook.h.
References coopy::store::TextBook::getNames(), and coopy::store::TextBook::readSheet().
Referenced by coopy::app::Diff::apply(), coopy::store::Highlighter::apply(), coopy::cmp::BookCompare::compare(), csvs_diff(), coopy::fold::FoldTool::fold(), main(), coopy::cmp::BookCompare::resolve(), coopy::cmp::SheetPatcher::setSheet(), coopy::fold::FoldTool::unfold(), coopy::store::socialcalc::SocialCalcTextBook::write(), and coopy::store::CsvTextBook::write().
| int coopy::store::RefCount::removeReference | ( | ) | [inline, inherited] |
Definition at line 35 of file RefCount.h.
Referenced by clear(), coopy::store::PolyValue::clear(), coopy::store::PolySheet::clearSchema(), coopy::store::PolySheet::clearSheet(), and give().
| virtual bool coopy::store::TextBook::save | ( | const char * | fname, |
| const char * | format | ||
| ) | [inline, virtual, inherited] |
Reimplemented in coopy::store::gnumeric::GnumericTextBook.
Definition at line 44 of file TextBook.h.
| virtual bool coopy::store::PolyBook::setPool | ( | Pool * | pool | ) | [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 263 of file PolyBook.h.
References coopy::store::TextBook::setPool().
| void PolyBook::showFormats | ( | ) | [static] |
Definition at line 345 of file PolyBook.cpp.
| virtual TextBook& coopy::store::PolyBook::tail | ( | ) | [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 250 of file PolyBook.h.
References coopy::store::TextBook::tail().
| void coopy::store::PolyBook::take | ( | TextBook * | book | ) | [inline] |
Definition at line 44 of file PolyBook.h.
References coopy::store::RefCount::addReference(), and clear().
Referenced by coopy::app::Diff::apply(), coopy::app::Coopy::createBook(), csvs_diff(), coopy::store::FilteredTextBook::FilteredTextBook(), coopy::fold::FoldTool::fold(), and generateExample().
| std::string coopy::store::TextBook::toString | ( | ) | [inline, inherited] |
Definition at line 106 of file TextBook.h.
References coopy::store::TextBook::getNames(), coopy::store::TextBook::readSheet(), and coopy::store::DataSheet::toString().
| bool coopy::store::PolyBook::write | ( | const char * | fname, |
| const char * | ext = NULL |
||
| ) | [inline] |
Definition at line 176 of file PolyBook.h.
References attach(), NULL, and coopy::store::Property::put().
Referenced by WideSheetManager::acceptSheet(), coopy::app::Diff::apply(), copyBook(), copyFile(), WideSheetManager::exportSheet(), generateExample(), and WideSheetManager::mergeToLocal().
| virtual bool coopy::store::PolyBook::writtenToFuture | ( | ) | const [inline, virtual] |
Reimplemented from coopy::store::TextBook.
Definition at line 275 of file PolyBook.h.
References coopy::store::TextBook::writtenToFuture().
1.7.4