ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TALibException.cpp
Go to the documentation of this file.
1 
9 #include "TALibException.h"
10 
11 #include <iostream>
12 #include "../utils/Indicator.h"
13 #include "../utils/Utils.h"
14 
15 /*
16  TALibException::TALibException( const std::string & mMessasge ) :
17  std::exception()
18  {
19 #ifdef DEBUG
20  std::cout << "Constructor TALibException with string argumemt " << std::endl;
21 #endif
22  mMsg = "TALibException : " + mMessasge;
23  }
24  */
25 
26 // strange eats one character ! because ref ?? or vec_param is empty
27  TALibException::TALibException( const Indicator & indic, const std::vector<int> & vec_param, const std::string & message ) :
28  std::exception(), mvec_param( vec_param )
29  {
30  #ifdef DEBUG_EXCEPT
31  std::cout << "Constructor TALibException with indicator and vec_param " << std::endl;
32  std::cout << "size vec_param " << mvec_param.size() << std::endl;
33  //std::cout << "message " << message << std::endl;
34  #endif
35  //mMsg = "TALibException : " + mMessasge;
36  mindic = indic.label();
37 
38  //mTAMsg = "Indicator: " + indic.label() +"\nParameters: ";
39  mTAMsg = message + "\nParameters: ";
40  for ( unsigned int i = 0; i < mvec_param.size(); ++i ) {
41  mTAMsg += " " + Utils::toString<int>( vec_param[i]);
42  }
43  //mMsg += "\n";
44  }
45 
46 
"Clever" enumeration of the ListDataStock type : StockCSV, Volume, EMA, BOLL,...
Definition: Indicator.h:29
std::vector< int > mvec_param
std::string mindic
Centralize all exception coming form the TALib library interface.
std::string mTAMsg
std::string const label() const
Get the label.
Definition: Indicator.cpp:51