STOFFStringStream.hxx Source File documentation

STOFFStringStream.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
2
3 /* libstaroffice
4 * Version: MPL 2.0 / LGPLv2+
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 2.0 (the "License"); you may not use this file except in compliance with
8 * the License or as specified alternatively below. You may obtain a copy of
9 * the License at http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * Alternatively, the contents of this file may be used under the terms of
17 * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
18 * in which case the provisions of the LGPLv2+ are applicable
19 * instead of those above.
20 */
21
22 #ifndef STOFF_STRING_STREAM_HXX
23 #define STOFF_STRING_STREAM_HXX
24
25 #include <librevenge-stream/librevenge-stream.h>
26
27 class STOFFStringStreamPrivate;
28
34 class STOFFStringStream final: public librevenge::RVNGInputStream
35 {
36 public:
38 STOFFStringStream(const unsigned char *data, const unsigned int dataSize);
40 ~STOFFStringStream() final;
41
43 void append(const unsigned char *data, const unsigned int dataSize);
48 const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) final;
50 long tell() final;
54 int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) final;
56 bool isEnd() final;
57
61 bool isStructured() final;
65 unsigned subStreamCount() final;
69 const char *subStreamName(unsigned) final;
73 bool existsSubStream(const char *name) final;
77 librevenge::RVNGInputStream *getSubStreamByName(const char *name) final;
81 librevenge::RVNGInputStream *getSubStreamById(unsigned) final;
82
83 private:
85 STOFFStringStreamPrivate *m_data;
86 STOFFStringStream(const STOFFStringStream &); // copy is not allowed
87 STOFFStringStream &operator=(const STOFFStringStream &); // assignment is not allowed
88 };
89
90 #endif
91
92 // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
STOFFStringStream::read
const unsigned char * read(unsigned long numBytes, unsigned long &numBytesRead) final
! reads numbytes data.
Definition: STOFFStringStream.cxx:83
STOFFStringStream::operator=
STOFFStringStream & operator=(const STOFFStringStream &)
STOFFStringStream::subStreamName
const char * subStreamName(unsigned) final
returns the ith sub streams name
Definition: STOFFStringStream.cxx:154
STOFFStringStream::tell
long tell() final
returns actual offset position
Definition: STOFFStringStream.cxx:109
STOFFStringStream::seek
int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) final
seeks to a offset position, from actual, beginning or ending position
Definition: STOFFStringStream.cxx:114
STOFFStringStream::isStructured
bool isStructured() final
returns true if the stream is ole
Definition: STOFFStringStream.cxx:144
STOFFStringStream::getSubStreamById
librevenge::RVNGInputStream * getSubStreamById(unsigned) final
return a new stream for a ole zone
Definition: STOFFStringStream.cxx:164
STOFFStringStream::m_data
STOFFStringStreamPrivate * m_data
the string stream data
Definition: STOFFStringStream.hxx:85
STOFFStringStream::existsSubStream
bool existsSubStream(const char *name) final
returns true if a substream with name exists
Definition: STOFFStringStream.cxx:159
STOFFStringStream::STOFFStringStream
STOFFStringStream(const unsigned char *data, const unsigned int dataSize)
constructor
Definition: STOFFStringStream.cxx:67
STOFFStringStream
internal class used to create a RVNGInputStream from a unsigned char&#39;s pointer
Definition: STOFFStringStream.hxx:34
STOFFStringStream::subStreamCount
unsigned subStreamCount() final
returns the number of sub streams.
Definition: STOFFStringStream.cxx:149
STOFFStringStreamPrivate
internal data of a STOFFStringStream
Definition: STOFFStringStream.cxx:30
STOFFStringStream::getSubStreamByName
librevenge::RVNGInputStream * getSubStreamByName(const char *name) final
return a new stream for a ole zone
Definition: STOFFStringStream.cxx:169
STOFFStringStream::isEnd
bool isEnd() final
returns true if we are at the end of the section/file
Definition: STOFFStringStream.cxx:136
STOFFStringStream::~STOFFStringStream
~STOFFStringStream() final
destructor
Definition: STOFFStringStream.cxx:73
STOFFStringStream::append
void append(const unsigned char *data, const unsigned int dataSize)
append some data at the end of the string
Definition: STOFFStringStream.cxx:78