added support for morm::Model to Log:

Log & operator<<(morm::Model & model);
but we need some kind of a macro to allow this
pull/4/head
Tomasz Sowa 2 years ago
parent f572250572
commit 96eedd9be9

@ -41,6 +41,8 @@
#include "date/date.h"
#include "utf8/utf8.h"
#include "morm.h"
namespace PT
{
@ -311,6 +313,14 @@ Log & Log::operator<<(const PT::Date & date)
Log & Log::operator<<(morm::Model & model)
{
operator<<(model.to_string());
return *this;
}
Log & Log::operator<<(Manipulators m)
{
switch(m)

@ -45,6 +45,12 @@
namespace morm
{
class Model;
}
namespace PT
{
@ -125,8 +131,14 @@ public:
virtual Log & operator<<(const PT::Space & space);
virtual Log & operator<<(const PT::Date & date);
virtual Log & operator<<(morm::Model & model);
virtual Log & operator<<(Manipulators m);
virtual Log & LogString(const std::string & value, size_t max_size);
virtual Log & LogString(const std::wstring & value, size_t max_size);

Loading…
Cancel
Save