28#ifndef OZZ_OZZ_BASE_IO_ARCHIVE_TRAITS_H_
29#define OZZ_OZZ_BASE_IO_ARCHIVE_TRAITS_H_
56template <
typename _Ty>
62#define OZZ_IO_TYPE_VERSION(_version, _type) \
63 static_assert(_version > 0, "Version number must be > 0"); \
64 namespace internal { \
66 struct Version<const _type> { \
67 enum { kValue = _version }; \
74#define OZZ_IO_TYPE_VERSION_T1(_version, _arg0, ...) \
75 static_assert(_version > 0, "Version number must be > 0"); \
76 namespace internal { \
78 struct Version<const __VA_ARGS__> { \
79 enum { kValue = _version }; \
86#define OZZ_IO_TYPE_VERSION_T2(_version, _arg0, _arg1, ...) \
87 static_assert(_version > 0, "Version number must be > 0"); \
88 namespace internal { \
89 template <_arg0, _arg1> \
90 struct Version<const __VA_ARGS__> { \
91 enum { kValue = _version }; \
100#define OZZ_IO_TYPE_VERSION_T3(_version, _arg0, _arg1, _arg2, ...) \
101 static_assert(_version > 0, "Version number must be > 0"); \
102 namespace internal { \
103 template <_arg0, _arg1, _arg2> \
104 struct Version<const __VA_ARGS__> { \
105 enum { kValue = _version }; \
115#define OZZ_IO_TYPE_VERSION_T4(_version, _arg0, _arg1, _arg2, _arg3, ...) \
116 static_assert(_version > 0, "Version number must be > 0"); \
117 namespace internal { \
118 template <_arg0, _arg1, _arg2, _arg3> \
119 struct Version<const __VA_ARGS__> { \
120 enum { kValue = _version }; \
129#define OZZ_IO_TYPE_NOT_VERSIONABLE(_type) \
130 namespace internal { \
132 struct Version<const _type> { \
133 enum { kValue = 0 }; \
143#define OZZ_IO_TYPE_NOT_VERSIONABLE_T1(_arg0, ...) \
144 namespace internal { \
146 struct Version<const __VA_ARGS__> { \
147 enum { kValue = 0 }; \
154#define OZZ_IO_TYPE_NOT_VERSIONABLE_T2(_arg0, _arg1, ...) \
155 namespace internal { \
156 template <_arg0, _arg1> \
157 struct Version<const __VA_ARGS__> { \
158 enum { kValue = 0 }; \
166#define OZZ_IO_TYPE_NOT_VERSIONABLE_T3(_arg0, _arg1, _arg2, ...) \
167 namespace internal { \
168 template <_arg0, _arg1, _arg2> \
169 struct Version<const __VA_ARGS__> { \
170 enum { kValue = 0 }; \
179#define OZZ_IO_TYPE_NOT_VERSIONABLE_T4(_arg0, _arg1, _arg2, _arg3, ...) \
180 namespace internal { \
181 template <_arg0, _arg1, _arg2, _arg3> \
182 struct Version<const __VA_ARGS__> { \
183 enum { kValue = 0 }; \
193#define OZZ_IO_TYPE_TAG(_tag, _type) \
194 namespace internal { \
196 struct Tag<const _type> { \
199 enum { kTagLength = OZZ_ARRAY_SIZE(_tag) }; \
200 static const char* Get() { return _tag; } \
209template <
typename _Ty>
213template <
typename _Ty>
215 enum { kTagLength = 0 };
Definition archive_traits.h:214
Definition archive_traits.h:210