Logo ROOT  
Reference Guide
TGSimpleTableInterface.h
Go to the documentation of this file.
1// Author: Roel Aaij 21/07/2007
2
3/*************************************************************************
4 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_TGSimpleTableInterface
12#define ROOT_TGSimpleTableInterface
13
15
16#include "TString.h"
17
19
20private:
21 Double_t **fData; // Pointer to 2 dimensional array of Double_t
25
26protected:
27
28public:
29 TGSimpleTableInterface(Double_t **data, UInt_t nrows = 2,
30 UInt_t ncolumns = 2);
32
33 Double_t GetValue(UInt_t row, UInt_t column) override;
34 const char *GetValueAsString(UInt_t row, UInt_t column) override;
35 const char *GetRowHeader(UInt_t row) override;
36 const char *GetColumnHeader(UInt_t column) override;
37 UInt_t GetNRows() override { return fNRows; }
38 UInt_t GetNColumns() override { return fNColumns; }
39
40 ClassDefOverride(TGSimpleTableInterface, 0) // Interface to data in a 2D array of Double_t
41};
42
43#endif
unsigned int UInt_t
Definition: RtypesCore.h:46
double Double_t
Definition: RtypesCore.h:59
#define ClassDefOverride(name, id)
Definition: Rtypes.h:329
TGSimpleTableInterface is a very simple implementation of a TVirtualTableInterface.
const char * GetValueAsString(UInt_t row, UInt_t column) override
Return the value of the double in row,column of the data as a string.
virtual ~TGSimpleTableInterface()
TGSimpleTableInterface destructor.
TGSimpleTableInterface(Double_t **data, UInt_t nrows=2, UInt_t ncolumns=2)
TGSimpleTableInterface constructor.
Double_t GetValue(UInt_t row, UInt_t column) override
Return the value of the double in row,column of the data.
const char * GetRowHeader(UInt_t row) override
Return a name for the header at row.
const char * GetColumnHeader(UInt_t column) override
Return a name for the header at column.
Basic string class.
Definition: TString.h:136