#include <sstream>
#include "TDbiFieldType.hxx"
#include "TDbiOutRowStream.hxx"
#include "TDbiTableMetaData.hxx"
#include <TSK_DBI_Log.hxx>
#include <MsgFormat.h>
#include "UtilString.hxx"
#include "TVldTimeStamp.hxx"
Go to the source code of this file.
Defines | |
#define | OUT(t, v) |
#define | OUT2(t, v) |
Functions | |
ClassImp (TDbiOutRowStream) TDbiOutRowStream |
#define OUT | ( | t, | |||
v | ) |
if ( ! StoreDefaultIfInvalid(t) ) { \
ostringstream out; \
out << setprecision(16)<< v; \
Store(out.str()); \
} \
Referenced by TDbiString::operator<<(), and TDbiOutRowStream::operator<<().
#define OUT2 | ( | t, | |||
v | ) |
const TDbiFieldType& fType = this->ColFieldType(this->CurColNum()); \ if ( fType.IsSigned() && fType.GetSize() != 8 ) { \ Int_t v_signed = (Int_t) v; \ if ( fType.GetType() == TDbi::kTiny && v & 0x80 ) v_signed |= 0xffffff00; \ if ( fType.GetType() == TDbi::kShort && v & 0x8000 ) v_signed |= 0xffff0000; \ OUT(TDbi::kInt,v_signed); } \ else { \ OUT(t,v); \ } \
Referenced by TDbiOutRowStream::operator<<().
ClassImp | ( | TDbiOutRowStream | ) |
Definition at line 17 of file TDbiOutRowStream.cxx.
References SK_DBI_Trace.
00020 { \ 00021 ostringstream out; \ 00022 out << setprecision(16)<< v; \ 00023 Store(out.str()); \ 00024 } \ 00025 00026 // If writing unsigned dat as signed, convert bit pattern to signed, 00027 // extending sign bit if necessary. 00028 // For BIGINT (size 8) make an exception. It's used only as 00029 // an alternative to unsigned int so can written without conversion. 00030 #define OUT2(t,v) \ 00031 const TDbiFieldType& fType = this->ColFieldType(this->CurColNum()); \ 00032 if ( fType.IsSigned() && fType.GetSize() != 8 ) { \ 00033 Int_t v_signed = (Int_t) v; \ 00034 if ( fType.GetType() == TDbi::kTiny && v & 0x80 ) v_signed |= 0xffffff00; \ 00035 if ( fType.GetType() == TDbi::kShort && v & 0x8000 ) v_signed |= 0xffff0000; \ 00036 OUT(TDbi::kInt,v_signed); } \ 00037 else { \ 00038 OUT(t,v); \ 00039 } \ 00040 00041 // Definition of static data members 00042 // ********************************* 00043 00044 00045 // Definition of all member functions (static or otherwise) 00046 // ******************************************************* 00047 // 00048 // - ordered: ctors, dtor, operators then in alphabetical order. 00049 00050 //..................................................................... 00051 00052 TDbiOutRowStream::TDbiOutRowStream(const TDbiTableMetaData* metaData) : 00053 TDbiRowStream(metaData), 00054 fBadData(kFALSE) 00055 { 00056 // 00057 // 00058 // Purpose: Default constructor 00059 // 00060 // Arguments: 00061 // metaData in Meta data for table to be written to.. 00062 00063 00064 SK_DBI_Trace( "Creating TDbiOutRowStream" << " "); 00065 00066 }