COOPY » Guide  version 0.6.5
Public Member Functions | Static Public Member Functions
coopy::store::PolyBook Class Reference

Container for a workbook (collection of tables) backed by any kind of spreadsheet or database. More...

#include <PolyBook.h>

Inheritance diagram for coopy::store::PolyBook:
coopy::store::TextBook coopy::store::RefCount coopy::store::FilteredTextBook

Public Member Functions

 PolyBook ()
virtual ~PolyBook ()
void clear ()
void take (TextBook *book)
TextBookgive ()
 PolyBook (const PolyBook &alt)
const PolyBookoperator= (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 TextBooktail ()
virtual bool setPool (Pool *pool)
virtual PoolgetPool () 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)

Detailed Description

Container for a workbook (collection of tables) backed by any kind of spreadsheet or database.

Definition at line 21 of file PolyBook.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

int coopy::store::RefCount::addReference ( ) [inline, inherited]
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]
bool coopy::store::PolyBook::attach ( const char *  fname,
const char *  ext = NULL 
) [inline]
bool PolyBook::attach ( coopy::store::Property config,
PolyBook base = NULL 
)
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]
bool PolyBook::copy ( const TextBook alt,
const Property options 
) [virtual]
bool PolyBook::copyFile ( const char *  src,
const char *  dest 
) [static]

Definition at line 361 of file PolyBook.cpp.

References read(), and write().

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]
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]
bool TextBook::fixSchema ( const SheetSchema in,
SimpleSheetSchema out 
) [inherited]
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]
virtual std::vector<std::string> coopy::store::PolyBook::getNames ( ) [inline, virtual]
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]
const PolyBook& coopy::store::PolyBook::operator= ( const PolyBook alt) [inline]

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]
bool coopy::store::PolyBook::readAndWillWrite ( const char *  in_name,
const char *  in_format,
const char *  out_name,
const char *  out_format 
) [inline]
bool coopy::store::PolyBook::readForReference ( const char *  fname,
PolyBook base 
) [inline]

Definition at line 96 of file PolyBook.h.

References NULL, and read().

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]
virtual PolySheet coopy::store::TextBook::readSheetByIndex ( int  index) [inline, virtual, inherited]
int coopy::store::RefCount::removeReference ( ) [inline, inherited]
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]
std::string coopy::store::TextBook::toString ( ) [inline, inherited]
bool coopy::store::PolyBook::write ( const char *  fname,
const char *  ext = NULL 
) [inline]
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().


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