client-cpp  0.0.1-SNAPSHOT
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 <list>
21 
22 #include <boost/any.hpp>
23 
25 
26 namespace kaa {
27 
28 class IDeltaType;
29 typedef boost::shared_ptr<IDeltaType> DeltaTypePtr;
30 
34 class IDeltaType {
35 public:
36  typedef boost::any DeltaValue;
37  typedef std::list<DeltaValue> AddedItems;
38  typedef std::list<DeltaHandlerId> RemovedItems;
39 
45  virtual bool isDefault() = 0;
46 
53  virtual bool isReset() = 0;
54 
61  virtual const DeltaValue& getNewValue() = 0;
62 
70  virtual const RemovedItems& getRemovedItems() = 0;
71 
79  virtual const AddedItems& getAddedItems() = 0;
80 
86  virtual std::string toString() const = 0;
87 
88  virtual ~IDeltaType() {}
89 };
90 
91 } /* namespace kaa */
92 
93 #endif /* IDELTATYPE_HPP_ */
boost::any DeltaValue
Definition: IDeltaType.hpp:36
virtual ~IDeltaType()
Definition: IDeltaType.hpp:88
std::list< DeltaValue > AddedItems
Definition: IDeltaType.hpp:37
virtual bool isReset()=0
virtual bool isDefault()=0
virtual const RemovedItems & getRemovedItems()=0
boost::shared_ptr< IDeltaType > DeltaTypePtr
Definition: IDeltaType.hpp:28
std::list< DeltaHandlerId > RemovedItems
Definition: IDeltaType.hpp:38
virtual std::string toString() const =0
virtual const DeltaValue & getNewValue()=0
virtual const AddedItems & getAddedItems()=0