Logo ROOT  
Reference Guide
TInterpreterValue.h
Go to the documentation of this file.
1 // @(#)root/core/meta:$Id$e
2 // Author: Vassil Vassilev 13/03/2013
3 
4 /*******************************************************************************
5  * Copyright (C) 1995-2013, 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 ////////////////////////////////////////////////////////////////////////////////
13 // //
14 // Class representing a value coming from the interpreter. Its main use case //
15 // is to TCallFunc. When TCallFunc returns by-value, i.e. a temporary //
16 // variable, its lifetime has to be extended. TInterpreterValue provides a //
17 // way to extend the temporaries lifetime and gives the user to control it. //
18 // //
19 // The class needs to be derived from for the actual interpreter, //
20 // see TClingValue. //
21 // //
22 ////////////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TInterpreterValue
25 #define ROOT_TInterpreterValue
26 
27 #include "RtypesCore.h"
28 
29 #include <string>
30 
32 private:
33  TInterpreterValue(const TInterpreterValue &); // not implemented
35 public:
37  virtual ~TInterpreterValue() { }
38 
39  virtual const void* GetValAddr() const = 0;
40  virtual void* GetValAddr() = 0;
41  virtual std::pair<std::string, std::string> ToTypeAndValueString() const = 0;
42 
43  virtual Bool_t IsValid() const = 0;
44  virtual Double_t GetAsDouble() const = 0;
45  virtual Long_t GetAsLong() const = 0;
46  virtual ULong_t GetAsUnsignedLong() const = 0;
47  virtual void* GetAsPointer() const = 0;
48  virtual std::string ToString() const = 0;
49 };
50 
51 #endif // ROOT_TInterpreterValue
TInterpreterValue::TInterpreterValue
TInterpreterValue(const TInterpreterValue &)
TInterpreterValue::ToTypeAndValueString
virtual std::pair< std::string, std::string > ToTypeAndValueString() const =0
TInterpreterValue::GetAsPointer
virtual void * GetAsPointer() const =0
TInterpreterValue::~TInterpreterValue
virtual ~TInterpreterValue()
Definition: TInterpreterValue.h:37
TInterpreterValue::GetAsDouble
virtual Double_t GetAsDouble() const =0
TInterpreterValue::ToString
virtual std::string ToString() const =0
bool
TInterpreterValue::IsValid
virtual Bool_t IsValid() const =0
TInterpreterValue::TInterpreterValue
TInterpreterValue()
Definition: TInterpreterValue.h:36
Long_t
long Long_t
Definition: RtypesCore.h:52
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:53
TInterpreterValue::GetValAddr
virtual void * GetValAddr()=0
TInterpreterValue
Definition: TInterpreterValue.h:31
Double_t
double Double_t
Definition: RtypesCore.h:57
RtypesCore.h
TInterpreterValue::GetValAddr
virtual const void * GetValAddr() const =0
TInterpreterValue::GetAsUnsignedLong
virtual ULong_t GetAsUnsignedLong() const =0
TInterpreterValue::operator=
TInterpreterValue & operator=(TInterpreterValue &)
TInterpreterValue::GetAsLong
virtual Long_t GetAsLong() const =0