Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TBufferSQL.h
Go to the documentation of this file.
1// @(#)root/tree:$Id$
2// Author: Philippe Canal 2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TBufferSQL
13#define ROOT_TBufferSQL
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TBufferSQL //
18// //
19// Implement TBuffer for a SQL backend //
20// //
21//////////////////////////////////////////////////////////////////////////
22
23#include "TBufferFile.h"
24
25#include <vector>
26#include <string>
27
28class TSQLRow;
29
31
32private:
33 std::vector<Int_t>::const_iterator fIter;
34
35 std::vector<Int_t> *fColumnVec{nullptr}; ///<!
36 TString *fInsertQuery{nullptr}; ///<!
37 TSQLRow **fRowPtr{nullptr}; ///<!
38
39 // TBuffer objects cannot be copied or assigned
40 TBufferSQL(const TBufferSQL &); // not implemented
41 void operator=(const TBufferSQL &); // not implemented
42
43public:
44 TBufferSQL();
47 TBufferSQL(TBuffer::EMode mode, Int_t bufsiz, std::vector<Int_t> *vc, TString *insert_query, TSQLRow **rowPtr,void *buf, bool adopt = true);
48 ~TBufferSQL() override;
49
50 void ResetOffset();
51
52 void ReadBool(bool &b) final;
53 void ReadChar(Char_t &c) final;
54 void ReadUChar(UChar_t &c) final;
55 void ReadShort(Short_t &s) final;
56 void ReadUShort(UShort_t &s) final;
57 void ReadInt(Int_t &i) final;
58 void ReadUInt(UInt_t &i) final;
59 void ReadLong(Long_t &l) final;
60 void ReadULong(ULong_t &l) final;
61 void ReadLong64(Long64_t &l) final;
62 void ReadULong64(ULong64_t &l) final;
63 void ReadFloat(Float_t &f) final;
64 void ReadDouble(Double_t &d) final;
65 void ReadCharP(Char_t *c) final;
66 void ReadTString(TString &s) final;
67 void ReadStdString(std::string *s) final;
69 void ReadCharStar(char* &s) final;
70
71 void WriteBool(bool b) final;
72 void WriteChar(Char_t c) final;
73 void WriteUChar(UChar_t c) final;
74 void WriteShort(Short_t s) final;
75 void WriteUShort(UShort_t s) final;
76 void WriteInt(Int_t i) final;
77 void WriteUInt(UInt_t i) final;
78 void WriteLong(Long_t l) final;
79 void WriteULong(ULong_t l) final;
80 void WriteLong64(Long64_t l) final;