gala_clients/DIS_group/src/GROUPswApp.cxx
// Show all Members of selected groups.
Show all Members of selected groups.
Show all Members of selected groups .
vbool GROUPswApp::showLocalMembers(const symbolArr sources, symbolArr& results)
{
    Initialize(GROUPswApp::showLocalMembers);
    symbolSet memberSet;
    memberSet.insert(results);
    symbolPtr groupSym;
    ForEachS(groupSym, sources) {
        groupHdrPtr group = groupHdr::sym_to_groupHdr(groupSym);
        if (group) {
            symbolArr members;
            group->get_members(members, FALSE);
            symbolPtr mem;
            ForEachS(mem, members) {
                if (!memberSet.includes(mem) )
                    memberSet.insert_last(mem);
            }
        } else {
            dis_message(0, MSG_ERROR, "Symbol '%s' isn't a groupHdr!!!\n",
                    groupSym.get_name() );
        }
    }
    results = memberSet;
    return (vTRUE);
}
vbool GROUPswApp :: showLocalMembers ( const symbolArr sources , symbolArr & results ) { Initialize ( GROUPswApp :: showLocalMembers ) ; symbolSet memberSet ; memberSet . insert ( results ) ; symbolPtr groupSym ; ForEachS ( groupSym , sources ) { groupHdrPtr group = groupHdr :: sym_to_groupHdr ( groupSym ) ; if ( group ) { symbolArr members ; group -> get_members ( members , FALSE ) ; symbolPtr mem ; ForEachS ( mem , members ) { if ( ! memberSet . includes ( mem ) ) memberSet . insert_last ( mem ) ; } } else { dis_message ( 0 , MSG_ERROR , " \n " , groupSym . get_name ( ) ) ; } } results = memberSet ; return ( vTRUE ) ; }
Show all Members of selected groups.
Show all Members of selected groups .
// This set will hold the members. // Loop through the selected groups, adding all members to the members list. // Get all members for the group. // Add the members to the members list. //    (If it isn't already in the list.)