Public Member Functions | |
| OStorage (unsigned long minSize=0) | |
| constructor | |
| ~OStorage () | |
| destructor | |
| 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 | |
| bool | getFileData (std::vector< unsigned char > &data) |
| try to return in data the contain of the file | |
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 | |
Protected Attributes | |
| Header | m_header |
| DirTree | m_dirtree |
| AllocTable | m_bbat |
| unsigned | m_num_bbat |
| AllocTable | m_sbat |
| unsigned | m_num_sbat |
| std::vector< unsigned long > | m_sb_blocks |
| std::vector< unsigned char > | m_data |
Private Member Functions | |
| OStorage (const OStorage &) | |
| OStorage & | operator= (const OStorage &) |
|
inline |
destructor
| bool libwps_OLE::OStorage::addDirectory | ( | std::string const & | dir | ) |
add a new directory (usefull to create empty leaf dir )
| bool libwps_OLE::OStorage::addStream | ( | std::string const & | name, |
| unsigned char const * | buffer, | ||
| unsigned long | len | ||
| ) |
add a new stream knowing its data
|
inlineprotected |
return a new dir entry, if it does not exists
returns the address of a big/small block
|
inline |
try to return in data the contain of the file
returns the maximum size of a big/small block
|
inline |
function to retrieve the list of actual direntry
|
protected |
add stream data in a file, returns the first index
|
inlineprotected |
create a new big block, resize m_data; ... and return is identifier
Referenced by newSBlock().
|
inlineprotected |
create a new small block, ... and returns is identifier
|
inline |
set a node information
|
protected |
finish to update the file ( note: it is better to call this function only one time )
Referenced by getFileData().
return true if we need to use big block
|
protected |
Referenced by newBBlock().
|
protected |
Referenced by getFileData(), newBBlock(), and OStorage().
|
protected |
Referenced by createEntry(), getSubStreamList(), setInformation(), and setRootType().
|
protected |
Referenced by setRevision(), and useBigBlockFor().
|
protected |
Referenced by newBBlock().
|
protected |
Referenced by newSBlock().
|
protected |
Referenced by getDataAddress(), and newSBlock().
|
protected |
Referenced by newSBlock().