OpenSDN source code
ifmap_object.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3
* Copyright Contributors to the OpenSDN project
4
*/
5
6
#include "
ifmap/ifmap_object.h
"
7
8
IFMapObject::IFMapObject
()
9
: refcount_(0), sequence_number_(0) {
10
}
11
12
IFMapObject::~IFMapObject
() {
13
}
14
15
void
IFMapObject::Release
(
IFMapObject
*
object
) {
16
if
(!object->
node_
.is_linked()) {
17
delete
object;
18
}
19
}
20
21
IFMapIdentifier::IFMapIdentifier
() {
22
}
23
24
IFMapIdentifier::IFMapIdentifier
(
int
property_count) :
25
property_set_(property_count), old_property_set_(property_count) {
26
}
27
28
void
IFMapIdentifier::TransferPropertyToOldProperty
() {
29
old_property_set_
=
property_set_
;
30
property_set_
.reset();
31
}
32
33
bool
IFMapIdentifier::ResolveStalePropertiesAndResetOld
() {
34
bool
ret = (
property_set_
!=
old_property_set_
);
35
old_property_set_
.reset();
36
return
ret;
37
}
38
39
bool
IFMapIdentifier::ResolveStaleness
() {
40
return
ResolveStalePropertiesAndResetOld
();
41
}
42
43
IFMapLinkAttr::IFMapLinkAttr
() {
44
}
45
46
// TODO: might need to resolve staleness by checking contents of data
47
bool
IFMapLinkAttr::ResolveStaleness
() {
48
return
false
;
49
}
50
IFMapIdentifier::IFMapIdentifier
IFMapIdentifier()
Definition:
ifmap_object.cc:21
IFMapIdentifier::ResolveStalePropertiesAndResetOld
bool ResolveStalePropertiesAndResetOld()
Definition:
ifmap_object.cc:33
IFMapIdentifier::ResolveStaleness
virtual bool ResolveStaleness()
Definition:
ifmap_object.cc:39
IFMapIdentifier::property_set_
boost::dynamic_bitset property_set_
Definition:
ifmap_object.h:104
IFMapIdentifier::TransferPropertyToOldProperty
void TransferPropertyToOldProperty()
Definition:
ifmap_object.cc:28
IFMapIdentifier::old_property_set_
boost::dynamic_bitset old_property_set_
Definition:
ifmap_object.h:105
IFMapLinkAttr::IFMapLinkAttr
IFMapLinkAttr()
Definition:
ifmap_object.cc:43
IFMapLinkAttr::ResolveStaleness
virtual bool ResolveStaleness()
Definition:
ifmap_object.cc:47
IFMapObject
Definition:
ifmap_object.h:24
IFMapObject::~IFMapObject
virtual ~IFMapObject()
Definition:
ifmap_object.cc:12
IFMapObject::IFMapObject
IFMapObject()
Definition:
ifmap_object.cc:8
IFMapObject::node_
boost::intrusive::list_member_hook node_
Definition:
ifmap_object.h:52
IFMapObject::Release
static void Release(IFMapObject *object)
Definition:
ifmap_object.cc:15
ifmap_object.h
contrail
controller
src
ifmap
ifmap_object.cc
Generated by
1.9.1