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 | |
DirEntry * | entry (unsigned ind) |
returns a directory entry corresponding to a index | |
DirEntry * | entry (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 | |
AllocTable & | sbat () |
AllocTable const & | sbat () const |
AllocTable & | bbat () |
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 &) | |
IStorage & | operator= (const IStorage &) |
Private Attributes | |
std::string | m_debugMessage |
a debug message | |
libmwaw::DebugFile | m_asciiFile |
the debug file | |
Friends | |
class | IStream |
Internal and low level: class of libmwawOLE used to read an OLE with various functions to retrieve the OLE content.
libmwawOLE::IStorage::IStorage | ( | shared_ptr< WPXInputStream > | is | ) |
constructor
libmwawOLE::IStorage::~IStorage | ( | ) | [inline] |
destructor
libmwawOLE::IStorage::IStorage | ( | const IStorage & | ) | [private] |
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 | ( | ) | [inline, protected] |
Referenced by libmwawOLE::IStream::IStream(), and libmwawOLE::IStream::read().
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] |
Referenced by libmwawOLE::IStream::read().
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().
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 | ( | ) | [inline, protected] |
Referenced by libmwawOLE::IStream::IStream(), and libmwawOLE::IStream::read().
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] |
Referenced by libmwawOLE::IStream::IStream(), and libmwawOLE::IStream::read().
friend class IStream [friend] |
the debug file
Referenced by addDebugInfo(), load(), and markDebug().
AllocTable libmwawOLE::IStorage::m_bbat [protected] |
Referenced by addDebugInfo(), bbat(), IStorage(), load(), and markDebug().
std::string libmwawOLE::IStorage::m_debugMessage [mutable, private] |
a debug message
Referenced by setDebugMessage().
DirTree libmwawOLE::IStorage::m_dirtree [protected] |
Referenced by addDebugInfo(), entry(), getSubStreamList(), hasRootTypePc(), index(), isSubStream(), and load().
Header libmwawOLE::IStorage::m_header [protected] |
Referenced by addDebugInfo(), IStorage(), load(), revision(), and use_big_block_for().
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().