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

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

libmwawOLE::IStorage::~IStorage ( )
inline

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& libmwawOLE::IStorage::bbat ( )
inlineprotected
AllocTable const& libmwawOLE::IStorage::bbat ( ) const
inlineprotected
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().

bool libmwawOLE::IStorage::isStructuredDocument ( )

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
Storage::Result libmwawOLE::IStorage::result ( ) const
inline

returns the current results

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

returns the OLE revision

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

AllocTable& libmwawOLE::IStorage::sbat ( )
inlineprotected
AllocTable const& libmwawOLE::IStorage::sbat ( ) const
inlineprotected
void libmwawOLE::IStorage::setDebugMessage ( char const *  msg) const
inlineprotected

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
inlineprotected

Friends And Related Function Documentation

friend class IStream
friend

Member Data Documentation

libmwaw::DebugFile libmwawOLE::IStorage::m_asciiFile
private

the debug file

Referenced by addDebugInfo(), load(), and markDebug().

AllocTable libmwawOLE::IStorage::m_bbat
protected
std::string libmwawOLE::IStorage::m_debugMessage
mutableprivate

a debug message

Referenced by setDebugMessage().

DirTree libmwawOLE::IStorage::m_dirtree
protected
Header libmwawOLE::IStorage::m_header
protected
shared_ptr<WPXInputStream> libmwawOLE::IStorage::m_input
protected

Referenced by isStructuredDocument(), and load().

bool libmwawOLE::IStorage::m_isLoad
protected

Referenced by load().

Storage::Result libmwawOLE::IStorage::m_result
protected

Referenced by isStructuredDocument(), load(), and result().

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

Referenced by load().

AllocTable libmwawOLE::IStorage::m_sbat
protected

Referenced by IStorage(), load(), and sbat().


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

Generated on Wed May 22 2013 18:12:47 for libmwaw by doxygen 1.8.1.2