Commit ccc4b72b authored by Max Lyon's avatar Max Lyon
Browse files

fixed more dll export related things

parent 4db1c76c
Pipeline #1092 skipped
......@@ -22,4 +22,13 @@
#undef min
#undef max
#if defined(_MSC_VER)
// Some warnings are disabled permanently since the cannot be controlled on
// section basis.
// disable "needs-to-have-dll-interface-to-be-used-by-clients-of-class" warning
#pragma warning (disable: 4251)
#endif
......@@ -52,7 +52,7 @@ class File;
/*!
Stream is a specialization for the Debug system streaming.
*/
class Stream : public Base::IOutputStream
class BASEDLLEXPORT Stream : public Base::IOutputStream
{
public:
Stream(File& _file) : file_(_file) {}
......@@ -79,11 +79,11 @@ private:
/*!
Enter point in the Debug call stack, also used to filter debug output.
*/
class Enter
class BASEDLLEXPORT Enter
{
public:
BASEDLLEXPORT Enter(const char* const _flnm, const char* const _fnct, int& _nmbr, int& _lvl);
BASEDLLEXPORT ~Enter();
Enter(const char* const _flnm, const char* const _fnct, int& _nmbr, int& _lvl);
~Enter();
//! pass the output on the level or not?
bool pass(const int _lvl) const { return _lvl <= lvl_; }
......@@ -94,7 +94,7 @@ public:
//! Get the number of entries in this point
int number() const { return nmbr_; }
//! Get the stream
BASEDLLEXPORT Stream& stream();
Stream& stream();
private:
int id_; //!< Unique identifier for this entry
......
......@@ -31,16 +31,16 @@
namespace Debug {
void warning(const std::string& _wrng, const Base::CodeLink& _lnk)
{
{
TEST_only(Test::Checksum::Debug::warning.record(_wrng, _lnk));
Stream strm(File::modify());
Stream strm(File::modify());
strm << WARNING << ": " << _wrng << ' ' << _lnk << Base::LF;
}
void error(const std::string& _err, const Base::CodeLink& _lnk)
{
TEST_only(Test::Checksum::Debug::error.record(_err, _lnk));
Stream strm(File::modify());
Stream strm(File::modify());
strm << ERROR << ": " << _err << ' ' << _lnk << Base::Command::END_ERR;
}
......@@ -52,7 +52,7 @@ Enter::Enter(const char* const _flnm, const char* const _fnct,
{// TODO: for thread-safety we will need to make the constructor body atomic!
CallStack::modify().push(this);
nmbr_ = _nmbr++;
nmbr_ = _nmbr++;
if (_lvl == INVALID_LEVEL)
_lvl = Config::query().level(flnm_, fnct_);
......@@ -104,6 +104,9 @@ Stream& Enter::stream()
// Stream member funcs
// =====================================
Stream::Stream(const Stream& _othr) : file_(_othr.file_) {}
Stream& Stream::operator = (const Stream&) { return *this; }
Base::IOutputStream& Stream::print(const int _i)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment