added: to Log: IntMinWidth(size_t min_width)

minimal width for integers
added: to Log: operator<<(long long s)
added: to TextStreamBase:
       operator<<(long long);
       operator<<(unsigned long long);
       int_min_width(size_t min_width); // minimal width for integers
                          



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1167 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2019-01-28 18:06:18 +00:00
parent e9df044f9e
commit 5a63a8c0ec
3 changed files with 89 additions and 6 deletions

View File

@@ -99,6 +99,17 @@ FileLog * Log::GetFileLog()
}
Log & Log::IntMinWidth(size_t min_width)
{
if( buffer )
{
buffer->int_min_width(min_width);
}
return *this;
}
Log & Log::operator<<(const void * s)
{
if( buffer && file_log && current_level <= file_log->get_log_level() )
@@ -211,6 +222,16 @@ Log & Log::operator<<(long s)
}
Log & Log::operator<<(long long s)
{
if( buffer && file_log && current_level <= file_log->get_log_level() )
{
(*buffer) << s;
}
return *this;
}
Log & Log::operator<<(char s)
@@ -442,7 +463,6 @@ void Log::save_log()
}
} // namespace

View File

@@ -96,6 +96,8 @@ public:
void SetMaxBufferLength(size_t max_buffer_length);
size_t GetMaxBufferLength();
virtual Log & IntMinWidth(size_t min_width);
virtual Log & operator<<(const void * s);
virtual Log & operator<<(const char * s);
@@ -111,7 +113,7 @@ public:
virtual Log & operator<<(int s);
virtual Log & operator<<(long s);
//virtual Log & operator<<(long long s); // added
virtual Log & operator<<(long long s);
// add unsigned long, unsigned int