Public Member Functions |
| | OStorage (unsigned long minSize=0) |
| | constructor
|
| | ~OStorage () |
| | destructor
|
| shared_ptr< WPXInputStream > | getStream () |
| | try to return a stream containing the ole file
|
| std::vector< std::string > | getSubStreamList (unsigned ind=0, bool all=false) |
| | function to retrieve the list of actual direntry
|
| void | setRevision (unsigned rev) |
| | set the OLE revision
|
| void | setRootType (bool pc) |
| | set the root to a mac/pc root */
|
| bool | addStream (std::string const &name, unsigned char const *buffer, unsigned long len) |
| | add a new stream knowing its data
|
| bool | addDirectory (std::string const &dir) |
| | add a new directory (usefull to create empty leaf dir )
|
| void | setInformation (std::string const &name, DirInfo const &info) |
| | set a node information
|
Protected Member Functions |
| unsigned | insertData (unsigned char const *buffer, unsigned long len, bool useBigBlock, unsigned end=Eof) |
| | add stream data in a file, returns the first index
|
| bool | useBigBlockFor (unsigned long size) const |
| | return true if we need to use big block
|
| size_t | getDataAddress (unsigned block, bool isBig) const |
| | returns the address of a big/small block
|
| unsigned | newBBlock () |
| | create a new big block, resize m_data; ... and return is identifier
|
| unsigned | newSBlock () |
| | create a new small block, ... and returns is identifier
|
| DirEntry * | createEntry (std::string const &name) |
| | return a new dir entry, if it does not exists
|
| bool | updateToSave () |
| | finish to update the file ( note: it is better to call this function only one time )
|
Static Protected Member Functions |
| static unsigned long | getMaximumSize (bool isBig) |
| | returns the maximum size of a big/small block
|
Constructor & Destructor Documentation
| libmwawOLE::OStorage::OStorage |
( |
unsigned long |
minSize = 0 | ) |
|
|
inline |
| libmwawOLE::OStorage::~OStorage |
( |
| ) |
|
|
inline |
| libmwawOLE::OStorage::OStorage |
( |
const OStorage & |
| ) |
|
|
private |
Member Function Documentation
| bool libmwawOLE::OStorage::addDirectory |
( |
std::string const & |
dir | ) |
|
| bool libmwawOLE::OStorage::addStream |
( |
std::string const & |
name, |
|
|
unsigned char const * |
buffer, |
|
|
unsigned long |
len |
|
) |
| |
| DirEntry* libmwawOLE::OStorage::createEntry |
( |
std::string const & |
name | ) |
|
|
inlineprotected |
| size_t libmwawOLE::OStorage::getDataAddress |
( |
unsigned |
block, |
|
|
bool |
isBig |
|
) |
| const |
|
inlineprotected |
returns the address of a big/small block
Referenced by insertData().
| static unsigned long libmwawOLE::OStorage::getMaximumSize |
( |
bool |
isBig | ) |
|
|
inlinestaticprotected |
returns the maximum size of a big/small block
Referenced by insertData().
| shared_ptr<WPXInputStream> libmwawOLE::OStorage::getStream |
( |
| ) |
|
|
inline |
| std::vector<std::string> libmwawOLE::OStorage::getSubStreamList |
( |
unsigned |
ind = 0, |
|
|
bool |
all = false |
|
) |
| |
|
inline |
| unsigned libmwawOLE::OStorage::insertData |
( |
unsigned char const * |
buffer, |
|
|
unsigned long |
len, |
|
|
bool |
useBigBlock, |
|
|
unsigned |
end = Eof |
|
) |
| |
|
protected |
| unsigned libmwawOLE::OStorage::newBBlock |
( |
| ) |
|
|
inlineprotected |
| unsigned libmwawOLE::OStorage::newSBlock |
( |
| ) |
|
|
inlineprotected |
create a new small block, ... and returns is identifier
Referenced by insertData().
| void libmwawOLE::OStorage::setInformation |
( |
std::string const & |
name, |
|
|
DirInfo const & |
info |
|
) |
| |
|
inline |
| void libmwawOLE::OStorage::setRevision |
( |
unsigned |
rev | ) |
|
|
inline |
| void libmwawOLE::OStorage::setRootType |
( |
bool |
pc | ) |
|
|
inline |
| bool libmwawOLE::OStorage::updateToSave |
( |
| ) |
|
|
protected |
finish to update the file ( note: it is better to call this function only one time )
Referenced by getStream().
| bool libmwawOLE::OStorage::useBigBlockFor |
( |
unsigned long |
size | ) |
const |
|
inlineprotected |
return true if we need to use big block
Referenced by addStream().
Member Data Documentation
| std::vector<unsigned char> libmwawOLE::OStorage::m_data |
|
protected |
| DirTree libmwawOLE::OStorage::m_dirtree |
|
protected |
| Header libmwawOLE::OStorage::m_header |
|
protected |
| unsigned libmwawOLE::OStorage::m_num_bbat |
|
protected |
| unsigned libmwawOLE::OStorage::m_num_sbat |
|
protected |
| std::vector<unsigned long> libmwawOLE::OStorage::m_sb_blocks |
|
protected |
The documentation for this class was generated from the following file: