OpenDaVINCI  4.15.3
SerializationFactory.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_CORE_SERIALIZATION_SERIALIZATIONFACTORY_H_
21 #define OPENDAVINCI_CORE_SERIALIZATION_SERIALIZATIONFACTORY_H_
22 
23 #include <iosfwd>
24 
26 #include <memory>
28 
29 class SerializationFactoryTestCase;
30 
31 namespace odcore {
32  namespace serialization {
33 
34 class Deserializer;
35 class Serializer;
36 
37  using namespace std;
38 
46  protected:
47  friend class SerializationFactoryTestCase;
49 
50  private:
57 
63  SerializationFactory& operator=(const SerializationFactory &);
64 
65  public:
66  static SerializationFactory& getInstance();
67 
68  virtual ~SerializationFactory();
69 
76  virtual std::shared_ptr<Serializer> getSerializer(ostream &out) const;
77 
84  virtual std::shared_ptr<Deserializer> getDeserializer(istream &in) const;
85 
92  std::shared_ptr<Serializer> getQueryableNetstringsSerializer(ostream &out) const;
93 
100  std::shared_ptr<Deserializer> getQueryableNetstringsDeserializer(istream &in) const;
101 
102  protected:
108  static void setSingleton(SerializationFactory* singleton);
109 
110  private:
111  static base::Mutex m_singletonMutex;
112 
113  protected:
115  };
116 
117  }
118 } // odcore::serialization
119 
120 #endif /*OPENDAVINCI_CORE_SERIALIZATION_SERIALIZATIONFACTORY_H_*/
Definition: base/Mutex.h:49
Definition: SerializationFactory.h:45
#define OPENDAVINCI_API
Definition: opendavinci.h:67
static SerializationFactory * m_singleton
Definition: SerializationFactory.h:114