MCPcopy Create free account
hub / github.com/USCiLab/cereal / loadClassVersion

Method loadClassVersion

include/cereal/cereal.hpp:1013–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011
1012 @tparam T The type of the class being serialized */
1013 template <class T> inline
1014 std::uint32_t loadClassVersion()
1015 {
1016 static const auto hash = std::type_index(typeid(T)).hash_code();
1017 auto lookupResult = itsVersionedTypes.find( hash );
1018
1019 if( lookupResult != itsVersionedTypes.end() ) // already exists
1020 return lookupResult->second;
1021 else // need to load
1022 {
1023 std::uint32_t version;
1024
1025 process( make_nvp<ArchiveType>("cereal_class_version", version) );
1026 itsVersionedTypes.emplace_hint( lookupResult, hash, version );
1027
1028 return version;
1029 }
1030 }
1031
1032 //! Member serialization
1033 /*! Versioning implementation */

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected