inline int getDisplayName(IPropertyTree * parent, char * buffer, size32_t buffsz) const { *buffer = 0; size32_t insz = buffsz; switch(type) { case TLT_root: case TLT_property: STRCAT(buffer, buffsz, " "); STRCAT(buffer, buffsz, getName(parent)); if(ShowAttrsOnProps) { bool first = true; IAttributeIterator * attrIterator = pTree->getAttributes(); attrIterator->first(); while(attrIterator->isValid()) { STRCAT(buffer, buffsz, " "); if(first) { STRCAT(buffer, buffsz, "<"); first = false; } STRCAT(buffer, buffsz, attrIterator->queryName() + 1); STRCAT(buffer, buffsz, "="); STRCAT(buffer, buffsz, attrIterator->queryValue()); attrIterator->next(); } attrIterator->Release(); if(!first) STRCAT(buffer, buffsz, ">"); } break; case TLT_attribute: STRCAT(buffer, buffsz, "= "); STRCAT(buffer, buffsz, getName(NULL)); break; } return insz - buffsz; }