gala_clients/DIS_group/src/GROUPswApp.cxx
// Set the Peer groups for the selected source groups.
Set the Peer groups for the selected source groups.
Set the Peer groups for the selected source groups .
vbool GROUPswApp::setPeerGroups(const symbolArr groups, symbolArr& peers)
{
    Initialize(GROUPswApp::setPeerGroups);
    symbolPtr groupSym;
    ForEachS(groupSym, groups) {
        groupHdrPtr group = groupHdr::sym_to_groupHdr(groupSym);
        if (group) {
            symbolPtr peerSym;
            ForEachS(peerSym, peers) {
                if (strcmp(peerSym.get_name(), groupSym.get_name()) != 0) {
                    groupHdrPtr peer = groupHdr::sym_to_groupHdr(peerSym);
                    if (peer) {
                        group->make_peer(peer);
                    }
                }
            }
        } else {
            dis_message(0, MSG_ERROR, "Symbol '%s' isn't a groupHdr!!!\n",
                    groupSym.get_name() );
        }
    }
    return (vTRUE);
}
vbool GROUPswApp :: setPeerGroups ( const symbolArr groups , symbolArr & peers ) { Initialize ( GROUPswApp :: setPeerGroups ) ; symbolPtr groupSym ; ForEachS ( groupSym , groups ) { groupHdrPtr group = groupHdr :: sym_to_groupHdr ( groupSym ) ; if ( group ) { symbolPtr peerSym ; ForEachS ( peerSym , peers ) { if ( strcmp ( peerSym . get_name ( ) , groupSym . get_name ( ) ) != 0 ) { groupHdrPtr peer = groupHdr :: sym_to_groupHdr ( peerSym ) ; if ( peer ) { group -> make_peer ( peer ) ; } } } } else { dis_message ( 0 , MSG_ERROR , " \n " , groupSym . get_name ( ) ) ; } } return ( vTRUE ) ; }
Set the Peer groups for the selected source groups.
Set the Peer groups for the selected source groups .
// Loop through the selected groups, adding peer relations. // Make each group in the peer array a peer to this group. // Make sure that the two groups are not the same. // Set the peers for this group.