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.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

  1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
  2 // See the file tools.license for terms.
  3 
  4 #ifndef tools_sg_cloud2plot_cp
  5 #define tools_sg_cloud2plot_cp
  6 
  7 #include "cloud2plot"
  8 
  9 namespace tools {
 10 namespace sg {
 11 
 12 class c2d2plot_cp : public c2d2plot {
 13 public:
 14   TOOLS_SCLASS(tools::sg::c2d2plot_cp)
 15 public:
 16   virtual void* cast(const std::string& a_class) const {
 17     if(void* p = cmp_cast<c2d2plot_cp>(this,a_class)) {return p;}
 18     return c2d2plot::cast(a_class);
 19   }
 20 public:
 21   virtual plottable* copy() const {return new c2d2plot_cp(*this);}
 22 public:
 23   c2d2plot_cp(const histo::c2d& a_data)
 24   :c2d2plot(m_cp)
 25   ,m_cp(a_data)
 26   {
 27 #ifdef TOOLS_MEM
 28     mem::increment(s_class().c_str());
 29 #endif
 30   }
 31   virtual ~c2d2plot_cp(){
 32 #ifdef TOOLS_MEM
 33     mem::decrement(s_class().c_str());
 34 #endif
 35   }
 36 public:
 37   c2d2plot_cp(const c2d2plot_cp& a_from)
 38   :plottable(a_from),points2D(a_from),c2d2plot(m_cp)
 39   ,m_cp(a_from.m_cp)
 40   {
 41 #ifdef TOOLS_MEM
 42     mem::increment(s_class().c_str());
 43 #endif
 44   }
 45   c2d2plot_cp& operator=(const c2d2plot_cp& a_from){
 46     c2d2plot::operator=(a_from);
 47     m_cp = a_from.m_cp;
 48     return *this;
 49   }
 50 protected:
 51   histo::c2d m_cp;
 52 };
 53 
 54 class c3d2plot_cp : public c3d2plot {
 55 public:
 56   TOOLS_SCLASS(tools::sg::c3d2plot_cp)
 57 public:
 58   virtual void* cast(const std::string& a_class) const {
 59     if(void* p = cmp_cast<c3d2plot_cp>(this,a_class)) {return p;}
 60     return c3d2plot::cast(a_class);
 61   }
 62 public:
 63   virtual plottable* copy() const {return new c3d2plot_cp(*this);}
 64 public:
 65   c3d2plot_cp(const histo::c3d& a_data)
 66   :c3d2plot(m_cp)
 67   ,m_cp(a_data)
 68   {
 69 #ifdef TOOLS_MEM
 70     mem::increment(s_class().c_str());
 71 #endif
 72   }
 73   virtual ~c3d2plot_cp(){
 74 #ifdef TOOLS_MEM
 75     mem::decrement(s_class().c_str());
 76 #endif
 77   }
 78 public:
 79   c3d2plot_cp(const c3d2plot_cp& a_from)
 80   :plottable(a_from),points3D(a_from),c3d2plot(m_cp)
 81   ,m_cp(a_from.m_cp)
 82   {
 83 #ifdef TOOLS_MEM
 84     mem::increment(s_class().c_str());
 85 #endif
 86   }
 87   c3d2plot_cp& operator=(const c3d2plot_cp& a_from){
 88     c3d2plot::operator=(a_from);
 89     m_cp = a_from.m_cp;
 90     return *this;
 91   }
 92 protected:
 93   histo::c3d m_cp;
 94 };
 95 
 96 }}
 97 
 98 #endif