ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FullName.h
Go to the documentation of this file.
1 
13 // better for encapsulation
14 // http://stackoverflow.com/questions/9321/how-do-you-create-a-static-class-in-c
15 // real classes may be safer to use ?
16 
17 
18 #ifndef _FULLNAME_H_
19 #define _FULLNAME_H_
20 
21 #include "TimeScale.h"
22 #include "Indicator.h"
23 
24 #include <vector>
25 
38 namespace FullName
39 {
40 
44  std::string GetNameStock( const std::string & fname );
46  ETime GetTimeScale( const std::string& fname );
48  Indicator GetIndicator( const std::string& fname );
50  std::vector<int> GetParams( const std::string& fname);
52  std::string GetShortName( const std::string& fname );
58  std::string GetFrameName( const std::string& fname );
60 }
61 
70 namespace ShortName
71 {
73  std::string MakeShortName( const Indicator& indic, const std::vector<int>& param = std::vector<int>() );
77  Indicator GetIndicator( const std::string& sname );
79 }
80 
87 namespace FrameName
88 {
90  std::string MakeFrameName( const std::string& namestock, const ETime& tmscl );
94  std::string GetNameStock( const std::string& frame_name );
96  ETime GetTimeScale ( const std::string& frame_name );
98 
99 }
100 
101 #endif /* _FULLNAME_H_ */
std::string MakeFrameName(const std::string &namestock, const ETime &tmscl)
Create a frame name string from its components.
Definition: FullName.cpp:128
"Clever" enumeration of the ListDataStock type : StockCSV, Volume, EMA, BOLL,...
Definition: Indicator.h:29
Define Time period information for the data.
std::string GetNameStock(const std::string &frame_name)
Extract the stock name from a frame name.
Definition: FullName.cpp:116
ETime GetTimeScale(const std::string &frame_name)
Extract the TimeScale from a frame name.
Definition: FullName.cpp:122
std::string GetNameStock(const std::string &fname)
Extract the name of the stock.
Definition: FullName.cpp:46
Indicator GetIndicator(const std::string &fname)
Extract the Indicator from a fullname.
Definition: FullName.cpp:59
Indicator GetIndicator(const std::string &sname)
Extract the indicator from a frame name.
Definition: FullName.cpp:103
ETime
Enumeration for the different time representation, from instantaneous (INST) to year(YEAR) ...
Definition: TimeScale.h:48
std::string GetFrameName(const std::string &fname)
Extract NameStock_Timescale (FrameName) from a fullname.
Definition: FullName.cpp:92
std::string GetShortName(const std::string &fname)
Extract Indicator_params (string) from a fullname.
Definition: FullName.cpp:78
Declare all indicators (historical data and technical indicators) which can be computed and visualize...
std::string MakeShortName(const Indicator &indic, const std::vector< int > &param)
Create a short name from its components.
Definition: FullName.cpp:109
std::vector< int > GetParams(const std::string &fname)
Extract params from a fullname.
Definition: FullName.cpp:65
ETime GetTimeScale(const std::string &fname)
Extract the TimeScale from a fullname.
Definition: FullName.cpp:53