RVNGOLEStream.h Source File documentation

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 <string>
36 #include <vector>
37
38 namespace librevenge
39 {
40
41 class RVNGInputStream;
42
43 class IStorage;
44 class Stream;
45 class IStream;
46
47 class Storage
48 {
49 friend class Stream;
50
51 public:
52
53 // for Storage::result()
54 enum Result { Ok, OpenFailed, NotOLE, BadOLE, UnknownError };
55
59 Storage(RVNGInputStream *is);
60
64 ~Storage();
65
69 bool isStructured();
70
74 std::vector<std::string> getSubStreamNamesList();
75
79 Result result();
80
81 private:
82 IStorage *m_io;
83
84 // no copy or assign
85 Storage(const Storage &);
86 Storage &operator=(const Storage &);
87
88 };
89
90 class Stream
91 {
92 friend class Storage;
93 friend class IStorage;
94
95 public:
96
100 Stream(Storage *storage, const std::string &name);
101
105 ~Stream();
106
110 unsigned long size();
111
115 unsigned long read(unsigned char *data, unsigned long maxlen);
116
117 private:
118 IStream *m_io;
119
120 // no copy or assign
121 Stream(const Stream &);
122 Stream &operator=(const Stream &);
123 };
124
125 } // namespace librevenge
126
127 #endif // RVNGOLESTREAM_H
128 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
librevenge::IStorage::~IStorage
~IStorage()
Definition: RVNGOLEStream.cpp:481
librevenge::DirEntry::m_size
unsigned long m_size
the red/black color: 0 means red
Definition: RVNGOLEStream.cpp:284
librevenge::Storage::m_io
IStorage * m_io
Definition: RVNGOLEStream.h:82
librevenge::IStorage::m_input
RVNGInputStream * m_input
Definition: RVNGOLEStream.cpp:470
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:497
librevenge::Stream
Definition: RVNGOLEStream.h:91
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:1585
librevenge::AllocTable::operator[]
unsigned long operator[](unsigned long index) const
Definition: RVNGOLEStream.cpp:176
librevenge::Storage::NotOLE
@ NotOLE
Definition: RVNGOLEStream.h:54
librevenge::readU16
static unsigned short readU16(const unsigned char *ptr)
Definition: RVNGOLEStream.cpp:66
librevenge::Storage::~Storage
~Storage()
Destroys the storage.
Definition: RVNGOLEStream.cpp:1752
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:590
librevenge::DirTree::CompareEntryName::CompareEntryName
CompareEntryName(DirTree &tree)
constructor
Definition: RVNGOLEStream.cpp:434
librevenge::OStorage::m_dirtree
DirTree m_dirtree
Definition: RVNGOLEStream.cpp:669
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:620
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:478
librevenge::OStorage::addDirectory
bool addDirectory(std::string const &dir)
add a new directory (usefull to create empty leaf dir )
Definition: RVNGOLEStream.cpp:1364
librevenge::OStorage::m_bbat
AllocTable m_bbat
Definition: RVNGOLEStream.cpp:670
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:476
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:1099
librevenge::IStream::m_pos
unsigned long m_pos
Definition: RVNGOLEStream.cpp:733
librevenge::OStorage::createEntry
DirEntry * createEntry(std::string const &name)
return a new dir entry, if it does not exists
Definition: RVNGOLEStream.cpp:647
librevenge::IStorage::m_isLoad
bool m_isLoad
Definition: RVNGOLEStream.cpp:539
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:1527
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:54
librevenge::DirEntry::save
void save(unsigned char *buffer) const
saves a entry content in buffer *‍/
Definition: RVNGOLEStream.cpp:894
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:615
librevenge::IStorage::loadSmallBlocks
unsigned long loadSmallBlocks(std::vector< unsigned long > const &blocks, unsigned char *buffer, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:1314
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:1170
librevenge::IStorage::IStorage
IStorage(const IStorage &)
librevenge::OStorage::m_num_bbat
unsigned m_num_bbat
Definition: RVNGOLEStream.cpp:671
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:1497
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:1373
librevenge::OStorage
Definition: RVNGOLEStream.cpp:548
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:516
librevenge::OStorage::m_num_sbat
unsigned m_num_sbat
Definition: RVNGOLEStream.cpp:673
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:54
librevenge::OStorage::m_header
Header m_header
Definition: RVNGOLEStream.cpp:668
librevenge::IStream::m_size
unsigned long m_size
the stream size
Definition: RVNGOLEStream.cpp:689
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:838
librevenge::OStorage::m_data
std::vector< unsigned char > m_data
Definition: RVNGOLEStream.cpp:677
librevenge::Storage::Result
Result
Definition: RVNGOLEStream.h:54
librevenge::IStorage::m_header
Header m_header
Definition: RVNGOLEStream.cpp:473
librevenge::IStorage::loadSmallBlock
unsigned long loadSmallBlock(unsigned long block, unsigned char *buffer, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:1349
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:54
librevenge::Storage::OpenFailed
@ OpenFailed
Definition: RVNGOLEStream.h:54
librevenge::IStream::size
unsigned long size() const
Definition: RVNGOLEStream.cpp:696
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:690
librevenge::OStorage::setRootType
void setRootType(bool pc)
set the root to a mac/pc root *‍/
Definition: RVNGOLEStream.cpp:570
librevenge::Header::m_num_sbat
unsigned m_num_sbat
Definition: RVNGOLEStream.cpp:119
librevenge::Header::save
void save(unsigned char *buffer)
Definition: RVNGOLEStream.cpp:792
librevenge::IStorage::m_dirtree
DirTree m_dirtree
Definition: RVNGOLEStream.cpp:474
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:438
librevenge::OStorage::OStorage
OStorage(unsigned long minSize=0)
constructor
Definition: RVNGOLEStream.cpp:551
librevenge::OStorage::updateToSave
bool updateToSave()
finish to update the file ( note: it is better to call this function only one time )
Definition: RVNGOLEStream.cpp:1388
librevenge::IStorage::use_big_block_for
bool use_big_block_for(unsigned long size) const
Definition: RVNGOLEStream.cpp:526
librevenge::IStorage::m_bbat
AllocTable m_bbat
Definition: RVNGOLEStream.cpp:475
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:726
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:509
librevenge::IStream::createOleFromDirectory
bool createOleFromDirectory(IStorage *io, std::string const &name)
create the data corresponding to a directory
Definition: RVNGOLEStream.cpp:1640
librevenge::Header::m_size_bbat
unsigned m_size_bbat
Definition: RVNGOLEStream.cpp:123
librevenge::IStorage::getSubStreamNamesList
std::vector< std::string > getSubStreamNamesList()
Definition: RVNGOLEStream.cpp:1151
librevenge::RVNG_SEEK_SET
@ RVNG_SEEK_SET
Definition: RVNGStream.h:29
librevenge::OStorage::~OStorage
~OStorage()
destructor
Definition: RVNGOLEStream.cpp:557
librevenge::OStorage::m_sb_blocks
std::vector< unsigned long > m_sb_blocks
Definition: RVNGOLEStream.cpp:675
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:672
librevenge::OStorage::setInformation
void setInformation(std::string const &name, DirInfo const &info)
set a node information
Definition: RVNGOLEStream.cpp:579
librevenge::AllocTable::m_data
std::vector< unsigned long > m_data
Definition: RVNGOLEStream.cpp:207
librevenge::Header::valid
bool valid(unsigned long fileSize)
Definition: RVNGOLEStream.cpp:755
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:490
librevenge::MetaBat
@ MetaBat
Definition: RVNGOLEStream.cpp:64
librevenge::DirTree::clear
void clear()
clear all entries, leaving only a root entries
Definition: RVNGOLEStream.cpp:924
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::AllocTable::AllocTable
AllocTable()
Definition: RVNGOLEStream.cpp:156
librevenge::Stream::size
unsigned long size()
Returns the stream size.
Definition: RVNGOLEStream.cpp:1797
librevenge::OStorage::useBigBlockFor
bool useBigBlockFor(unsigned long size) const
return true if we need to use big block
Definition: RVNGOLEStream.cpp:610
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:1159
librevenge::Header::Header
Header()
Definition: RVNGOLEStream.cpp:742
librevenge::IStream::m_iStorage
IStorage * m_iStorage
Definition: RVNGOLEStream.cpp:687
librevenge::Stream::read
unsigned long read(unsigned char *data, unsigned long maxlen)
Reads a block of data.
Definition: RVNGOLEStream.cpp:1802
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:848
librevenge::IStorage::m_result
librevenge::Storage::Result m_result
Definition: RVNGOLEStream.cpp:471
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:704
librevenge::OStorage::OStorage
OStorage(const OStorage &)
librevenge::Storage::Storage
Storage(RVNGInputStream *is)
Constructs a storage with data.
Definition: RVNGOLEStream.cpp:1746
librevenge::Header::m_size_sbat
unsigned m_size_sbat
Definition: RVNGOLEStream.cpp:121
librevenge::IStream
Definition: RVNGOLEStream.cpp:685
librevenge::IStorage::revision
unsigned revision() const
returns the OLE revision
Definition: RVNGOLEStream.cpp:504
librevenge::OStorage::setRevision
void setRevision(unsigned rev)
set the OLE revision
Definition: RVNGOLEStream.cpp:565
librevenge::DirInfo::DirInfo
DirInfo()
constructor
Definition: RVNGOLEStream.cpp:216
librevenge::AllocTable::follow
std::vector< unsigned long > follow(unsigned long start) const
Definition: RVNGOLEStream.cpp:819
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::m_io
IStream * m_io
Definition: RVNGOLEStream.h:118
librevenge::Stream::~Stream
~Stream()
Destroys the stream.
Definition: RVNGOLEStream.cpp:1792
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:462
librevenge::IStorage::isStructured
bool isStructured()
Definition: RVNGOLEStream.cpp:1145
librevenge::Header::m_magic
unsigned char m_magic[8]
Definition: RVNGOLEStream.cpp:113
librevenge::IStream::tell
unsigned long tell() const
Definition: RVNGOLEStream.cpp:700
librevenge::IStorage
Definition: RVNGOLEStream.cpp:468
librevenge::IStorage::loadBigBlocks
unsigned long loadBigBlocks(std::vector< unsigned long > const &blocks, unsigned char *buffer, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:1272
librevenge::DirTree::DirTree
DirTree(const DirTree &)
librevenge::Header::m_blocks_bbat
unsigned long m_blocks_bbat[109]
Definition: RVNGOLEStream.cpp:126
librevenge::IStorage::loadBigBlock
unsigned long loadBigBlock(unsigned long block, unsigned char *buffer, unsigned long maxlen)
Definition: RVNGOLEStream.cpp:1299
librevenge::IStream::~IStream
~IStream()
Definition: RVNGOLEStream.cpp:693
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:484
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:77
librevenge::DirTree::DirTree
DirTree()
constructor
Definition: RVNGOLEStream.cpp:299
librevenge::Header::load
void load(const unsigned char *buffer, unsigned long size)
Definition: RVNGOLEStream.cpp:771
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:39
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:1571
librevenge::DirTree::load
void load(unsigned char *buffer, unsigned len)
tries to read the different entries
Definition: RVNGOLEStream.cpp:1008
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:432
librevenge::DirTree::setRootType
void setRootType(bool pc=true)
set the root to a mac/pc root
Definition: RVNGOLEStream.cpp:930
librevenge::IStorage::operator=
IStorage & operator=(const IStorage &)
librevenge::IStream::m_data
std::vector< unsigned char > m_data
Definition: RVNGOLEStream.cpp:736
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:401
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:949
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:560
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:629
librevenge::IStorage::IStorage
IStorage(RVNGInputStream *is)
Definition: RVNGOLEStream.cpp:1134
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:637
librevenge::DirTree::CompareEntryName::m_tree
DirTree & m_tree
the main tree
Definition: RVNGOLEStream.cpp:458
librevenge::Storage
Definition: RVNGOLEStream.h:48