git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30474
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
<wx/archive.h>
\wxheading{Data structures}
<wx/archive.h>
\wxheading{Data structures}
-{\small \begin{verbatim}
-typedef wxArchiveEntry entry\_type
-\end{verbatim}}
+\begin{verbatim}
+typedef wxArchiveEntry entry_type
+\end{verbatim}
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
\wxheading{Data structures}
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}
\wxheading{Data structures}
-{\small \begin{verbatim}
-typedef std::input\_iterator\_tag iterator\_category
-typedef T value\_type
-typedef ptrdiff\_t difference\_type
+\begin{verbatim}
+typedef std::input_iterator_tag iterator_category
+typedef T value_type
+typedef ptrdiff_t difference_type
-typedef T\& reference
-\end{verbatim}}
+typedef T& reference
+\end{verbatim}
\latexignore{\rtfignore{\wxheading{Members}}}
\latexignore{\rtfignore{\wxheading{Members}}}
<wx/zipstrm.h>
\wxheading{Data structures}
<wx/zipstrm.h>
\wxheading{Data structures}
-{\small \begin{verbatim}
-typedef wxZipEntry entry\_type
-\end{verbatim}}
+\begin{verbatim}
+typedef wxZipEntry entry_type
+\end{verbatim}
void Close() { m_pos = 0; m_lasterror = wxSTREAM_NO_ERROR; }
virtual char Peek() { return wxInputStream::Peek(); }
void Close() { m_pos = 0; m_lasterror = wxSTREAM_NO_ERROR; }
virtual char Peek() { return wxInputStream::Peek(); }
- virtual size_t GetSize() const { return m_len; }
+ virtual wxFileOffset GetLength() const { return m_len; }
protected:
virtual size_t OnSysRead(void *buffer, size_t size);
protected:
virtual size_t OnSysRead(void *buffer, size_t size);
{
case wxFromCurrent : nextpos = seek + pos; break;
case wxFromStart : nextpos = seek; break;
{
case wxFromCurrent : nextpos = seek + pos; break;
case wxFromStart : nextpos = seek; break;
- case wxFromEnd : nextpos = GetSize() - 1 + seek; break;
+ case wxFromEnd : nextpos = GetLength() - 1 + seek; break;
default : nextpos = pos; break; /* just to fool compiler, never happens */
}
default : nextpos = pos; break; /* just to fool compiler, never happens */
}
~TestOutputStream() { delete [] m_data; }
int GetOptions() const { return m_options; }
~TestOutputStream() { delete [] m_data; }
int GetOptions() const { return m_options; }
- size_t GetSize() const { return m_size; }
+ wxFileOffset GetLength() const { return m_size; }
// gives away the data, this stream is then empty, and can be reused
void GetData(const char*& data, size_t& size);
// gives away the data, this stream is then empty, and can be reused
void GetData(const char*& data, size_t& size);
wxFileOffset TestOutputStream::OnSysTell() const
{
wxFileOffset TestOutputStream::OnSysTell() const
{
- return (m_options & PipeOut) == 0 ? m_pos : wxInvalidOffset;
+ return (m_options & PipeOut) == 0 ? (wxFileOffset)m_pos : wxInvalidOffset;
}
size_t TestOutputStream::OnSysWrite(const void *buffer, size_t size)
}
size_t TestOutputStream::OnSysWrite(const void *buffer, size_t size)
~TestInputStream() { delete [] m_data; }
void Rewind();
~TestInputStream() { delete [] m_data; }
void Rewind();
- size_t GetSize() const { return m_size; }
+ wxFileOffset GetLength() const { return m_size; }
void SetData(TestOutputStream& out);
private:
void SetData(TestOutputStream& out);
private:
wxFileOffset TestInputStream::OnSysTell() const
{
wxFileOffset TestInputStream::OnSysTell() const
{
- return (m_options & PipeIn) == 0 ? m_pos : wxInvalidOffset;
+ return (m_options & PipeIn) == 0 ? (wxFileOffset)m_pos : wxInvalidOffset;
}
size_t TestInputStream::OnSysRead(void *buffer, size_t size)
}
size_t TestInputStream::OnSysRead(void *buffer, size_t size)
CreateArchive(out, m_archiver);
// check archive could be created
CreateArchive(out, m_archiver);
// check archive could be created
- CPPUNIT_ASSERT(out.GetSize() > 0);
+ CPPUNIT_ASSERT(out.GetLength() > 0);
testEntry.GetLength() == entry->GetSize() ||
((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset));
CPPUNIT_ASSERT_MESSAGE(
testEntry.GetLength() == entry->GetSize() ||
((m_options & PipeIn) != 0 && entry->GetSize() == wxInvalidOffset));
CPPUNIT_ASSERT_MESSAGE(
- "arc->GetSize() == entry->GetSize()" + error_context,
- arc->GetSize() == (size_t)entry->GetSize());
+ "arc->GetLength() == entry->GetSize()" + error_context,
+ arc->GetLength() == entry->GetSize());
if (name.Last() != _T('/'))
{
if (name.Last() != _T('/'))
{
CPPUNIT_ASSERT_MESSAGE("entry size check" + error_context,
testEntry.GetLength() == entry->GetSize());
CPPUNIT_ASSERT_MESSAGE(
CPPUNIT_ASSERT_MESSAGE("entry size check" + error_context,
testEntry.GetLength() == entry->GetSize());
CPPUNIT_ASSERT_MESSAGE(
- "arc->GetSize() == entry->GetSize()" + error_context,
- arc->GetSize() == (size_t)entry->GetSize());
+ "arc->GetLength() == entry->GetSize()" + error_context,
+ arc->GetLength() == entry->GetSize());
if ((m_options & PipeIn) == 0) {
OnEntryExtracted(*entry, testEntry, arc.get());
if ((m_options & PipeIn) == 0) {
OnEntryExtracted(*entry, testEntry, arc.get());
CPPUNIT_ASSERT_MESSAGE(
"entry not found in archive" + error_entry, in.Ok());
CPPUNIT_ASSERT_MESSAGE(
"entry not found in archive" + error_entry, in.Ok());
wxCharBuffer buf(size);
CPPUNIT_ASSERT_MESSAGE("Read" + error_context,
in.Read(buf.data(), size).LastRead() == size);
wxCharBuffer buf(size);
CPPUNIT_ASSERT_MESSAGE("Read" + error_context,
in.Read(buf.data(), size).LastRead() == size);