RVNGOLEStream.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* librevenge
3 
4  Original source: POLE - Portable C++ library to access OLE Storage
5  Copyright (C) 2002-2005 Ariya Hidayat <ariya@kde.org>
6 
7  Redistribution and use in source and binary forms, with or without
8  modification, are permitted provided that the following conditions
9  are met:
10  * Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12  * Redistributions in binary form must reproduce the above copyright notice,
13  this list of conditions and the following disclaimer in the documentation
14  and/or other materials provided with the distribution.
15  * Neither the name of the authors nor the names of its contributors may be
16  used to endorse or promote products derived from this software without
17  specific prior written permission.
18 
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29  THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 
32 #ifndef RVNGOLESTREAM_H
33 #define RVNGOLESTREAM_H
34 
35 #include <memory>
36 #include <string>
37 #include <vector>
38 
39 namespace librevenge
40 {
41 
42 class RVNGInputStream;
43 
44 class IStorage;
45 class Stream;
46 class IStream;
47 
48 class Storage
49 {
50  friend class Stream;
51 
52 public:
53 
54  // for Storage::result()
56 
61 
65  ~Storage();
66 
70  bool isStructured();
71 
75  std::vector<std::string> getSubStreamNamesList();
76 
80  Result result();
81 
82 private:
83  std::unique_ptr<IStorage> m_io;
84 
85  // no copy or assign
86  Storage(const Storage &);
88 
89 };
90 
91 class Stream
92 {
93  friend class Storage;
94  friend class IStorage;
95 
96 public:
97 
101  Stream(Storage *storage, const std::string &name);
102 
106  ~Stream();
107 
111  unsigned long size();
112 
116  unsigned long read(unsigned char *data, unsigned long maxlen);
117 
118 private:
119  std::unique_ptr<IStream> m_io;
120 
121  // no copy or assign
122  Stream(const Stream &);
124 };
125 
126 } // namespace librevenge
127 
128 #endif // RVNGOLESTREAM_H
129 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
librevenge::IStorage::~IStorage
~IStorage()
Definition: RVNGOLEStream.cpp:480
librevenge::DirEntry::m_size
unsigned long m_size
the red/black color: 0 means red
Definition: RVNGOLEStream.cpp:284
librevenge::IStorage::m_input
RVNGInputStream * m_input
Definition: RVNGOLEStream.cpp:469
librevenge::AllocTable::saveSize
unsigned saveSize() const
Definition: RVNGOLEStream.cpp:201
librevenge::Header::m_threshold
unsigned m_threshold
Definition: RVNGOLEStream.cpp:117
librevenge::DirEntry
Definition: RVNGOLEStream.cpp:238
librevenge::IStorage::index
unsigned index(const std::string &name)
returns a directory entry corresponding to a index
Definition: RVNGOLEStream.cpp:496
librevenge::IStorage::loadBigBlock
unsigned long loadBigBlock(unsigned long block, unsigned char *buffer, unsigned long maxlen) const
Definition: RVNGOLEStream.cpp:1301
librevenge::Stream
Definition: RVNGOLEStream.h:92
librevenge::IStream::readUsingStorage
unsigned long readUsingStorage(unsigned long pos, unsigned char *data, unsigned long maxlen)
try to read maxlen data using m_iStorage
Definition: RVNGOLEStream.cpp:1587
librevenge::AllocTable::operator[]
unsigned long operator[](unsigned long index) const
Definition: RVNGOLEStream.cpp:176
librevenge::Storage::NotOLE
@ NotOLE
Definition: RVNGOLEStream.h:55
librevenge::readU16
static unsigned short readU16(const unsigned char *ptr)
Definition: RVNGOLEStream.cpp:66
librevenge::Storage::~Storage
~Storage()
Destroys the storage.
Definition: RVNGOLEStream.cpp:1753
librevenge::Header::m_revision
unsigned m_revision
Definition: RVNGOLEStream.cpp:114
librevenge::OStorage::getFileData
bool getFileData(std::vector< unsigned char > &data)
try to return in data the contain of the file
Definition: RVNGOLEStream.cpp:589
librevenge::DirTree::CompareEntryName::CompareEntryName
CompareEntryName(DirTree &tree)
constructor
Definition: RVNGOLEStream.cpp:433
librevenge::OStorage::m_dirtree
DirTree m_dirtree
Definition: RVNGOLEStream.cpp:668
librevenge::RVNG_SEEK_END
@ RVNG_SEEK_END
Definition: RVNGStream.h:30
librevenge::DirTree::getSubStreamList
std::vector< std::string > getSubStreamList(unsigned ind=0, bool retrieveAll=false)
returns the list of ind substream
Definition: RVNGOLEStream.cpp:352
librevenge::DirEntry::m_left
unsigned m_left
previous sibling
Definition: RVNGOLEStream.cpp:287
librevenge::OStorage::getDataAddress
size_t getDataAddress(unsigned block, bool isBig) const
returns the address of a big/small block
Definition: RVNGOLEStream.cpp:619
librevenge::Header::m_num_bat
unsigned m_num_bat
Definition: RVNGOLEStream.cpp:115
librevenge::IStorage::m_sb_blocks
std::vector< unsigned long > m_sb_blocks
Definition: RVNGOLEStream.cpp:477
librevenge::OStorage::addDirectory
bool addDirectory(std::string const &dir)
add a new directory (usefull to create empty leaf dir )
Definition: RVNGOLEStream.cpp:1366
librevenge::OStorage::m_bbat
AllocTable m_bbat
Definition: RVNGOLEStream.cpp:669
librevenge::RVNGInputStream::seek
virtual int seek(long offset, RVNG_SEEK_TYPE seekType)=0
Moves to the next location inside the input stream.
librevenge::IStorage::m_sbat
AllocTable m_sbat
Definition: RVNGOLEStream.cpp:475
librevenge-stream.h
librevenge::Header::m_shift_bbat
unsigned m_shift_bbat
Definition: RVNGOLEStream.cpp:122
librevenge::Avail
@ Avail
Definition: RVNGOLEStream.cpp:64
librevenge::DirInfo::hasCLSId
bool hasCLSId() const
returns true if the clsid field is filed
Definition: RVNGOLEStream.cpp:225
librevenge::DirTree::setInRBTForm
unsigned setInRBTForm(std::vector< unsigned > const &childList, unsigned firstInd, unsigned lastInd, unsigned height)
rebuild all the childs m_left, m_right index as a red black tree, returns the root index.
Definition: RVNGOLEStream.cpp:1101
librevenge::IStream::m_pos
unsigned long m_pos
Definition: RVNGOLEStream.cpp:732
librevenge::OStorage::createEntry
DirEntry * createEntry(std::string const &name)
return a new dir entry, if it does not exists
Definition: RVNGOLEStream.cpp:646
librevenge::Storage::m_io
std::unique_ptr< IStorage > m_io
Definition: RVNGOLEStream.h:83
librevenge::IStorage::m_isLoad
bool m_isLoad
Definition: RVNGOLEStream.cpp:538
librevenge::Storage::isStructured
bool isStructured()
Checks whether the storage is OLE2 storage.
Definition: RVNGOLEStream.cpp:1762
RVNG_DEBUG_MSG
#define RVNG_DEBUG_MSG(M)
Definition: librevenge_internal.h:33
librevenge::IStream::IStream
IStream(IStorage *io, std::string const &name)
Definition: RVNGOLEStream.cpp:1529
librevenge::DirEntry::is_dir
bool is_dir() const
returns true for a directory
Definition: RVNGOLEStream.cpp:247
librevenge::DirEntry::filename
std::string const & filename() const
returns the string which was store inside the file.
Definition: RVNGOLEStream.cpp:261
librevenge::DirTree::count
unsigned count() const
returns the number of entries
Definition: RVNGOLEStream.cpp:313
librevenge::Storage::BadOLE
@ BadOLE
Definition: RVNGOLEStream.h:55
librevenge::DirEntry::save
void save(unsigned char *buffer) const
saves a entry content in buffer *‍/
Definition: RVNGOLEStream.cpp:897
librevenge::DirTree::operator=
DirTree & operator=(const DirTree &)
librevenge::DirEntry::m_right
unsigned m_right
starting block
Definition: RVNGOLEStream.cpp:286
librevenge::DirTree::entry
DirEntry * entry(const std::string &name)
returns the entry with a given name
Definition: RVNGOLEStream.cpp:330
librevenge::Header
Definition: RVNGOLEStream.cpp:111
librevenge::OStorage::getMaximumSize
static unsigned long getMaximumSize(bool isBig)
returns the maximum size of a big/small block
Definition: RVNGOLEStream.cpp:614
librevenge::IStorage::loadSmallBlocks
unsigned long loadSmallBlocks(std::vector< unsigned long > const &blocks, unsigned char *buffer, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:1316
librevenge::DirEntry::m_start
unsigned long m_start
size (not valid if directory)
Definition: RVNGOLEStream.cpp:285
librevenge::IStorage::load
void load()
Definition: RVNGOLEStream.cpp:1172
librevenge::IStorage::IStorage
IStorage(const IStorage &)
librevenge::OStorage::m_num_bbat
unsigned m_num_bbat
Definition: RVNGOLEStream.cpp:670
librevenge::AllocTable
Definition: RVNGOLEStream.cpp:153
librevenge::IStream::operator=
IStream & operator=(const IStream &)
librevenge::DirTree::setInRedBlackTreeForm
void setInRedBlackTreeForm()
check/update so that the sibling are store with a red black tree
Definition: RVNGOLEStream.cpp:364
librevenge::OStorage::insertData
unsigned insertData(unsigned char const *buffer, unsigned long len, bool useBigBlock, unsigned end=Eof)
add stream data in a file, returns the first index
Definition: RVNGOLEStream.cpp:1499
librevenge::OStorage::addStream
bool addStream(std::string const &name, unsigned char const *buffer, unsigned long len)
add a new stream knowing its data
Definition: RVNGOLEStream.cpp:1375
librevenge::IStorage::loadBigBlocks
unsigned long loadBigBlocks(std::vector< unsigned long > const &blocks, unsigned char *buffer, unsigned long maxlen) const
Definition: RVNGOLEStream.cpp:1274
librevenge::OStorage
Definition: RVNGOLEStream.cpp:547
librevenge::IStorage::getSubStreamList
std::vector< std::string > getSubStreamList(unsigned ind=0, bool retrieveAll=false)
returns the list of subStream given a dirEntry index
Definition: RVNGOLEStream.cpp:515
librevenge::OStorage::m_num_sbat
unsigned m_num_sbat
Definition: RVNGOLEStream.cpp:672
librevenge::Eof
@ Eof
Definition: RVNGOLEStream.cpp:64
RVNGOLEStream.h
librevenge::DirTree::saveSize
unsigned saveSize() const
return space required to save a dir entry
Definition: RVNGOLEStream.cpp:370
librevenge::Storage::Ok
@ Ok
Definition: RVNGOLEStream.h:55
librevenge::OStorage::m_header
Header m_header
Definition: RVNGOLEStream.cpp:667
librevenge::IStream::m_size
unsigned long m_size
the stream size
Definition: RVNGOLEStream.cpp:688
GenericException
Definition: librevenge_internal.h:37
librevenge::DirTree::hasRootTypePc
bool hasRootTypePc() const
returns true if it is a pc file
Definition: RVNGOLEStream.cpp:308
librevenge::AllocTable::setChain
void setChain(std::vector< unsigned long > chain, unsigned end)
Definition: RVNGOLEStream.cpp:841
librevenge::OStorage::m_data
std::vector< unsigned char > m_data
Definition: RVNGOLEStream.cpp:676
librevenge::Storage::Result
Result
Definition: RVNGOLEStream.h:55
librevenge::IStorage::m_header
Header m_header
Definition: RVNGOLEStream.cpp:472
librevenge::IStorage::loadSmallBlock
unsigned long loadSmallBlock(unsigned long block, unsigned char *buffer, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:1351
librevenge::DirTree::entry
DirEntry * entry(unsigned ind)
returns the entry with a given index
Definition: RVNGOLEStream.cpp:324
librevenge::AllocTable::AllocTable
AllocTable(const AllocTable &)
librevenge::Storage::UnknownError
@ UnknownError
Definition: RVNGOLEStream.h:55
librevenge::Storage::OpenFailed
@ OpenFailed
Definition: RVNGOLEStream.h:55
librevenge::IStream::size
unsigned long size() const
Definition: RVNGOLEStream.cpp:695
librevenge::Header::valid
bool valid(unsigned long fileSize) const
Definition: RVNGOLEStream.cpp:754
librevenge::DirEntry::m_name
std::string m_name
the file information
Definition: RVNGOLEStream.cpp:292
librevenge::IStream::m_name
std::string m_name
Definition: RVNGOLEStream.cpp:689
librevenge::OStorage::setRootType
void setRootType(bool pc)
set the root to a mac/pc root *‍/
Definition: RVNGOLEStream.cpp:569
librevenge::Header::m_num_sbat
unsigned m_num_sbat
Definition: RVNGOLEStream.cpp:119
librevenge::Header::save
void save(unsigned char *buffer)
Definition: RVNGOLEStream.cpp:795
librevenge::IStorage::m_dirtree
DirTree m_dirtree
Definition: RVNGOLEStream.cpp:473
librevenge::AllocTable::clear
void clear()
librevenge::Header::s_ole_magic
static const unsigned char s_ole_magic[]
Definition: RVNGOLEStream.cpp:146
librevenge::DirTree::CompareEntryName::operator()
bool operator()(unsigned ind1, unsigned ind2) const
comparaison function
Definition: RVNGOLEStream.cpp:437
librevenge::OStorage::OStorage
OStorage(unsigned long minSize=0)
constructor
Definition: RVNGOLEStream.cpp:550
librevenge::OStorage::updateToSave
bool updateToSave()
finish to update the file ( note: it is better to call this function only one time )
Definition: RVNGOLEStream.cpp:1390
librevenge::IStorage::use_big_block_for
bool use_big_block_for(unsigned long size) const
Definition: RVNGOLEStream.cpp:525
librevenge::IStorage::m_bbat
AllocTable m_bbat
Definition: RVNGOLEStream.cpp:474
librevenge::DirEntry::setName
void setName(std::string const &nm)
sets the file name
Definition: RVNGOLEStream.cpp:266
librevenge::Header::m_num_mbat
unsigned m_num_mbat
Definition: RVNGOLEStream.cpp:125
librevenge::IStream::m_blocks
std::vector< unsigned long > m_blocks
Definition: RVNGOLEStream.cpp:725
librevenge::DirEntry::m_colour
unsigned m_colour
the type
Definition: RVNGOLEStream.cpp:283
librevenge_internal.h
librevenge::IStorage::hasRootTypePc
bool hasRootTypePc() const
returns true if it is a pc file
Definition: RVNGOLEStream.cpp:508
librevenge::IStream::createOleFromDirectory
bool createOleFromDirectory(IStorage *io, std::string const &name)
create the data corresponding to a directory
Definition: RVNGOLEStream.cpp:1642
librevenge::Header::m_size_bbat
unsigned m_size_bbat
Definition: RVNGOLEStream.cpp:123
librevenge::IStorage::getSubStreamNamesList
std::vector< std::string > getSubStreamNamesList()
Definition: RVNGOLEStream.cpp:1153
librevenge::RVNG_SEEK_SET
@ RVNG_SEEK_SET
Definition: RVNGStream.h:29
librevenge::OStorage::~OStorage
~OStorage()
destructor
Definition: RVNGOLEStream.cpp:556
librevenge::OStorage::m_sb_blocks
std::vector< unsigned long > m_sb_blocks
Definition: RVNGOLEStream.cpp:674
librevenge::writeU16
static void writeU16(unsigned char *ptr, unsigned long data)
Definition: RVNGOLEStream.cpp:76
librevenge::OStorage::m_sbat
AllocTable m_sbat
Definition: RVNGOLEStream.cpp:671
librevenge::OStorage::setInformation
void setInformation(std::string const &name, DirInfo const &info)
set a node information
Definition: RVNGOLEStream.cpp:578
librevenge::AllocTable::m_data
std::vector< unsigned long > m_data
Definition: RVNGOLEStream.cpp:207
librevenge::DirEntry::m_valid
bool m_valid
Definition: RVNGOLEStream.cpp:280
librevenge::DirEntry::m_child
unsigned m_child
next sibling
Definition: RVNGOLEStream.cpp:288
librevenge::IStorage::entry
DirEntry * entry(const std::string &name)
returns a directory entry corresponding to a name
Definition: RVNGOLEStream.cpp:489
librevenge::MetaBat
@ MetaBat
Definition: RVNGOLEStream.cpp:64
librevenge::DirTree::clear
void clear()
clear all entries, leaving only a root entries
Definition: RVNGOLEStream.cpp:927
librevenge::DirEntry::End
@ End
Definition: RVNGOLEStream.cpp:240
librevenge::AllocTable::count
unsigned long count() const
Definition: RVNGOLEStream.cpp:161
librevenge::DirInfo::m_time
unsigned m_time[4]
four uint32_t : the first two used for creation, the last for modification time
Definition: RVNGOLEStream.cpp:232
librevenge::Stream::m_io
std::unique_ptr< IStream > m_io
Definition: RVNGOLEStream.h:119
librevenge::AllocTable::AllocTable
AllocTable()
Definition: RVNGOLEStream.cpp:156
librevenge::Stream::size
unsigned long size()
Returns the stream size.
Definition: RVNGOLEStream.cpp:1795
librevenge::OStorage::useBigBlockFor
bool useBigBlockFor(unsigned long size) const
return true if we need to use big block
Definition: RVNGOLEStream.cpp:609
librevenge::AllocTable::load
void load(const unsigned char *buffer, unsigned len)
Definition: RVNGOLEStream.cpp:180
librevenge::Storage::Storage
Storage(const Storage &)
librevenge::IStorage::isSubStream
bool isSubStream(const std::string &name, bool &isDir)
returns true if the entry exists in the OLE, if so fills isDir
Definition: RVNGOLEStream.cpp:1161
librevenge::Header::Header
Header()
Definition: RVNGOLEStream.cpp:741
librevenge::IStream::m_iStorage
IStorage * m_iStorage
Definition: RVNGOLEStream.cpp:686
librevenge::Stream::read
unsigned long read(unsigned char *data, unsigned long maxlen)
Reads a block of data.
Definition: RVNGOLEStream.cpp:1800
librevenge::Stream::Stream
Stream(Storage *storage, const std::string &name)
Creates a new stream.
Definition: RVNGOLEStream.cpp:1785
librevenge::DirEntry::load
void load(unsigned char *buffer, unsigned len)
reads a entry content in buffer
Definition: RVNGOLEStream.cpp:851
librevenge::IStorage::m_result
librevenge::Storage::Result m_result
Definition: RVNGOLEStream.cpp:470
librevenge::OStorage::operator=
OStorage & operator=(const OStorage &)
librevenge::RVNGInputStream::tell
virtual long tell()=0
Returns the actual position inside the input stream.
librevenge::DirTree::entry
DirEntry const * entry(unsigned ind) const
returns the entry with a given index
Definition: RVNGOLEStream.cpp:318
librevenge::DirTree::save
void save(unsigned char *buffer) const
save the list of direntry in buffer
Definition: RVNGOLEStream.cpp:377
librevenge::Storage::result
Result result()
Returns the error code of last operation.
Definition: RVNGOLEStream.cpp:1757
librevenge::IStream::read
unsigned long read(unsigned char *data, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:703
librevenge::OStorage::OStorage
OStorage(const OStorage &)
librevenge::Storage::Storage
Storage(RVNGInputStream *is)
Constructs a storage with data.
Definition: RVNGOLEStream.cpp:1748
librevenge::Header::m_size_sbat
unsigned m_size_sbat
Definition: RVNGOLEStream.cpp:121
librevenge::IStream
Definition: RVNGOLEStream.cpp:684
librevenge::IStorage::revision
unsigned revision() const
returns the OLE revision
Definition: RVNGOLEStream.cpp:503
librevenge::OStorage::setRevision
void setRevision(unsigned rev)
set the OLE revision
Definition: RVNGOLEStream.cpp:564
librevenge::DirInfo::DirInfo
DirInfo()
constructor
Definition: RVNGOLEStream.cpp:216
librevenge::AllocTable::follow
std::vector< unsigned long > follow(unsigned long start) const
Definition: RVNGOLEStream.cpp:822
librevenge::Bat
@ Bat
Definition: RVNGOLEStream.cpp:64
librevenge::DirEntry::saveSize
static unsigned saveSize()
returns space required to save a dir entry
Definition: RVNGOLEStream.cpp:275
librevenge::AllocTable::m_blockSize
unsigned m_blockSize
Definition: RVNGOLEStream.cpp:155
librevenge::IStream::IStream
IStream(const IStream &)
librevenge::Header::m_start_dirent
unsigned m_start_dirent
Definition: RVNGOLEStream.cpp:116
librevenge::readU32
static unsigned readU32(const unsigned char *ptr)
Definition: RVNGOLEStream.cpp:71
librevenge::Stream::~Stream
~Stream()
Destroys the stream.
Definition: RVNGOLEStream.cpp:1791
librevenge::AllocTable::operator=
AllocTable & operator=(const AllocTable &)
librevenge::Header::valid_signature
bool valid_signature() const
Definition: RVNGOLEStream.cpp:136
librevenge::DirEntry::m_type
unsigned m_type
true if this is a classic mac directory entry
Definition: RVNGOLEStream.cpp:282
librevenge::DirTree::m_entries
std::vector< DirEntry > m_entries
Definition: RVNGOLEStream.cpp:461
librevenge::IStorage::isStructured
bool isStructured()
Definition: RVNGOLEStream.cpp:1147
librevenge::Header::m_magic
unsigned char m_magic[8]
Definition: RVNGOLEStream.cpp:113
librevenge::IStream::tell
unsigned long tell() const
Definition: RVNGOLEStream.cpp:699
librevenge::IStorage
Definition: RVNGOLEStream.cpp:467
librevenge::DirTree::DirTree
DirTree(const DirTree &)
librevenge::Header::m_blocks_bbat
unsigned long m_blocks_bbat[109]
Definition: RVNGOLEStream.cpp:126
librevenge::IStream::~IStream
~IStream()
Definition: RVNGOLEStream.cpp:692
librevenge::DirTree
Definition: RVNGOLEStream.cpp:296
librevenge::Stream::Stream
Stream(const Stream &)
librevenge::IStorage::entry
DirEntry * entry(unsigned ind)
returns a directory entry corresponding to a index
Definition: RVNGOLEStream.cpp:483
librevenge::DirInfo
Definition: RVNGOLEStream.cpp:213
librevenge::Storage::operator=
Storage & operator=(const Storage &)
librevenge::RVNGInputStream
Definition: RVNGStream.h:34
offset
unsigned offset
Definition: RVNGZipStream.cpp:79
librevenge::DirTree::DirTree
DirTree()
constructor
Definition: RVNGOLEStream.cpp:299
librevenge::Header::load
void load(const unsigned char *buffer, unsigned long size)
Definition: RVNGOLEStream.cpp:770
librevenge::writeU32
static void writeU32(unsigned char *ptr, unsigned long data)
Definition: RVNGOLEStream.cpp:82
librevenge::DirEntry::m_info
DirInfo m_info
first child
Definition: RVNGOLEStream.cpp:290
librevenge::AllocTable::resize
void resize(unsigned long newsize)
Definition: RVNGOLEStream.cpp:165
librevenge::getLength
static unsigned long getLength(RVNGInputStream *const input)
Definition: RVNGOLEStream.cpp:90
librevenge::DirEntry::name
std::string name() const
returns the simplified file name
Definition: RVNGOLEStream.cpp:252
librevenge
Definition: RVNGBinaryData.cpp:40
librevenge::IStream::readData
unsigned long readData(unsigned long pos, unsigned char *data, unsigned long maxlen)
try to read maxlen data using m_data
Definition: RVNGOLEStream.cpp:1573
librevenge::DirTree::load
void load(unsigned char *buffer, unsigned len)
tries to read the different entries
Definition: RVNGOLEStream.cpp:1011
librevenge::DirEntry::DirEntry
DirEntry()
constructor
Definition: RVNGOLEStream.cpp:242
librevenge::DirTree::CompareEntryName
a comparaison funcion of DirTree used to sort the entry by name
Definition: RVNGOLEStream.cpp:431
librevenge::DirTree::setRootType
void setRootType(bool pc=true)
set the root to a mac/pc root
Definition: RVNGOLEStream.cpp:933
librevenge::IStorage::operator=
IStorage & operator=(const IStorage &)
librevenge::IStream::m_data
std::vector< unsigned char > m_data
Definition: RVNGOLEStream.cpp:735
librevenge::Header::m_shift_sbat
unsigned m_shift_sbat
Definition: RVNGOLEStream.cpp:120
librevenge::DirEntry::m_macRootEntry
bool m_macRootEntry
false if invalid (should be skipped)
Definition: RVNGOLEStream.cpp:281
librevenge::Stream::operator=
Stream & operator=(const Stream &)
librevenge::AllocTable::save
void save(unsigned char *buffer) const
Definition: RVNGOLEStream.cpp:189
librevenge::DirTree::get_siblings
void get_siblings(unsigned ind, std::set< unsigned > &seens) const
constructs the list of siblings ( by filling the seens set )
Definition: RVNGOLEStream.cpp:400
librevenge::Header::compute_block_size
void compute_block_size()
Definition: RVNGOLEStream.cpp:129
librevenge::DirTree::find_child
unsigned find_child(unsigned ind, const std::string &name) const
tries to find a child of ind with a given name
Definition: RVNGOLEStream.cpp:337
librevenge::AllocTable::set
void set(unsigned long index, unsigned long val)
Definition: RVNGOLEStream.cpp:169
librevenge::Header::m_start_sbat
unsigned m_start_sbat
Definition: RVNGOLEStream.cpp:118
librevenge::DirTree::index
unsigned index(const std::string &name, bool create=false)
given a fullname (e.g "/ObjectPool/_1020961869"), find the entry
Definition: RVNGOLEStream.cpp:952
librevenge::OStorage::getSubStreamList
std::vector< std::string > getSubStreamList(unsigned ind=0, bool all=false)
function to retrieve the list of actual direntry
Definition: RVNGOLEStream.cpp:559
librevenge::DirTree::get_siblings
std::vector< unsigned > get_siblings(unsigned ind) const
returns a list of siblings corresponding to a node
Definition: RVNGOLEStream.cpp:390
librevenge::OStorage::newBBlock
unsigned newBBlock()
create a new big block, resize m_data; ... and return is identifier
Definition: RVNGOLEStream.cpp:628
librevenge::IStorage::IStorage
IStorage(RVNGInputStream *is)
Definition: RVNGOLEStream.cpp:1136
librevenge::DirInfo::m_clsid
unsigned m_clsid[4]
four uint32_t: the clsid data
Definition: RVNGOLEStream.cpp:234
librevenge::Header::m_start_mbat
unsigned m_start_mbat
Definition: RVNGOLEStream.cpp:124
librevenge::Storage::getSubStreamNamesList
std::vector< std::string > getSubStreamNamesList()
Returns the list of substream name.
Definition: RVNGOLEStream.cpp:1767
librevenge::NotFound
@ NotFound
Definition: RVNGOLEStream.cpp:64
librevenge::OStorage::newSBlock
unsigned newSBlock()
create a new small block, ... and returns is identifier
Definition: RVNGOLEStream.cpp:636
librevenge::DirTree::CompareEntryName::m_tree
DirTree & m_tree
the main tree
Definition: RVNGOLEStream.cpp:457
librevenge::Storage
Definition: RVNGOLEStream.h:49

Generated for librevenge by doxygen 1.8.20