diff -r 88230da4bb1a -r 8c3dfe0be54d src/config-store/model/attribute-default-iterator.cc --- a/src/config-store/model/attribute-default-iterator.cc Wed Aug 03 09:42:10 2011 -0400 +++ b/src/config-store/model/attribute-default-iterator.cc Wed Aug 03 10:04:56 2011 -0400 @@ -43,43 +43,40 @@ bool calledStart = false; for (uint32_t j = 0; j < tid.GetAttributeN (); j++) { - uint32_t flags = tid.GetAttributeFlags (j); - if (!(flags & TypeId::ATTR_CONSTRUCT)) + struct TypeId::AttributeInformation info = tid.GetAttribute (j); + if (!(info.flags & TypeId::ATTR_CONSTRUCT)) { // we can't construct the attribute, so, there is no // initial value for the attribute continue; } - Ptr accessor = tid.GetAttributeAccessor (j); //No accessor, go to next attribute - if (accessor == 0) + if (info.accessor == 0) { continue; } - if (!accessor->HasSetter ()) + if (!info.accessor->HasSetter ()) { //skip this attribute it doesn't have an setter continue; } - Ptr checker = tid.GetAttributeChecker (j); - if (checker == 0) + if (info.checker == 0) { //skip, it doesn't have a checker continue; } - Ptr value = tid.GetAttributeInitialValue (j); - if (value == 0) + if (info.initialValue == 0) { //No value, check next attribute continue; } - Ptr vector = DynamicCast (value); + Ptr vector = DynamicCast (info.initialValue); if (vector != 0) { //a vector value, won't take it continue; } - Ptr pointer = DynamicCast (value); + Ptr pointer = DynamicCast (info.initialValue); if (pointer != 0) { //pointer value, won't take it @@ -88,9 +85,9 @@ //We take only values, no pointers or vectors if (!calledStart) { - StartVisitTypeId (tid.GetName ()); + StartVisitTypeId (info.name); } - VisitAttribute (tid, tid.GetAttributeName (j), value->SerializeToString (checker), j); + VisitAttribute (tid, info.name, info.initialValue->SerializeToString (info.checker), j); calledStart = true; } if (calledStart)