gala_clients/DIS_group/src/GROUPswApp.cxx
// Show the Peer groups for the selected source groups.
Show the Peer groups for the selected source groups.
Show the Peer groups for the selected source groups .
vbool GROUPswApp::showPeerGroups(const symbolArr sources, symbolArr& results)
{
    Initialize(GROUPswApp::showPeerGroups);
    symbolSet peerSet;
    peerSet.insert(results);
    symbolPtr groupSym;
    ForEachS(groupSym, sources) {
        groupHdrPtr group = groupHdr::sym_to_groupHdr(groupSym);
        if (group) {
            symbolArr peerSyms;
            group->get_peers(peerSyms);
            symbolPtr peerSym;
            ForEachS(peerSym, peerSyms) {
                if (!peerSet.includes(peerSym) )
                    peerSet.insert(peerSym);
            }
        } else {
            dis_message(0, MSG_ERROR, "Symbol '%s' isn't a groupHdr!!!\n",
                    groupSym.get_name() );
        }
    }
    results = peerSet;
    return (vTRUE);
}
vbool GROUPswApp :: showPeerGroups ( const symbolArr sources , symbolArr & results ) { Initialize ( GROUPswApp :: showPeerGroups ) ; symbolSet peerSet ; peerSet . insert ( results ) ; symbolPtr groupSym ; ForEachS ( groupSym , sources ) { groupHdrPtr group = groupHdr :: sym_to_groupHdr ( groupSym ) ; if ( group ) { symbolArr peerSyms ; group -> get_peers ( peerSyms ) ; symbolPtr peerSym ; ForEachS ( peerSym , peerSyms ) { if ( ! peerSet . includes ( peerSym ) ) peerSet . insert ( peerSym ) ; } } else { dis_message ( 0 , MSG_ERROR , " \n " , groupSym . get_name ( ) ) ; } } results = peerSet ; return ( vTRUE ) ; }
Show the Peer groups for the selected source groups.
Show the Peer groups for the selected source groups .
// Get the list of Peer groups. // Get the peers for this group. // Add the peers to the target Set, if not already there.