COOPY » Guide
version 0.6.5
|
View limited set of sheets of a book. More...
#include <FilteredTextBook.h>
Public Member Functions | |
FilteredTextBook (TextBook *book, const std::vector< std::string > &names) | |
virtual std::vector< std::string > | getNames () |
void | clear () |
void | take (TextBook *book) |
TextBook * | give () |
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 | attach (coopy::store::Property &config, PolyBook *base=NULL) |
bool | attachReadWrite (const char *fname) |
bool | write (const char *fname, const char *ext=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) |
Data Fields | |
std::vector< std::string > | names |
PolyBook | orig |
View limited set of sheets of a book.
Definition at line 17 of file FilteredTextBook.h.
coopy::store::FilteredTextBook::FilteredTextBook | ( | TextBook * | book, |
const std::vector< std::string > & | names | ||
) | [inline] |
Definition at line 22 of file FilteredTextBook.h.
References names, and coopy::store::PolyBook::take().
int coopy::store::RefCount::addReference | ( | ) | [inline, inherited] |
Definition at line 30 of file RefCount.h.
Referenced by coopy::store::PolyBook::attach(), coopy::fold::FoldedCell::FoldedCell(), coopy::fold::FoldedCell::getOrCreateSheet(), coopy::store::PolyBook::operator=(), coopy::store::PolyValue::operator=(), coopy::store::PolySheet::operator=(), coopy::fold::FoldedCell::operator=(), coopy::store::PolyBook::PolyBook(), coopy::store::PolySheet::PolySheet(), coopy::store::PolyValue::PolyValue(), coopy::store::PolySheet::setSchema(), and coopy::store::PolyBook::take().
virtual bool coopy::store::PolyBook::addSheet | ( | const SheetSchema & | schema | ) | [inline, virtual, inherited] |
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, inherited] |
Definition at line 150 of file PolyBook.h.
References NULL, and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply(), coopy::store::PolyBook::attachReadWrite(), generateExample(), main(), coopy::store::PolyBook::read(), coopy::store::PolyBook::readAndWillWrite(), coopy::store::PolyBook::readIfExists(), and coopy::store::PolyBook::write().
bool PolyBook::attach | ( | coopy::store::Property & | config, |
PolyBook * | base = NULL |
||
) | [inherited] |
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, inherited] |
Definition at line 165 of file PolyBook.h.
References coopy::store::PolyBook::attach(), and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply().
virtual bool coopy::store::PolyBook::canWrite | ( | ) | const [inline, virtual, inherited] |
Reimplemented from coopy::store::TextBook.
Definition at line 215 of file PolyBook.h.
References coopy::store::TextBook::inplace().
void coopy::store::PolyBook::clear | ( | ) | [inline, inherited] |
Definition at line 34 of file PolyBook.h.
References coopy::store::RefCount::removeReference().
Referenced by coopy::app::Options::apply(), coopy::store::PolyBook::operator=(), coopy::store::PolyBook::take(), and coopy::store::PolyBook::~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, inherited] |
Definition at line 361 of file PolyBook.cpp.
References coopy::store::PolyBook::read(), and coopy::store::PolyBook::write().
virtual std::string coopy::store::PolyBook::desc | ( | ) | const [inline, virtual, inherited] |
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, inherited] |
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 coopy::store::PolyBook::getType(), and coopy::store::PolyBook::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 | ( | ) | [inherited] |
Definition at line 314 of file PolyBook.cpp.
Referenced by coopy::app::Diff::apply(), generateExample(), and main().
std::vector< FormatDesc > PolyBook::getFormatList | ( | ) | [static, inherited] |
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::FilteredTextBook::getNames | ( | ) | [inline, virtual] |
Reimplemented from coopy::store::PolyBook.
Definition at line 27 of file FilteredTextBook.h.
References names.
virtual Pool* coopy::store::PolyBook::getPool | ( | ) | const [inline, virtual, inherited] |
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, inherited] |
Reimplemented from coopy::store::TextBook.
Definition at line 83 of file PolyBook.h.
References coopy::store::PolyBook::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, inherited] |
Definition at line 194 of file PolyBook.h.
References coopy::store::PolyBook::expand(), NULL, and coopy::store::Property::put().
Referenced by copyBook().
TextBook* coopy::store::PolyBook::give | ( | ) | [inline, inherited] |
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, inherited] |
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, inherited] |
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, inherited] |
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().
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, inherited] |
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, inherited] |
Definition at line 100 of file PolyBook.h.
References coopy::store::PolyBook::attach(), NULL, and coopy::store::Property::put().
Referenced by WideSheetManager::acceptSheet(), coopy::app::Options::apply(), coopy::app::Diff::apply(), coopy::store::PolyBook::copyFile(), WideSheetManager::diffSheet(), WideSheetManager::exportSheet(), coopy::app::Coopy::loadBook(), main(), WideSheetManager::mergeToLocal(), and coopy::store::PolyBook::readForReference().
bool coopy::store::PolyBook::readAndWillWrite | ( | const char * | in_name, |
const char * | in_format, | ||
const char * | out_name, | ||
const char * | out_format | ||
) | [inline, inherited] |
Definition at line 124 of file PolyBook.h.
References coopy::store::PolyBook::attach(), coopy::store::PolyBook::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, inherited] |
Definition at line 96 of file PolyBook.h.
References NULL, and coopy::store::PolyBook::read().
Referenced by coopy::app::Diff::apply().
bool coopy::store::PolyBook::readIfExists | ( | const char * | fname | ) | [inline, inherited] |
Definition at line 114 of file PolyBook.h.
References coopy::store::PolyBook::attach(), and coopy::store::Property::put().
Referenced by coopy::app::Diff::apply().
virtual PolySheet coopy::store::PolyBook::readSheet | ( | const std::string & | name | ) | [inline, virtual, inherited] |
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 coopy::store::PolyBook::clear(), coopy::store::PolyValue::clear(), coopy::store::PolySheet::clearSchema(), coopy::store::PolySheet::clearSheet(), and coopy::store::PolyBook::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, inherited] |
Reimplemented from coopy::store::TextBook.
Definition at line 263 of file PolyBook.h.
References coopy::store::TextBook::setPool().
void PolyBook::showFormats | ( | ) | [static, inherited] |
Definition at line 345 of file PolyBook.cpp.
virtual TextBook& coopy::store::PolyBook::tail | ( | ) | [inline, virtual, inherited] |
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, inherited] |
Definition at line 44 of file PolyBook.h.
References coopy::store::RefCount::addReference(), and coopy::store::PolyBook::clear().
Referenced by coopy::app::Diff::apply(), coopy::app::Coopy::createBook(), csvs_diff(), 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, inherited] |
Definition at line 176 of file PolyBook.h.
References coopy::store::PolyBook::attach(), NULL, and coopy::store::Property::put().
Referenced by WideSheetManager::acceptSheet(), coopy::app::Diff::apply(), copyBook(), coopy::store::PolyBook::copyFile(), WideSheetManager::exportSheet(), generateExample(), and WideSheetManager::mergeToLocal().
virtual bool coopy::store::PolyBook::writtenToFuture | ( | ) | const [inline, virtual, inherited] |
Reimplemented from coopy::store::TextBook.
Definition at line 275 of file PolyBook.h.
References coopy::store::TextBook::writtenToFuture().
std::vector<std::string> coopy::store::FilteredTextBook::names |
Definition at line 19 of file FilteredTextBook.h.
Referenced by FilteredTextBook(), and getNames().
Definition at line 20 of file FilteredTextBook.h.