JBoss Data Grid HotRod C++ Client  6.6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Marshaller.h
Go to the documentation of this file.
1 #ifndef ISPN_HOTROD_MARSHALLER_H
2 #define ISPN_HOTROD_MARSHALLER_H
3 
4 #include "portable.h"
6 
7 namespace infinispan {
8 namespace hotrod {
9 
10 class ScopedBuffer;
11 
12 // Todo: application buffer memory management; async readers/writers. SSL implications?
13 
14 template <class T> class Marshaller: public portable::counted_object
15 {
16  public:
17  virtual void marshall(const T&, ScopedBuffer&) = 0;
18  virtual T* unmarshall(const ScopedBuffer&) = 0;
19 
20  virtual ~Marshaller() {}
21  static void destroy(Marshaller<T> *marshaller) { delete marshaller; }
22 };
23 
24 }} // namespace
25 
26 #endif /* ISPN_HOTROD_MARSHALLER_H */
virtual ~Marshaller()
Definition: Marshaller.h:20
virtual void marshall(const T &, ScopedBuffer &)=0
virtual T * unmarshall(const ScopedBuffer &)=0
static void destroy(Marshaller< T > *marshaller)
Definition: Marshaller.h:21
Definition: ScopedBuffer.h:20
Definition: Marshaller.h:14