Debian Codegraph @

tools/header_mv.template

raw
1
2 /******************************* LICENSE *******************************
3
4 * (C) Copyright 1996-2016 ECMWF.
5 *
6 * This software is licensed under the terms of the Apache Licence Version 2.0
7 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
8 * In applying this licence, ECMWF does not waive the privileges and immunities
9 * granted to it by virtue of its status as an intergovernmental organisation nor
10 * does it submit to any jurisdiction.
11
12 ******************************* LICENSE *******************************/
13
14 /*! \file{{ object }}Attributes.h
15 \brief Definition of {{ object }} Attributes class.
16
17 This file is automatically generated.
18 Do Not Edit!
19
20 Generated: {{ generated }}
21 */
22
23
24 #ifndef {{ object }}Wrapper_H
25 #define {{ object }}Wrapper_H
26
27 #include "magics.h"
28 #include "ParameterManager.h"
29 #include "Factory.h"
30
31
32
33 #include "{{ object_include }}"
34
35
36 {% if inherit != "" %}
37 #include "{{ inherit }}Wrapper.h"
38 {% endif %}
39
40
41
42
43
44 {% for w in wrapper -%}
45 #include "{{ w }}Wrapper.h"
46 {% endfor %}
47
48 namespace magics {
49
50 class MagRequest;
51
52
53 {% if inherit != "" -%}
54 class {{ object }}Wrapper: public {{ inherit }}Wrapper
55 {% else %}
56 class {{ object }}Wrapper
57 {% endif %}
58 {
59 public:
60 // -- constructor
61 {{ object }}Wrapper();
62 {{ object }}Wrapper({{ object }}*);
63 // -- destructor
64 virtual ~{{ object }}Wrapper();
65 virtual void set(const MagRequest&);
66
67 {{ object }}* me() { return {{ object | lower}}_; }
68
69 virtual {{ object }}* object() { return {{ object | lower}}_; }
70
71
72 virtual void object({{ object }}* o) {
73 // Remember to delete the previous object
74 {{ object | lower}}_ = o;
75 {% if inherit != "" -%}
76 {{ inherit }}Wrapper::object(o);
77 {% endif %}
78
79 }
80
81
82
83 protected:
84 {{ object }}* {{ object | lower}}_;
85
86
87 // -- method
88 virtual void print(ostream&) const;
89
90
91 private:
92 string tag_;
93 friend ostream& operator<<(ostream& s,const {{ object }}Wrapper& p)
94 { p.print(s); return s; }
95 };
96
97 } // namespace magics
98
99 #endif