Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : */ 4 : 5 : #include "ifmap/ifmap_object.h" 6 : 7 167924 : IFMapObject::IFMapObject() 8 167924 : : refcount_(0), sequence_number_(0) { 9 167924 : } 10 : 11 167924 : IFMapObject::~IFMapObject() { 12 167924 : } 13 : 14 141142 : void IFMapObject::Release(IFMapObject *object) { 15 282284 : if (!object->node_.is_linked()) { 16 141142 : delete object; 17 : } 18 141142 : } 19 : 20 255 : IFMapIdentifier::IFMapIdentifier() { 21 255 : } 22 : 23 92377 : IFMapIdentifier::IFMapIdentifier(int property_count) : 24 92377 : property_set_(property_count), old_property_set_(property_count) { 25 92377 : } 26 : 27 16 : void IFMapIdentifier::TransferPropertyToOldProperty() { 28 16 : old_property_set_ = property_set_; 29 16 : property_set_.reset(); 30 16 : } 31 : 32 0 : bool IFMapIdentifier::ResolveStalePropertiesAndResetOld() { 33 0 : bool ret = (property_set_ != old_property_set_); 34 0 : old_property_set_.reset(); 35 0 : return ret; 36 : } 37 : 38 0 : bool IFMapIdentifier::ResolveStaleness() { 39 0 : return ResolveStalePropertiesAndResetOld(); 40 : } 41 : 42 75292 : IFMapLinkAttr::IFMapLinkAttr() { 43 75292 : } 44 : 45 : // TODO: might need to resolve staleness by checking contents of data 46 0 : bool IFMapLinkAttr::ResolveStaleness() { 47 0 : return false; 48 : } 49 :