From 48b5c167bf1e3148733b7c719a80c3c4e65a8d67 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Thu, 8 Dec 2011 22:01:19 +0000 Subject: [PATCH] added to db stream: DbTextStream::operator<<(const std::vector & tabid) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@782 e52654a7-88a9-db11-a3e9-0013d4bc506e --- db/dbtextstream.cpp | 22 ++++++++++++++++++++++ db/dbtextstream.h | 1 + 2 files changed, 23 insertions(+) diff --git a/db/dbtextstream.cpp b/db/dbtextstream.cpp index 4169721..6587e00 100755 --- a/db/dbtextstream.cpp +++ b/db/dbtextstream.cpp @@ -535,6 +535,28 @@ return *this; } +DbTextStream & DbTextStream::operator<<(const std::vector & tabid) +{ + if( was_param ) + buffer += ", "; + + buffer += '('; + + for(size_t i=0 ; i::operator<<(tabid[i]); + + if( i + 1 < tabid.size() ) + buffer += ','; + } + + buffer += ')'; + + was_param = true; + +return *this; +} + const char * DbTextStream::ConvertTime(const tm & t) { diff --git a/db/dbtextstream.h b/db/dbtextstream.h index 006a9ef..baccedf 100755 --- a/db/dbtextstream.h +++ b/db/dbtextstream.h @@ -151,6 +151,7 @@ public: DbTextStream & operator<<(double); DbTextStream & operator<<(const void *); DbTextStream & operator<<(const tm & t); + DbTextStream & operator<<(const std::vector & tabid); static const char * ConvertTime(const tm & t);