Refactored a lot of code from headers into impl headers only compiled into one TU

- also added noimpl option to single header script - which only generates the non impl code
This commit is contained in:
Phil Nash
2013-12-03 18:52:41 +00:00
parent 8ba6555acd
commit c4a089c12b
34 changed files with 978 additions and 682 deletions

View File

@@ -9,8 +9,9 @@
#ifndef TWOBLUECUBES_CATCH_STREAM_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_STREAM_HPP_INCLUDED
#include "catch_stream.h"
#include "catch_streambuf.h"
#include "catch_debugger.hpp"
#include "catch_debugger.h"
#include <stdexcept>
#include <cstdio>
@@ -62,29 +63,21 @@ namespace Catch {
}
};
class Stream {
public:
Stream()
: streamBuf( NULL ), isOwned( false )
{}
Stream::Stream()
: streamBuf( NULL ), isOwned( false )
{}
Stream( std::streambuf* _streamBuf, bool _isOwned )
: streamBuf( _streamBuf ), isOwned( _isOwned )
{}
Stream::Stream( std::streambuf* _streamBuf, bool _isOwned )
: streamBuf( _streamBuf ), isOwned( _isOwned )
{}
void release() {
if( isOwned ) {
delete streamBuf;
streamBuf = NULL;
isOwned = false;
}
void Stream::release() {
if( isOwned ) {
delete streamBuf;
streamBuf = NULL;
isOwned = false;
}
std::streambuf* streamBuf;
private:
bool isOwned;
};
}
}
#endif // TWOBLUECUBES_CATCH_STREAM_HPP_INCLUDED