added support for morm::Model to Log:
Log & operator<<(morm::Model & model); but we need some kind of a macro to allow this
This commit is contained in:
10
log/log.cpp
10
log/log.cpp
@@ -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)
|
||||
|
12
log/log.h
12
log/log.h
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user