added macro PT_HAS_MORM in Log class where operator<<(morm::Model & model) is used

This commit is contained in:
Tomasz Sowa 2021-05-10 20:05:55 +02:00
parent 7abe4b340a
commit adee7d134f
2 changed files with 8 additions and 6 deletions

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2018, Tomasz Sowa * Copyright (c) 2018-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -41,8 +41,9 @@
#include "date/date.h" #include "date/date.h"
#include "utf8/utf8.h" #include "utf8/utf8.h"
#ifdef PT_HAS_MORM
#include "morm.h" #include "morm.h"
#endif
namespace PT namespace PT
{ {
@ -312,13 +313,13 @@ Log & Log::operator<<(const PT::Date & date)
} }
#ifdef PT_HAS_MORM
Log & Log::operator<<(morm::Model & model) Log & Log::operator<<(morm::Model & model)
{ {
operator<<(model.to_string()); operator<<(model.to_string());
return *this; return *this;
} }
#endif
Log & Log::operator<<(Manipulators m) Log & Log::operator<<(Manipulators m)

View File

@ -5,7 +5,7 @@
*/ */
/* /*
* Copyright (c) 2018, Tomasz Sowa * Copyright (c) 2018-2021, Tomasz Sowa
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -131,8 +131,9 @@ public:
virtual Log & operator<<(const PT::Space & space); virtual Log & operator<<(const PT::Space & space);
virtual Log & operator<<(const PT::Date & date); virtual Log & operator<<(const PT::Date & date);
#ifdef PT_HAS_MORM
virtual Log & operator<<(morm::Model & model); virtual Log & operator<<(morm::Model & model);
#endif
virtual Log & operator<<(Manipulators m); virtual Log & operator<<(Manipulators m);