added wxMemoryInputStream(wxInputStream&, size_t) ctor (modified patch 1680108)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,6 +25,16 @@ class WXDLLIMPEXP_BASE wxMemoryInputStream : public wxInputStream
|
||||
public:
|
||||
wxMemoryInputStream(const void *data, size_t length);
|
||||
wxMemoryInputStream(const wxMemoryOutputStream& stream);
|
||||
wxMemoryInputStream(wxInputStream& stream,
|
||||
wxFileOffset lenFile = wxInvalidOffset)
|
||||
{
|
||||
InitFromStream(stream, lenFile);
|
||||
}
|
||||
wxMemoryInputStream(wxMemoryInputStream& stream)
|
||||
{
|
||||
InitFromStream(stream, wxInvalidOffset);
|
||||
}
|
||||
|
||||
virtual ~wxMemoryInputStream();
|
||||
virtual wxFileOffset GetLength() const { return m_length; }
|
||||
virtual bool IsSeekable() const { return true; }
|
||||
@@ -46,9 +56,13 @@ protected:
|
||||
wxFileOffset OnSysTell() const;
|
||||
|
||||
private:
|
||||
// common part of ctors taking wxInputStream
|
||||
void InitFromStream(wxInputStream& stream, wxFileOffset lenFile);
|
||||
|
||||
size_t m_length;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxMemoryInputStream)
|
||||
// copy ctor is implemented above: it copies the other stream in this one
|
||||
DECLARE_NO_ASSIGN_CLASS(wxMemoryInputStream)
|
||||
};
|
||||
|
||||
class WXDLLIMPEXP_BASE wxMemoryOutputStream : public wxOutputStream
|
||||
|
Reference in New Issue
Block a user