| #pragma once |
| |
| |
| |
| |
| |
| #if !defined(AFX_PARAMS_H__40D9A921_F329_11D5_B92E_0040F674BE6A__INCLUDED_) |
| #define AFX_PARAMS_H__40D9A921_F329_11D5_B92E_0040F674BE6A__INCLUDED_ |
| |
| #ifdef _WIN32 |
| #include "Windows.h" |
| #endif |
| #include <fstream> |
| #include <vector> |
| |
| #include "InputParam.h" |
| |
| #define P(d) tmsg_info(" - %d -\n", d) |
| |
| template <class EParam> |
| class CParams { |
| public: |
| std::vector<EParam> m_params; |
| double m_scale; |
| |
| CParams() : m_params(0), m_scale(1.0){}; |
| CParams(const CParams &cp) : m_params(cp.m_params), m_scale(cp.m_scale){}; |
| virtual ~CParams(){}; |
| |
| CParams(const CInputParam &ip) : m_scale(ip.m_scale) { |
| if (ip.m_isEconf) { |
| |
| } else { |
| m_params.resize(1); |
| m_params[0].read(ip); |
| } |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| void scale(const double sc) { |
| for (int i = 0; i < m_params.size(); ++i) m_params[i]->scale(sc); |
| } |
| |
| void scale() { |
| for (int i = 0; i < m_params.size(); ++i) m_params[i]->scale(m_scale); |
| } |
| }; |
| |
| #endif |