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 168199 : IFMapObject::IFMapObject() 8 168199 : : refcount_(0), sequence_number_(0) { 9 168199 : } 10 : 11 168198 : IFMapObject::~IFMapObject() { 12 168198 : } 13 : 14 141297 : void IFMapObject::Release(IFMapObject *object) { 15 282594 : if (!object->node_.is_linked()) { 16 141297 : delete object; 17 : } 18 141297 : } 19 : 20 255 : IFMapIdentifier::IFMapIdentifier() { 21 255 : } 22 : 23 92584 : IFMapIdentifier::IFMapIdentifier(int property_count) : 24 92584 : property_set_(property_count), old_property_set_(property_count) { 25 92584 : } 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 75360 : IFMapLinkAttr::IFMapLinkAttr() { 43 75360 : } 44 : 45 : // TODO: might need to resolve staleness by checking contents of data 46 0 : bool IFMapLinkAttr::ResolveStaleness() { 47 0 : return false; 48 : } 49 :