ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TALibException.h
Go to the documentation of this file.
1 
9 #ifndef TALIBEXCEPT_H_
10 #define TALIBEXCEPT_H_
11 
12 #include <string>
13 #include <vector>
14 #include <stdexcept>
15 // just for std::cout
16 //#include <iostream>
17 
18 class Indicator;
19 
24 // not a problem with virtual here
25 class TALibException : public std::exception
26 {
27  public :
28  TALibException() : std::exception() {}
29  // not used
30  // TALibException( const std::string & mMessasge );
31  TALibException( const Indicator & indic, const std::vector<int> & vec_param, const std::string & message );
32  ~TALibException() throw() {}
33 
34  // what() overload
35  virtual const char * what() const noexcept {
36  // if composition, may want to return the protected mExcept.what()
37  return mTAMsg.c_str();
38  }
39 
40  std::string GetIndicator() const {return mindic;}
41 
42  protected :
43  // cannot store this type, miss constructor
44  //Indicator mIndicTAlib;
45  std::string mindic;
46  std::vector<int> mvec_param;
47  std::string mTAMsg;
48 };
49 
50 
51 
52 #endif // TALIBEXCEPT_H_
53 
"Clever" enumeration of the ListDataStock type : StockCSV, Volume, EMA, BOLL,...
Definition: Indicator.h:29
std::string GetIndicator() const
std::vector< int > mvec_param
std::string mindic
virtual const char * what() const noexcept
Base class for exception coming from talibapi interface.
std::string mTAMsg