g4tools  5.4.0
write_action
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_sg_write_action
5 #define tools_sg_write_action
6 
7 #include "action"
8 
9 namespace tools {
10 namespace sg {
11  class node;
12 }}
13 namespace tools {
14 namespace io {
15  class iwbuf;
16 }}
17 
18 namespace tools {
19 namespace sg {
20 
21 class write_action : public action {
23 public:
24  virtual io::iwbuf& buffer() = 0;
25  virtual bool beg_node(const node&) = 0;
26  virtual bool end_node(const node&) = 0;
27 
28  virtual bool switch_do_all_children() {return true;}
29  virtual unsigned int protocol() const = 0;
30 public:
31  write_action(std::ostream& a_out)
32  :parent(a_out){}
33  virtual ~write_action(){}
34 protected:
35  write_action(const write_action& a_from)
36  :parent(a_from)
37  {}
39  parent::operator=(a_from);
40  return *this;
41  }
42 };
43 
44 }}
45 
46 #endif
tools::sg::action
Definition: action:19
tools::sg::write_action::end_node
virtual bool end_node(const node &)=0
tools::sg::write_action::buffer
virtual io::iwbuf & buffer()=0
tools::sg::node
Definition: node:28
tools::sg::write_action
Definition: write_action:21
tools::sg::write_action::write_action
write_action(const write_action &a_from)
Definition: write_action:35
action
tools::sg::write_action::switch_do_all_children
virtual bool switch_do_all_children()
Definition: write_action:28
tools::sg::write_action::protocol
virtual unsigned int protocol() const =0
tools::sg::write_action::operator=
write_action & operator=(const write_action &a_from)
Definition: write_action:38
tools::sg::write_action::beg_node
virtual bool beg_node(const node &)=0
tools
inlined C code : ///////////////////////////////////
Definition: aida_ntuple:26
tools::io::iwbuf
Definition: iwbuf:15
tools::sg::write_action::~write_action
virtual ~write_action()
Definition: write_action:33
TOOLS_ACTION_NO_COPY
#define TOOLS_ACTION_NO_COPY(a__class, a__sclass, a__parent)
Definition: action:64
tools::sg::write_action::write_action
write_action(std::ostream &a_out)
Definition: write_action:31