client-cpp  0.6.1
IDeltaType.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef IDELTATYPE_HPP_
18 #define IDELTATYPE_HPP_
19 
20 #include "kaa/KaaDefaults.hpp"
21 
22 #ifdef KAA_USE_CONFIGURATION
23 
24 #include <list>
25 #include <memory>
26 #include <boost/any.hpp>
27 
29 
30 namespace kaa {
31 
32 class IDeltaType;
33 typedef std::shared_ptr<IDeltaType> DeltaTypePtr;
34 
38 class IDeltaType {
39 public:
40  typedef boost::any DeltaValue;
41  typedef std::list<DeltaValue> AddedItems;
42  typedef std::list<DeltaHandlerId> RemovedItems;
43 
49  virtual bool isDefault() = 0;
50 
57  virtual bool isReset() = 0;
58 
65  virtual const DeltaValue& getNewValue() = 0;
66 
74  virtual const RemovedItems& getRemovedItems() = 0;
75 
83  virtual const AddedItems& getAddedItems() = 0;
84 
90  virtual std::string toString() const = 0;
91 
92  virtual ~IDeltaType() {}
93 };
94 
95 } /* namespace kaa */
96 
97 #endif
98 
99 #endif /* IDELTATYPE_HPP_ */