CFEL - ASG Software Suite  2.5.0
CASS
device_backend.hpp
Go to the documentation of this file.
1 // Copyright (C) 2009, 2010, 2015 Lutz Foucar
2 
3 /**
4  * @file device_backend.hpp contains base class for all devices that are part of
5  * the cassevent.
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef CASS_DEVICEBACKEND_H
11 #define CASS_DEVICEBACKEND_H
12 
13 #include <stdexcept>
14 #include <tr1/memory>
15 
16 #include "cass.h"
17 #include "serializable.hpp"
18 
19 namespace cass
20 {
21 /** A Baseclass for all Devices in the CASSEvent.
22  *
23  * @note All devices need to be serializable, therefore this class
24  * inerhits from serializable.
25  *
26  * @author Lutz Foucar
27  */
29 {
30 public:
31  /** a shared pointer of this type */
32  typedef std::tr1::shared_ptr<DeviceBackend> shared_pointer;
33 
34  /** constructor already initializing the serialization version */
35  DeviceBackend(uint16_t version)
36  :Serializable(version)
37  {}
38 
39  /** serializer is still pure virtual */
40  virtual void serialize(cass::SerializerBackend &)const=0;
41 
42  /** deserializer is still pure virtual */
43  virtual bool deserialize(cass::SerializerBackend &)=0;
44 
45  /** virtual desctructor */
46  virtual ~DeviceBackend() {}
47 };
48 }//end namespace cass
49 
50 #endif
virtual ~DeviceBackend()
virtual desctructor
file contains base class all serializable classes
virtual void serialize(cass::SerializerBackend &) const =0
serializer is still pure virtual
file contains global definitions for project cass
std::tr1::shared_ptr< DeviceBackend > shared_pointer
a shared pointer of this type
virtual bool deserialize(cass::SerializerBackend &)=0
deserializer is still pure virtual
A Baseclass for all Devices in the CASSEvent.
Serializable.
DeviceBackend(uint16_t version)
constructor already initializing the serialization version