Loading...
Searching...
No Matches
28#ifndef INCLUDED_MDDS_MULTI_TYPE_VECTOR_DIR_MACRO_HPP
29#define INCLUDED_MDDS_MULTI_TYPE_VECTOR_DIR_MACRO_HPP
44#define MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(type, type_id, empty_value, block_type) \
46 inline mdds::mtv::element_t mdds_mtv_get_element_type(const type&) \
51 inline void mdds_mtv_get_empty_value(type& val) \
56 inline void mdds_mtv_set_value(mdds::mtv::base_element_block& block, size_t pos, const type& val) \
58 block_type::set_value(block, pos, val); \
61 inline void mdds_mtv_get_value(const mdds::mtv::base_element_block& block, size_t pos, type& val) \
63 block_type::get_value(block, pos, val); \
66 template<typename _Iter> \
67 void mdds_mtv_set_values( \
68 mdds::mtv::base_element_block& block, size_t pos, const type&, const _Iter& it_begin, const _Iter& it_end) \
70 block_type::set_values(block, pos, it_begin, it_end); \
73 inline void mdds_mtv_append_value(mdds::mtv::base_element_block& block, const type& val) \
75 block_type::append_value(block, val); \
78 inline void mdds_mtv_append_value(mdds::mtv::base_element_block& block, type&& val) \
80 block_type::append_value(block, std::move(val)); \
83 template<typename... Args> \
84 inline void mdds_mtv_emplace_back_value(mdds::mtv::base_element_block& block, const type&, Args&&... args) \
86 block_type::emplace_back_value(block, std::forward<Args>(args)...); \
89 inline void mdds_mtv_prepend_value(mdds::mtv::base_element_block& block, const type& val) \
91 block_type::prepend_value(block, val); \
94 template<typename _Iter> \
95 void mdds_mtv_prepend_values( \
96 mdds::mtv::base_element_block& block, const type&, const _Iter& it_begin, const _Iter& it_end) \
98 block_type::prepend_values(block, it_begin, it_end); \
101 template<typename _Iter> \
102 void mdds_mtv_append_values( \
103 mdds::mtv::base_element_block& block, const type&, const _Iter& it_begin, const _Iter& it_end) \
105 block_type::append_values(block, it_begin, it_end); \
108 template<typename _Iter> \
109 void mdds_mtv_assign_values( \
110 mdds::mtv::base_element_block& dest, const type&, const _Iter& it_begin, const _Iter& it_end) \
112 block_type::assign_values(dest, it_begin, it_end); \
115 template<typename _Iter> \
116 void mdds_mtv_insert_values( \
117 mdds::mtv::base_element_block& block, size_t pos, const type&, const _Iter& it_begin, const _Iter& it_end) \
119 block_type::insert_values(block, pos, it_begin, it_end); \
122 inline mdds::mtv::base_element_block* mdds_mtv_create_new_block(size_t init_size, const type& val) \
124 return block_type::create_block_with_value(init_size, val); \
127 template<typename _Iter> \
128 mdds::mtv::base_element_block* mdds_mtv_create_new_block(const type&, const _Iter& it_begin, const _Iter& it_end) \
130 return block_type::create_block_with_values(it_begin, it_end); \
140#define MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(type, type_id, empty_value, block_type) \
142 inline mdds::mtv::element_t mdds_mtv_get_element_type(const type*) \
147 inline void mdds_mtv_get_empty_value(type*& val) \
152 inline void mdds_mtv_set_value(mdds::mtv::base_element_block& block, size_t pos, type* val) \
154 block_type::set_value(block, pos, val); \
157 inline void mdds_mtv_get_value(const mdds::mtv::base_element_block& block, size_t pos, type*& val) \
159 block_type::get_value(block, pos, val); \
162 template<typename _Iter> \
163 void mdds_mtv_set_values( \
164 mdds::mtv::base_element_block& block, size_t pos, const type*, const _Iter& it_begin, const _Iter& it_end) \
166 block_type::set_values(block, pos, it_begin, it_end); \
169 inline void mdds_mtv_append_value(mdds::mtv::base_element_block& block, type* val) \
171 block_type::append_value(block, val); \
174 inline void mdds_mtv_prepend_value(mdds::mtv::base_element_block& block, type* val) \
176 block_type::prepend_value(block, val); \
179 template<typename _Iter> \
180 void mdds_mtv_prepend_values( \
181 mdds::mtv::base_element_block& block, const type*, const _Iter& it_begin, const _Iter& it_end) \
183 block_type::prepend_values(block, it_begin, it_end); \
186 template<typename _Iter> \
187 void mdds_mtv_append_values( \
188 mdds::mtv::base_element_block& block, const type*, const _Iter& it_begin, const _Iter& it_end) \
190 block_type::append_values(block, it_begin, it_end); \
193 template<typename _Iter> \
194 void mdds_mtv_assign_values( \
195 mdds::mtv::base_element_block& dest, const type*, const _Iter& it_begin, const _Iter& it_end) \
197 block_type::assign_values(dest, it_begin, it_end); \
200 template<typename _Iter> \
201 void mdds_mtv_insert_values( \
202 mdds::mtv::base_element_block& block, size_t pos, const type*, const _Iter& it_begin, const _Iter& it_end) \
204 block_type::insert_values(block, pos, it_begin, it_end); \
207 inline mdds::mtv::base_element_block* mdds_mtv_create_new_block(size_t init_size, type* val) \
209 return block_type::create_block_with_value(init_size, val); \
212 template<typename _Iter> \
213 mdds::mtv::base_element_block* mdds_mtv_create_new_block(const type*, const _Iter& it_begin, const _Iter& it_end) \
215 return block_type::create_block_with_values(it_begin, it_end); \