Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_sg_visible_action 4 #ifndef tools_sg_visible_action 5 #define tools_sg_visible_action 5 #define tools_sg_visible_action 6 6 7 #include "matrix_action" 7 #include "matrix_action" 8 8 9 namespace tools { 9 namespace tools { 10 namespace sg { 10 namespace sg { 11 11 12 class visible_action : public matrix_action { 12 class visible_action : public matrix_action { 13 TOOLS_ACTION(visible_action,tools::sg::visib 13 TOOLS_ACTION(visible_action,tools::sg::visible_action,matrix_action) 14 public: 14 public: 15 visible_action(std::ostream& a_out,unsigned 15 visible_action(std::ostream& a_out,unsigned int a_ww,unsigned int a_wh) 16 :parent(a_out,a_ww,a_wh) 16 :parent(a_out,a_ww,a_wh) 17 ,m_count(0) 17 ,m_count(0) 18 {} 18 {} 19 virtual ~visible_action(){} 19 virtual ~visible_action(){} 20 public: 20 public: 21 visible_action(const visible_action& a_from) 21 visible_action(const visible_action& a_from) 22 :parent(a_from) 22 :parent(a_from) 23 ,m_count(0) 23 ,m_count(0) 24 {} 24 {} 25 visible_action& operator=(const visible_acti 25 visible_action& operator=(const visible_action& a_from){ 26 parent::operator=(a_from); 26 parent::operator=(a_from); 27 m_count = 0; 27 m_count = 0; 28 return *this; 28 return *this; 29 } 29 } 30 public: 30 public: 31 void reset() {m_count = 0;} 31 void reset() {m_count = 0;} 32 32 33 void increment() {m_count++;} 33 void increment() {m_count++;} 34 unsigned int count() const {return m_count;} 34 unsigned int count() const {return m_count;} 35 protected: 35 protected: 36 unsigned int m_count; 36 unsigned int m_count; 37 }; 37 }; 38 38 39 }} 39 }} 40 40 41 #endif 41 #endif