-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathObject.h.jinja2
More file actions
88 lines (61 loc) · 2.79 KB
/
Copy pathObject.h.jinja2
File metadata and controls
88 lines (61 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{% import "macros/declarations.jinja2" as macros %}
{% import "macros/utils.jinja2" as utils %}
{% import "macros/workarounds.jinja2" as workarounds %}
// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
#ifndef {{ package_name.upper() }}_{{ class.bare_type }}_H
#define {{ package_name.upper() }}_{{ class.bare_type }}_H
#include "{{ incfolder }}{{ class.bare_type }}Obj.h"
{% for include in includes %}
{{ include }}
{% endfor %}
#include "podio/utilities/MaybeSharedPtr.h"
#include "podio/detail/OrderKey.h"
#include <fmt/ostream.h>
#include <ostream>
#include <cstdint>
#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
#include "nlohmann/json_fwd.hpp"
#endif
{{ utils.forward_decls(forward_declarations) }}
namespace podio::detail {
// Internal function used in less comparison operators of the datatypes and interface types
OrderKey getOrderKey(const {{ class.namespace }}::{{ class.bare_type }}& obj);
};
{{ utils.namespace_open(class.namespace) }}
class Mutable{{ class.bare_type }};
class {{ class.bare_type }}Collection;
class {{ class.bare_type }}CollectionData;
{{ macros.class_description(class.bare_type, Description, Author) }}
class {{ class.bare_type }} {
friend class Mutable{{ class.bare_type }};
friend class {{ class.bare_type }}Collection;
friend class {{ class.full_type }}CollectionData;
friend class {{ class.bare_type }}CollectionIterator;
friend podio::detail::OrderKey podio::detail::getOrderKey(const {{ class.bare_type }} & obj);
public:
using mutable_type = Mutable{{ class.bare_type }};
using collection_type = {{ class.bare_type }}Collection;
{{ macros.constructors_destructors(class.bare_type, Members) }}
/// converting constructor from mutable object
{{ class.bare_type }}(const Mutable{{ class.bare_type }}& other);
static {{ class.bare_type }} makeEmpty();
public:
static constexpr std::string_view typeName = "{{ class.full_type }}";
{{ macros.member_getters(Members, use_get_syntax) }}
{{ macros.single_relation_getters(OneToOneRelations, use_get_syntax) }}
{{ macros.multi_relation_handling(OneToManyRelations + VectorMembers, use_get_syntax) }}
{{ utils.if_present(ExtraCode, "declaration") }}
{{ macros.common_object_funcs(class.bare_type) }}
private:
/// constructor from existing {{ class.bare_type }}Obj
explicit {{ class.bare_type}}(podio::utils::MaybeSharedPtr<{{ class.bare_type }}Obj> obj);
{{ class.bare_type}}({{ class.bare_type }}Obj* obj);
podio::utils::MaybeSharedPtr<{{ class.bare_type }}Obj> m_obj{new {{ class.bare_type }}Obj{}, podio::utils::MarkOwned};
};
std::ostream& operator<<(std::ostream& o, const {{ class.bare_type }}& value);
{{ macros.json_output(class.bare_type) }}
{{ utils.namespace_close(class.namespace) }}
{{ macros.std_hash(class) }}
{{ macros.ostream_formatter(class) }}
{{ workarounds.ld_library_path(class) }}
#endif