CMS 3D CMS Logo

SerializationHelperBase.h
Go to the documentation of this file.
1 #ifndef CondFormats_SerializationHelper_SerializationHelperBase_h
2 #define CondFormats_SerializationHelper_SerializationHelperBase_h
3 // -*- C++ -*-
4 //
5 // Package: CondFormats/SerializationHelper
6 // Class : SerializationHelperBase
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Wed, 31 May 2023 14:45:56 GMT
19 //
20 
21 // system include files
22 #include <string_view>
23 
24 // user include files
26 
27 // forward declarations
28 
29 namespace cond::serialization {
31  public:
32  SerializationHelperBase() = default;
33  virtual ~SerializationHelperBase() = default;
34 
35  SerializationHelperBase(const SerializationHelperBase&) = delete; // stop default
36  const SerializationHelperBase& operator=(const SerializationHelperBase&) = delete; // stop default
37 
38  // ---------- const member functions ---------------------
39  virtual unique_void_ptr deserialize(std::streambuf&, const std::string_view iClassName) const = 0;
40 
41  //returns name of type serialized. This is needed for polymorphism storage
42  virtual std::string_view serialize(std::streambuf&, void const*) const = 0;
43  virtual const std::type_info& type() const = 0;
44  };
45 } // namespace cond::serialization
46 #endif
const SerializationHelperBase & operator=(const SerializationHelperBase &)=delete
virtual const std::type_info & type() const =0
virtual unique_void_ptr deserialize(std::streambuf &, const std::string_view iClassName) const =0
virtual std::string_view serialize(std::streambuf &, void const *) const =0