libmwawOLE::IStorage Class Reference

Internal and low level: class of libmwawOLE used to read an OLE with various functions to retrieve the OLE content. More...

List of all members.

Public Member Functions

 IStorage (shared_ptr< WPXInputStream > is)
 constructor
 ~IStorage ()
 destructor
DirEntryentry (unsigned ind)
 returns a directory entry corresponding to a index
DirEntryentry (const std::string &name)
 returns a directory entry corresponding to a name
unsigned index (const std::string &name)
 returns a directory entry corresponding to a index
unsigned revision () const
 returns the OLE revision
bool hasRootTypePc () const
 returns true if it is a pc file
bool isStructuredDocument ()
 returns true if the entry is an OLE document
bool isSubStream (const std::string &name, bool &isDir)
 returns true if the entry exists in the OLE, if so fills isDir
std::vector< std::string > getSubStreamList (unsigned ind=0, bool retrieveAll=false)
 returns the list of subStream given a dirEntry index
Storage::Result result () const
 returns the current results

Protected Member Functions

AllocTablesbat ()
AllocTable const & sbat () const
AllocTablebbat ()
AllocTable const & bbat () const
bool use_big_block_for (unsigned long size) const
unsigned long loadBigBlocks (std::vector< unsigned long > const &blocks, unsigned char *buffer, unsigned long maxlen)
unsigned long loadBigBlock (unsigned long block, unsigned char *buffer, unsigned long maxlen)
unsigned long loadSmallBlocks (std::vector< unsigned long > const &blocks, unsigned char *buffer, unsigned long maxlen)
unsigned long loadSmallBlock (unsigned long block, unsigned char *buffer, unsigned long maxlen)
void setDebugMessage (char const *msg) const
 define a message to add when reading a small block
void markDebug (std::vector< unsigned long > const &blocks, char const *msg)
 mark a list of block with a debugging message
void addDebugInfo (std::vector< unsigned long > const &directoryBlocks)
 add main debugging information (header and directory entries )
void load ()
 load the file structure and fill m_result

Protected Attributes

shared_ptr< WPXInputStream > m_input
Header m_header
DirTree m_dirtree
AllocTable m_bbat
AllocTable m_sbat
std::vector< unsigned long > m_sb_blocks
bool m_isLoad
Storage::Result m_result

Private Member Functions

 IStorage (const IStorage &)
IStorageoperator= (const IStorage &)

Private Attributes

std::string m_debugMessage
 a debug message
libmwaw::DebugFile m_asciiFile
 the debug file

Friends

class IStream

Detailed Description

Internal and low level: class of libmwawOLE used to read an OLE with various functions to retrieve the OLE content.


Constructor & Destructor Documentation

libmwawOLE::IStorage::IStorage ( shared_ptr< WPXInputStream >  is)

constructor

destructor

libmwawOLE::IStorage::IStorage ( const IStorage ) [private]

Member Function Documentation

void libmwawOLE::IStorage::addDebugInfo ( std::vector< unsigned long > const &  directoryBlocks) [protected]

add main debugging information (header and directory entries )

Referenced by load().

AllocTable const& libmwawOLE::IStorage::bbat ( ) const [inline, protected]
DirEntry* libmwawOLE::IStorage::entry ( unsigned  ind) [inline]

returns a directory entry corresponding to a index

Referenced by libmwawOLE::Storage::getSubStreamForDirectory(), and libmwawOLE::IStream::IStream().

DirEntry* libmwawOLE::IStorage::entry ( const std::string &  name) [inline]

returns a directory entry corresponding to a name

std::vector<std::string> libmwawOLE::IStorage::getSubStreamList ( unsigned  ind = 0,
bool  retrieveAll = false 
) [inline]

returns the list of subStream given a dirEntry index

Referenced by libmwawOLE::Storage::getSubStreamForDirectory(), and libmwawOLE::Storage::getSubStreamList().

bool libmwawOLE::IStorage::hasRootTypePc ( ) const [inline]

returns true if it is a pc file

Referenced by libmwawOLE::Storage::getSubStreamForDirectory().

unsigned libmwawOLE::IStorage::index ( const std::string &  name) [inline]

returns a directory entry corresponding to a index

Referenced by libmwawOLE::Storage::getSubStreamForDirectory(), and libmwawOLE::Storage::getSubStreamList().

returns true if the entry is an OLE document

Referenced by libmwawOLE::Storage::isStructuredDocument().

bool libmwawOLE::IStorage::isSubStream ( const std::string &  name,
bool &  isDir 
)

returns true if the entry exists in the OLE, if so fills isDir

Referenced by libmwawOLE::Storage::isDirectory(), and libmwawOLE::Storage::isSubStream().

void libmwawOLE::IStorage::load ( ) [protected]

load the file structure and fill m_result

Referenced by entry(), getSubStreamList(), index(), isStructuredDocument(), and isSubStream().

unsigned long libmwawOLE::IStorage::loadBigBlock ( unsigned long  block,
unsigned char *  buffer,
unsigned long  maxlen 
) [protected]

Referenced by load(), and libmwawOLE::IStream::read().

unsigned long libmwawOLE::IStorage::loadBigBlocks ( std::vector< unsigned long > const &  blocks,
unsigned char *  buffer,
unsigned long  maxlen 
) [protected]

Referenced by load().

unsigned long libmwawOLE::IStorage::loadSmallBlock ( unsigned long  block,
unsigned char *  buffer,
unsigned long  maxlen 
) [protected]
unsigned long libmwawOLE::IStorage::loadSmallBlocks ( std::vector< unsigned long > const &  blocks,
unsigned char *  buffer,
unsigned long  maxlen 
) [protected]
void libmwawOLE::IStorage::markDebug ( std::vector< unsigned long > const &  blocks,
char const *  msg 
) [protected]

mark a list of block with a debugging message

Referenced by addDebugInfo(), load(), and libmwawOLE::IStream::read().

IStorage& libmwawOLE::IStorage::operator= ( const IStorage ) [private]

returns the current results

unsigned libmwawOLE::IStorage::revision ( ) const [inline]

returns the OLE revision

Referenced by libmwawOLE::Storage::getSubStreamForDirectory().

AllocTable const& libmwawOLE::IStorage::sbat ( ) const [inline, protected]
void libmwawOLE::IStorage::setDebugMessage ( char const *  msg) const [inline, protected]

define a message to add when reading a small block

Referenced by libmwawOLE::IStream::read().

bool libmwawOLE::IStorage::use_big_block_for ( unsigned long  size) const [inline, protected]

Friends And Related Function Documentation

friend class IStream [friend]

Member Data Documentation

std::string libmwawOLE::IStorage::m_debugMessage [mutable, private]

a debug message

Referenced by setDebugMessage().

shared_ptr<WPXInputStream> libmwawOLE::IStorage::m_input [protected]

Referenced by isStructuredDocument(), and load().

Referenced by load().

std::vector<unsigned long> libmwawOLE::IStorage::m_sb_blocks [protected]

Referenced by load().


The documentation for this class was generated from the following file: