28 #ifndef __MDDS_MULTI_TYPE_VECTOR_MACRO_HPP__
29 #define __MDDS_MULTI_TYPE_VECTOR_MACRO_HPP__
31 #define MDDS_MTV_DEFINE_ELEMENT_CALLBACKS(_type_,_type_id_,_empty_val_,_block_) \
33 inline mdds::mtv::element_t mdds_mtv_get_element_type(const _type_&) \
38 inline void mdds_mtv_get_empty_value(_type_& val) \
43 inline void mdds_mtv_set_value(mdds::mtv::base_element_block& block, size_t pos, const _type_& val) \
45 _block_::set_value(block, pos, val); \
48 inline void mdds_mtv_get_value(const mdds::mtv::base_element_block& block, size_t pos, _type_& val) \
50 _block_::get_value(block, pos, val); \
53 template<typename _Iter> \
54 void mdds_mtv_set_values( \
55 mdds::mtv::base_element_block& block, size_t pos, const _type_&, const _Iter& it_begin, const _Iter& it_end) \
57 _block_::set_values(block, pos, it_begin, it_end); \
60 inline void mdds_mtv_append_value(mdds::mtv::base_element_block& block, const _type_& val) \
62 _block_::append_value(block, val); \
65 inline void mdds_mtv_prepend_value(mdds::mtv::base_element_block& block, const _type_& val) \
67 _block_::prepend_value(block, val); \
70 template<typename _Iter> \
71 void mdds_mtv_prepend_values(mdds::mtv::base_element_block& block, const _type_&, const _Iter& it_begin, const _Iter& it_end) \
73 _block_::prepend_values(block, it_begin, it_end); \
76 template<typename _Iter> \
77 void mdds_mtv_append_values(mdds::mtv::base_element_block& block, const _type_&, const _Iter& it_begin, const _Iter& it_end) \
79 _block_::append_values(block, it_begin, it_end); \
82 template<typename _Iter> \
83 void mdds_mtv_assign_values(mdds::mtv::base_element_block& dest, const _type_&, const _Iter& it_begin, const _Iter& it_end) \
85 _block_::assign_values(dest, it_begin, it_end); \
88 template<typename _Iter> \
89 void mdds_mtv_insert_values( \
90 mdds::mtv::base_element_block& block, size_t pos, const _type_&, const _Iter& it_begin, const _Iter& it_end) \
92 _block_::insert_values(block, pos, it_begin, it_end); \
95 inline mdds::mtv::base_element_block* mdds_mtv_create_new_block(size_t init_size, const _type_& val) \
97 return _block_::create_block_with_value(init_size, val); \
100 template<typename _Iter> \
101 mdds::mtv::base_element_block* mdds_mtv_create_new_block(const _type_&, const _Iter& it_begin, const _Iter& it_end) \
103 return _block_::create_block_with_values(it_begin, it_end); \
106 #define MDDS_MTV_DEFINE_ELEMENT_CALLBACKS_PTR(_type_,_type_id_,_empty_val_,_block_) \
108 inline mdds::mtv::element_t mdds_mtv_get_element_type(const _type_*) \
113 inline void mdds_mtv_get_empty_value(_type_*& val) \
118 inline void mdds_mtv_set_value(mdds::mtv::base_element_block& block, size_t pos, _type_* val) \
120 _block_::set_value(block, pos, val); \
123 inline void mdds_mtv_get_value(const mdds::mtv::base_element_block& block, size_t pos, _type_*& val) \
125 _block_::get_value(block, pos, val); \
128 template<typename _Iter> \
129 void mdds_mtv_set_values( \
130 mdds::mtv::base_element_block& block, size_t pos, const _type_*, const _Iter& it_begin, const _Iter& it_end) \
132 _block_::set_values(block, pos, it_begin, it_end); \
135 inline void mdds_mtv_append_value(mdds::mtv::base_element_block& block, _type_* val) \
137 _block_::append_value(block, val); \
140 inline void mdds_mtv_prepend_value(mdds::mtv::base_element_block& block, _type_* val) \
142 _block_::prepend_value(block, val); \
145 template<typename _Iter> \
146 void mdds_mtv_prepend_values(mdds::mtv::base_element_block& block, const _type_*, const _Iter& it_begin, const _Iter& it_end) \
148 _block_::prepend_values(block, it_begin, it_end); \
151 template<typename _Iter> \
152 void mdds_mtv_append_values(mdds::mtv::base_element_block& block, const _type_*, const _Iter& it_begin, const _Iter& it_end) \
154 _block_::append_values(block, it_begin, it_end); \
157 template<typename _Iter> \
158 void mdds_mtv_assign_values(mdds::mtv::base_element_block& dest, const _type_*, const _Iter& it_begin, const _Iter& it_end) \
160 _block_::assign_values(dest, it_begin, it_end); \
163 template<typename _Iter> \
164 void mdds_mtv_insert_values( \
165 mdds::mtv::base_element_block& block, size_t pos, const _type_*, const _Iter& it_begin, const _Iter& it_end) \
167 _block_::insert_values(block, pos, it_begin, it_end); \
170 inline mdds::mtv::base_element_block* mdds_mtv_create_new_block(size_t init_size, _type_* val) \
172 return _block_::create_block_with_value(init_size, val); \
175 template<typename _Iter> \
176 mdds::mtv::base_element_block* mdds_mtv_create_new_block(const _type_*, const _Iter& it_begin, const _Iter& it_end) \
178 return _block_::create_block_with_values(it_begin, it_end); \