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