48 #ifndef _MIRA_METASERIALIZER_H_
49 #define _MIRA_METASERIALIZER_H_
53 #include <type_traits>
61 #include <serialization/adapters/boost/optional.hpp>
62 #include <serialization/adapters/std/list>
63 #include <serialization/adapters/std/vector>
70 namespace serialization {
99 typedef std::vector<uint8> Base;
137 FIRST_TYPE_QUALIFIER = 0x20,
138 TYPE_COLLECTION = FIRST_TYPE_QUALIFIER,
147 template<
typename Reflector>
150 if(getType()==TYPE_ATOMIC || getType()==TYPE_CLASS)
151 r.member(
"Identifier", mIdentifier,
"The identifier of the class "
152 "or 'complex' atomic type");
153 r.member(
"Version", mVersion,
"The metatype format version", 2);
156 template<
typename BinaryStream>
159 if(getType()==TYPE_ATOMIC || getType()==TYPE_CLASS)
160 r.
member(
"Identifier", mPlainIdentifier,
"The identifier of the class "
163 if (getType()==TYPE_CLASS)
164 mIdentifier += mPlainIdentifier +
" @v0";
166 mIdentifier = mPlainIdentifier;
170 template<
typename BinaryStream>
173 if(getType()==TYPE_ATOMIC || getType()==TYPE_CLASS)
174 r.
member(
"Identifier", mPlainIdentifier,
"The identifier of the class "
183 assert(Base::size()>=1);
184 push_back(qualifier);
191 assert(type!=TYPE_CLASS && type!=TYPE_ATOMIC && type!=TYPE_INVALID);
192 assert(Base::size()==0);
201 void setAtomicType(
const std::string& typenam);
206 template <
typename T>
213 assert(Base::size()==0);
214 push_back(TYPE_CLASS);
215 mIdentifier = identifier;
216 mPlainIdentifier = mIdentifier;
223 template <
typename T>
228 setClassType(typeName<T>());
235 if(empty() || front() >= LAST_TYPE_FIELD)
237 return (
Type)front();
244 return Base::size()>1;
251 return std::max(size()-1,0);
260 if(i>=qualifierCount())
272 if(n>qualifierCount())
274 return Base::resize(size()-n);
289 std::string getTypename()
const;
298 int size()
const {
return (
int)Base::size(); }
304 std::string mIdentifier;
305 std::string mPlainIdentifier;
324 const std::string& iName,
325 const std::string& iDescription) :
330 template<
typename Reflector>
333 r.member(
"Type",
type,
"The meta type info of the parameter");
334 r.member(
"Name",
name,
"The name of the parameter");
335 r.member(
"Description",
description,
"The description for the parameter");
348 const std::string& iComment) :
352 template<
typename Reflector>
355 r.member(
"Name",
name,
"The name of the method");
356 r.member(
"Comment",
comment,
"The user defined comment");
357 r.member(
"ReturnType",
returnType,
"The meta type info of the return type");
358 r.member(
"Parameters",
parameters,
"A list with type infos for each parameter");
387 type(iType), name(iName), comment(iComment) {}
389 template<
typename Reflector>
392 r.member(
"Type",
type,
"The type of the member");
393 r.member(
"Name", name,
"The name of the member");
394 r.member(
"Comment", comment,
"The user defined comment");
407 template<
typename Reflector>
413 boost::optional<int> optVersion;
414 r.member(
"Version",optVersion,
"The version of the serialization format");
417 version[
""] = *optVersion;
419 r.member(
"Version",version,
"The version of the serialization format");
421 r.member(
"Members",members,
"The members of the compound");
422 r.member(
"Interfaces",interfaces,
"The supported interfaces");
423 r.member(
"Methods",methods,
"The reflected methods");
426 template<
typename BinaryStream>
430 boost::optional<int> optVersion;
431 if (!version.empty())
432 optVersion = version.cbegin()->second;
435 r.
member(
"Version",optVersion,
"The version of the serialization format");
437 r.
member(
"Members",members,
"The members of the compound");
438 r.
member(
"Interfaces",interfaces,
"The supported interfaces");
439 r.
member(
"Methods",methods,
"The reflected methods");
444 addMember(memberMeta.
id, memberMeta.
comment, type);
449 addMember(name,
"", type);
454 members.push_back(
Member(type, name, comment));
459 std::list<Member>::iterator pos = members.begin();
460 while ((pos != members.end()) && (index-- > 0))
462 members.insert(pos,
Member(type, name,
""));
467 std::list<Member>::iterator pos = members.begin();
468 while ((pos != members.end()) && (pos->name != before))
470 members.insert(pos,
Member(type, name,
""));
475 interfaces.push_back(iface);
480 methods.push_back(method);
484 this->version[
""] = version;
488 this->version[
type] = version;
511 typedef std::map<std::string, CompoundMetaPtr> Base;
519 Base::operator=(other);
523 template<
typename Reflector>
529 template<
typename BinaryStream>
536 foreach (
auto p, *
this)
537 db[p.first+
" @v0"] = p.second;
543 template<
typename BinaryStream>
547 foreach (
auto p, *
this) {
549 size_t s = p.first.size();
550 if (p.first.substr(s-4, std::string::npos) ==
" @v0")
551 db[p.first.substr(0, s-4)] = p.second;
554 r.template reflectBase<Base>(db);
562 this->insert(other.begin(), other.end());
572 generateDependentTypesDB(type, db);
602 mMetaDatabase(database) {}
607 #ifdef CHECK_FORCE_SERIALIZE_BINARY_VERSION
609 if ((vf >= 0) && (vf < BinaryBufferSerializer::getSerializerFormatVersion()))
614 mCurrentMeta.reset();
616 serialize(
"Value", v);
619 catch(XNotImplemented&)
630 const std::string& versionString) {
632 mParentMeta->setVersion(type, version);
634 mCurrentVersion->name = versionString;
635 mCurrentVersion->comment =
"";
642 bool acceptDesiredVersion =
false) {
643 version = this->queryDesiredClassVersion(version, type, acceptDesiredVersion);
644 setVersion(version, type,
"@version[" + type +
"]");
650 template <
typename T>
652 return this->version(version, typeName<T>(),
false);
658 mParentMeta->setVersion(version);
660 mCurrentVersion->name = std::string(
"@version");
665 template <
typename T>
667 return this->version(version, typeName<T>(),
true);
679 mParentMeta->addMember(
"@version_default", std::string(
"implicit: ") + context, mCurrentMeta);
680 mCurrentVersion = &(mParentMeta->members.back());
688 mCurrentVersion = prev;
691 template <
typename T>
692 void write(
const T* data, std::size_t count) {
701 template <
typename T>
713 template <
typename T>
721 assert(name != NULL);
723 mParentMeta->addInterface(name);
730 mParentMeta->addMethod(method);
740 #define META_GEN_METHODS(z,n,_) \
741 template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
742 void method(const char* name, R (*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), const char* comment) \
744 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment); \
747 template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
748 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), Class* This, const char* comment)\
750 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment); \
753 template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
754 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)) const, Class* This, const char* comment) \
756 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment); \
759 template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
760 void method(const char* name, boost::function<R (BOOST_PP_ENUM_PARAMS_Z(z,n,P))> fn, const char* comment) \
762 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment); \
766 #undef META_GEN_METHODS
768 #define META_GEN_METHODS_NAME_DESC(z,n,_) name##n, description##n
771 #define META_GEN_METHODS_PARAMDESC(z,n,_) \
772 template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
773 void method(const char* name, R (*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), \
774 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_DECL,nil)) \
776 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment, \
777 BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
780 template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
781 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), Class* This, \
782 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_DECL,nil)) \
784 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment, \
785 BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
788 template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
789 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)) const, Class* This, \
790 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_DECL,nil)) \
792 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment, \
793 BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
796 template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
797 void method(const char* name, boost::function<R (BOOST_PP_ENUM_PARAMS_Z(z,n,P))> fn, \
798 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_DECL,nil)) \
800 createMethodMeta<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(name, comment, \
801 BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
805 #undef META_GEN_METHODS_PARAMDESC
809 #define META_GEN_METHODS_PARAMDESCSAMPLE(z,n,_) \
810 template<typename R, BOOST_PP_ENUM(n,RPCGEN_CALL_TYPENAME_PARAM_DECL,nil)> \
811 void method(const char* name, R (*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), \
812 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_SAMPLE_DECL,nil)) \
814 method(name, fn, comment, BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
817 template<typename R, typename Class, BOOST_PP_ENUM(n,RPCGEN_CALL_TYPENAME_PARAM_DECL,nil)> \
818 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), Class* This, \
819 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_SAMPLE_DECL,nil)) \
821 method(name, fn, This, comment, BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
824 template<typename R, typename Class, BOOST_PP_ENUM(n,RPCGEN_CALL_TYPENAME_PARAM_DECL,nil)> \
825 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)) const, Class* This, \
826 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_SAMPLE_DECL,nil)) \
828 method(name, fn, This, comment, BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
831 template<typename R, BOOST_PP_ENUM(n,RPCGEN_CALL_TYPENAME_PARAM_DECL,nil)> \
832 void method(const char* name, boost::function<R (BOOST_PP_ENUM_PARAMS_Z(z,n,P))> fn, \
833 const char* comment, BOOST_PP_ENUM(n,RPCGEN_CALL_NAME_DESC_SAMPLE_DECL,nil)) \
835 method(name, fn, comment, BOOST_PP_ENUM(n,META_GEN_METHODS_NAME_DESC,nil)); \
839 #undef META_GEN_METHODS_PARAMDESCSAMPLE
840 #undef META_GEN_METHODS_NAME_DESC
845 #define META_GEN_METHODS_WRONG_ARGUMENT_NUMBER(z,n,_) \
846 template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
847 void method(const char* name, R (*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), \
848 const char* comment, Args...) \
850 invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
852 template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
853 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), Class* This, \
854 const char* comment, Args...) \
856 invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
858 template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
859 void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)) const, Class* This, \
860 const char* comment, Args...) \
862 invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
864 template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
865 void method(const char* name, boost::function<R (BOOST_PP_ENUM_PARAMS_Z(z,n,P))> fn, \
866 const char* comment, Args...) \
868 invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
872 #undef META_GEN_METHODS_WRONG_ARGUMENT_NUMBER
878 MIRA_THROW(XNotImplemented,
"Type " << typeName<T>() <<
" is not meta-serializable");
881 mCurrentMeta->setAtomicType<T>();
882 addCurrentAsMemberToParent();
889 MIRA_THROW(XNotImplemented,
"Type " << typeName<T>() <<
" is not meta-serializable");
893 addCurrentAsMemberToParent();
900 MIRA_THROW(XNotImplemented,
"Type " << typeName<T>() <<
" is not meta-serializable");
903 Base::pointer(pointer);
907 assert(mCurrentMeta);
915 MIRA_THROW(XNotImplemented,
"Type " << typeName<T>() <<
" is not meta-serializable");
918 mCurrentMeta->setClassType(typeName<T>());
919 addCurrentAsMemberToParent();
928 mParentMeta = compound;
930 Base::object(member);
933 mCurrentMeta = prevCurrentMeta;
934 mParentMeta = prevParentMeta;
943 static const std::string context =
"invokeOverwrite " + typeName<T>();
946 Base::invokeOverwrite(
object);
957 static const std::string context =
"invokeOverwrite PlainArray<" + typeName<T>() +
">";
961 Base::invokeOverwrite(array);
963 collectionItems<T>(
"@itemcount",
true);
966 postReflect(prevState);
975 const std::string& n = type->getIdentifier();
977 if(mMetaDatabase.count(n)>0)
981 mMetaDatabase[n] = compound;
988 mParentMeta->addMember(getCurrentMemberMeta(), mCurrentMeta);
992 template<
typename T,
bool>
1001 template<
typename T>
1009 template<
typename T>
1018 template<
typename T,
bool>
1025 template<
typename T>
1034 template<
typename T>
1043 template <
typename T>
1049 mParentMeta.reset();
1060 mCurrentMeta = prevCurrentMeta;
1061 mParentMeta = prevParentMeta;
1066 template<
typename T>
1071 return createMetaHelper(dummy);
1075 template<
typename T>
1079 return createMeta<Type>();
1084 template<
typename T>
1087 return createMeta<T>();
1097 #define META_MAKE_METHODMETA_PUSH_PARAMETER(z, n, _) \
1098 m->parameters.push_back(MethodMeta::Parameter(createMetaHelper<P##n>()));
1100 #define META_MAKE_METHODMETA(z,n,_) \
1101 template <typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
1102 void createMethodMeta(const std::string& name, const std::string& comment) { \
1103 MethodMetaPtr m(new MethodMeta(name, comment)); \
1104 m->returnType = createMetaOrVoidHelper<R>(); \
1105 BOOST_PP_REPEAT_ ## z(n, META_MAKE_METHODMETA_PUSH_PARAMETER, nil) \
1110 #undef META_MAKE_METHODMETA_PUSH_PARAMETER
1111 #undef META_MAKE_METHODMETA
1113 #define META_MAKE_METHODMETA_PUSH_PARAMETERDESC(z, n, _) \
1114 m->parameters.push_back( \
1115 MethodMeta::Parameter(createMetaHelper<P##n>(), \
1116 name##n, description##n));
1118 #define META_MAKE_METHODMETA_CONSTSTRINGREF_NAME_DESC(z,n,_) \
1119 const std::string& name##n, const std::string& description##n
1121 #define META_MAKE_METHODMETA_PARAMETERDESC(z,n,_) \
1122 template <typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P)> \
1123 void createMethodMeta(const std::string& name, const std::string& comment, \
1124 BOOST_PP_ENUM(n,META_MAKE_METHODMETA_CONSTSTRINGREF_NAME_DESC,nil)) { \
1125 MethodMetaPtr m(new MethodMeta(name, comment)); \
1126 m->returnType = createMetaOrVoidHelper<R>(); \
1127 BOOST_PP_REPEAT_ ## z(n, META_MAKE_METHODMETA_PUSH_PARAMETERDESC, nil) \
1132 #undef META_MAKE_METHODMETA_PARAMETERDESC
1133 #undef META_MAKE_METHODMETA_CONSTSTRINGREF_NAME_DESC
1134 #undef META_MAKE_METHODMETA_PUSH_PARAMETERDESC
1140 template<
typename T>
1141 void property(
const char* name, T& member,
const char* comment,
1144 Base::property(name,member,comment,std::move(hint), flags);
1148 template<
typename T>
1149 void property(
const char* name,
const std::string&
id, T& member,
1152 Base::property(name,
id,member,comment,std::move(hint), flags);
1156 template<
typename T>
1160 Base::property<T>(name,member,
setter,comment,std::move(hint), flags);
1164 template<
typename T>
1168 Base::property(name,getter,setter,comment,std::move(hint), flags);
1172 template<
typename T,
typename U>
1173 void property(
const char* name, T& member,
const char* comment,
1176 Base::property(name,member,comment,defaultValue,std::move(hint), flags);
1180 template<
typename T,
typename U>
1182 const char* comment,
const U& defaultValue,
1185 Base::property(name,member,setter,comment,defaultValue, std::move(hint), flags);
1189 template<
typename T,
typename U>
1191 const char* comment,
const U& defaultValue,
1194 Base::property(name,getter,setter,comment,defaultValue,std::move(hint), flags);
1198 template<
typename T>
1201 this->This()->pushObjectTrackingStore();
1202 this->invokeMember(member,
ReflectMemberMeta(
"@transparent",
"@transparent",
"delegated") );
1203 this->This()->popObjectTrackingStore();
1205 this->invokeMember(member,
ReflectMemberMeta(
"@transparent",
"@transparent",
"delegated") );
1208 template<
typename T>
1212 this->This()->pushObjectTrackingStore();
1213 this->invokeMember(a,
ReflectMemberMeta(
"@transparent",
"@transparent",
"delegated") );
1214 this->This()->popObjectTrackingStore();
1217 template<
typename T>
1221 this->This()->pushObjectTrackingStore();
1222 this->invokeMember(a,
ReflectMemberMeta(
"@transparent",
"@transparent",
"delegated") );
1223 this->This()->popObjectTrackingStore();
1226 template<
typename T>
1231 assert(mCurrentMeta);
1234 assert(mParentMeta);
1236 mParentMeta->members.back().name =
"@items_blockdump";
1237 mParentMeta->members.back().comment = countName;
1239 mParentMeta->members.back().name =
"@items";
1240 mParentMeta->members.back().comment = countName;
1262 template<
typename T>
1265 template<
typename T>
1266 class IsTransparentSerializableHelper<serialization::PlainArray<T>, MetaSerializer> :
public std::true_type {};
1268 namespace serialization {
1280 template<
typename Container>
1281 struct ReflectCollectionItems<MetaSerializer, Container>
1283 static void reflect(MetaSerializer& r, Container& c)
1285 typedef typename Container::value_type rawtype;
1288 r.template collectionItems<type>(
"@itemcount");
1292 template<
typename Allocator>
1293 struct ReflectReadBoolVectorItems<MetaSerializer, Allocator>
1295 static void reflect(MetaSerializer& r, std::vector<bool, Allocator>& c)
1297 r.template collectionItems<bool>(
"@itemcount");
1301 template<
typename Container>
1302 struct ReflectReadSetItems<MetaSerializer, Container>
1304 typedef typename Container::value_type rawtype;
1307 static void reflect(MetaSerializer& r, Container& c)
1309 r.template collectionItems<type>(
"@itemcount");
1313 template<
typename Container>
1314 struct ReflectReadMapItems<MetaSerializer, Container>
1316 typedef typename Container::key_type rawkeytype;
1317 typedef typename Container::mapped_type rawmappedtype;
1321 static void reflect(MetaSerializer& r, Container& c)
1323 r.template collectionItems<type>(
"@itemcount");
This object can use object tracking internally, but the object tracking system's state remains unchan...
Definition: ReflectControlFlags.h:82
boost::shared_ptr< CompoundMeta > CompoundMetaPtr
Definition: MetaSerializer.h:503
Definition: BinarySerializer.h:324
#define RPC_METHODS_MAX_PARAMS
Definition: ReflectorInterface.h:583
Class for in place stream formatting.
static void reflect(Reflector &r, Container &c)
Definition: StlCollections.h:142
Type trait that indicates whether a type can be serialized bitwise by just copying the data buffer...
Definition: IsBitwiseSerializable.h:70
void member(const char *name, T &member, const char *comment, ReflectCtrlFlags flags=REFLECT_CTRLFLAG_NONE)
Definition: RecursiveMemberReflector.h:860
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:956
Setter< T > setter(void(*f)(const T &))
Creates a Setter for global or static class methods taking the argument by const reference.
Definition: GetterSetter.h:443
Definition: BinarySerializer.h:991
Holds a boost::function object to a special setter function that must meet the signature "void method...
Definition: GetterSetter.h:395
Type trait that indicates whether a type can be serialized as an atomic value.
Definition: IsAtomicSerializable.h:71
uint8 VersionType
Definition: ReflectorInterface.h:72
#define MIRA_THROW(ex, msg)
Macro for throwing an exception.
Definition: Exception.h:91
Type trait to check if a class is default constructible.
A property hint gives optional instructions to the property editor, i.e.
Definition: PropertyHint.h:82
std::string toString(const T &value, int precision=-1)
Converts any data type to string (the data type must support the stream << operator).
Definition: ToString.h:256
Binary serializer and deserializer.
static void reflect(Reflector &r, Container &c)
Definition: StlCollections.h:343
No flags.
Definition: ReflectControlFlags.h:65
PropertyHint type(const std::string &t)
Sets the attribute "type" to the specified value.
Definition: PropertyHint.h:295
ReflectorInterface< MetaSerializer >::AcceptDesiredVersion AcceptDesiredVersion
Definition: AbstractReflector.h:200
Container::value_type type
Definition: ReflectCollection.h:87
Getter< T > getter(T(*f)())
Creates a Getter for global or static class methods returning the result by value.
Definition: GetterSetter.h:136
void reflect(Reflector &r, LogRecord &record)
Non-intrusive reflector for LogRecord.
Definition: LoggingCore.h:136
static void reflect(Reflector &r, Container &c)
Definition: ReflectCollection.h:89
boost::shared_ptr< TypeMeta > TypeMetaPtr
Definition: MetaSerializer.h:309
VersionType version(VersionType version, const T *caller=NULL)
Definition: BinarySerializer.h:617
static int forcedSerializeVersion()
Returns either the version number from value of environment variable 'MIRA_FORCE_SERIALIZE_VERSION', or -1 (= do not force a version).
Definition: Serializer.h:145
Holds a boost::function object to a special getter function that must meet the signature "T method()"...
Definition: GetterSetter.h:87
Definition: BinarySerializer.h:257
ReflectCtrlFlags
Control Flags that can modify the behavior of certain reflectors.
Definition: ReflectControlFlags.h:63
Type trait that indicates whether a type is a collection.
Definition: IsCollection.h:63
Definition: IsTransparentSerializable.h:84
Accessor< Getter, Setter > makeAccessor(const Getter &getter, const Setter &setter)
Helper method that creates an accessor from a different combination of either direct access to a vari...
Definition: Accessor.h:300
boost::shared_ptr< MethodMeta > MethodMetaPtr
Definition: MetaSerializer.h:371
Container::value_type type
Definition: StlCollections.h:140