IBR-DTNSuite  0.12
BundleSetImpl.cpp
Go to the documentation of this file.
1 /*
2  * BundleSetImpl.cpp
3  *
4  * Copyright (C) 2013 IBR, TU Braunschweig
5  *
6  * Written-by: David Goltzsche <goltzsch@ibr.cs.tu-bs.de>
7  * Written-by: Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Created on: Apr 5, 2013
22  *
23  * only implements destructor
24  */
25 
27 
28 namespace dtn
29 {
30  namespace data
31  {
33  {
34  }
35 
37  : bundle(b)
38  {
39  }
40 
42  {
43  }
44 
46  {
47  return !(other == *this);
48  }
49 
51  {
52  return (other.bundle == this->bundle);
53  }
54 
56  {
57  if (bundle.expiretime < other.bundle.expiretime) return true;
58  if (bundle.expiretime != other.bundle.expiretime) return false;
59 
60  if (bundle < other.bundle) return true;
61 
62  return false;
63  }
64 
66  {
67  return !(((*this) < other) || ((*this) == other));
68  }
69  }
70 }