inlib
1.2.0
|
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved. 00002 // See the file inlib.license for terms. 00003 00004 #ifndef inlib_histo_base_cloud 00005 #define inlib_histo_base_cloud 00006 00007 #include <string> 00008 #include <vector> 00009 00010 namespace inlib { 00011 namespace histo { 00012 00013 class base_cloud { 00014 protected: 00015 base_cloud(int aLimit) 00016 :m_limit(aLimit) 00017 ,m_Sw(0) 00018 {} 00019 virtual ~base_cloud(){} 00020 public: 00021 base_cloud(const base_cloud& a_from) 00022 :m_title(a_from.m_title) 00023 ,m_limit(a_from.m_limit) 00024 ,m_Sw(a_from.m_Sw) 00025 ,m_ws(a_from.m_ws) 00026 {} 00027 00028 base_cloud& operator=(const base_cloud& a_from){ 00029 m_title = a_from.m_title; 00030 m_limit = a_from.m_limit; 00031 m_Sw = a_from.m_Sw; 00032 m_ws = a_from.m_ws; 00033 return *this; 00034 } 00035 public: 00036 const std::string& title() const {return m_title;} 00037 std::string title() {return m_title;} 00038 int max_entries() const {return m_limit;} 00039 protected: 00040 static int UNLIMITED() {return -1;} 00041 static unsigned int BINS() {return 100;} 00042 protected: 00043 std::string m_title; 00044 int m_limit; 00045 double m_Sw; 00046 std::vector<double> m_ws; 00047 }; 00048 00049 }} 00050 00051 #endif