예제 #1
0
Udm::Object SFUtils::getTopArchetype( Udm::Object object ) {
    if ( object == Udm::null ) return object;

    Udm::Object archetype = object.archetype();
    while( archetype != Udm::null ) {
        object = archetype;
        archetype = object.archetype();
    }
    return object;
}
예제 #2
0
Udm::Object SFUtils::getTopLevelInstance( Udm::Object object ) {
    if ( object == Udm::null ) return Udm::null;

    Udm::Object parent = object.GetParent();

    Udm::Object archetype = parent.archetype();
    while( archetype != Udm::null ) {
        if (  ( object = object.archetype() ) == Udm::null  ) return Udm::null;
        parent = archetype;
        archetype = parent.archetype();
    }
    return object;
}