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