wxFileOffset wxWrapperInputStream::OnSysTell() const { wxCHECK_MSG(m_parent_i_stream, false, "Stream not valid"); wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); return m_parent_i_stream->TellI(); }
wxFileOffset wxWrapperInputStream::OnSysSeek(wxFileOffset pos, wxSeekMode mode) { wxCHECK_MSG(IsSeekable(), false, "Stream not seekable"); wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); return m_parent_i_stream->SeekI (pos, mode); }
wxFileOffset wxWrapperInputStream::GetLength() const { wxCHECK_MSG(m_parent_i_stream, wxInvalidOffset, "Stream not valid"); wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); return m_parent_i_stream->GetLength(); }
size_t wxWrapperInputStream::OnSysRead(void *buffer, size_t size) { wxCHECK_MSG(m_parent_i_stream, false, "Stream not valid"); wxON_BLOCK_EXIT_THIS0(wxWrapperInputStream::SynchronizeLastError); m_parent_i_stream->Read(buffer, size); return m_parent_i_stream->LastRead(); }
void ScopeGuardTestCase::BlockExitThis() { m_count = 1; { wxON_BLOCK_EXIT_THIS0(ScopeGuardTestCase::Zero); CPPUNIT_ASSERT_EQUAL( 1, m_count ); } CPPUNIT_ASSERT_EQUAL( 0, m_count ); { wxON_BLOCK_EXIT_THIS1(ScopeGuardTestCase::Set, 17); CPPUNIT_ASSERT_EQUAL( 0, m_count ); } CPPUNIT_ASSERT_EQUAL( 17, m_count ); { wxON_BLOCK_EXIT_THIS2(ScopeGuardTestCase::Sum, 2, 3); CPPUNIT_ASSERT_EQUAL( 17, m_count ); } CPPUNIT_ASSERT_EQUAL( 5, m_count ); }