ARB
Classes | Macros | Typedefs | Functions | Variables
group_search.cxx File Reference
#include "group_search.h"
#include <arb_strarray.h>
#include <arb_progress.h>
#include <arb_sort.h>
#include <arb_strbuf.h>
#include <arb_defs.h>
#include <gb_aci_impl.h>
#include <ad_cb.h>
#include <TreeNode.h>
#include <map>
#include <stack>
#include <arb_misc.h>
#include <arb_msg_nospam.h>
Include dependency graph for group_search.cxx:

Go to the source code of this file.

Classes

class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
class  FINAL_TYPE< SEQTYPE >
 xml element More...
 
class  SearchedTree
 
class  ParentCache
 
class  GroupSearchCommon
 
class  Candidate
 
class  TargetGroup
 
struct  GroupInfo
 
class  DupNameCriterion
 
class  GroupCluster
 
class  DupCriteria
 
class  SymmetricMatrixMapper
 
class  Clusterer
 
struct  has_been_deleted
 
struct  was_modified
 
struct  compare_by_criteria
 
struct  GroupRename_callenv
 
struct  GroupNameQueryKey
 
struct  GroupFoldedKey
 
struct  GroupAIDkey
 
struct  GroupSizeKey
 
struct  GroupKeeledKey
 
struct  GroupZombiesKey
 
class  GroupMarkedKey
 
class  NestingLevelKey
 
class  ParentGroupNameQueryKey
 

Macros

#define TRIGGER_UPDATE_GROUP_RESULTS   "/tmp/trigger/group_result_update"
 

Typedefs

typedef SmartPtr< GroupSearchRoot > GroupSearchRootPtr
 
typedef vector< SearchedTreeSearchedTreeContainer
 
typedef
SearchedTreeContainer::iterator 
SearchedTreeIter
 
typedef list< CandidateCandidateList
 
typedef vector< GroupInfoGroupInfoVec
 
typedef set< intGroupClusterSet
 
typedef
GroupClusterSet::const_iterator 
GroupClusterCIter
 

Functions

bool group_is_folded (GBDATA *gb_group)
 
ARB_ERROR group_set_folded (GBDATA *gb_group, bool folded)
 
static void tree_node_deleted_cb (GBDATA *gb_node, GroupSearchCommon *common, GB_CB_TYPE cbtype)
 
static void group_name_changed_cb (GBDATA *gb_group_name, GroupSearchCommon *common)
 
static void result_update_cb (GBDATA *, GroupSearchCommon *common)
 
static void collect_searched_trees (GBDATA *gb_main, const TreeNameSet &trees_to_search, SearchedTreeContainer &searched_tree)
 
bool isCorrectParent (TreeNode *node, GBDATA *gb_group, GBDATA *gb_parent_group)
 
bool contains (const WordSet &ws, const string &w)
 
bool contains (const WordSet &ws, const char *w)
 
static void string2WordSet (const char *name, WordSet &words, const char *wordSeparators, const WordSet &ignored_words)
 
void string_to_lower (string &s)
 
unsigned long permutations (int elems)
 
const GroupRename_callenvcustom_env (GBL_command_arguments *args)
 
static GB_ERROR grl_hitidx (GBL_command_arguments *args)
 
static GB_ERROR grl_hitcount (GBL_command_arguments *args)
 
static GB_ERROR grl_groupsize (GBL_command_arguments *args)
 
static GB_ERROR grl_markedingroup (GBL_command_arguments *args)
 
static GB_ERROR grl_aid (GBL_command_arguments *args)
 
static GB_ERROR grl_nesting (GBL_command_arguments *args)
 
static const
GBL_command_lookup_table
get_GroupRename_customized_ACI_commands ()
 
charGS_calc_resulting_groupname (GBDATA *gb_main, const QueriedGroups &queried, int hit_idx, const char *input_name, const char *acisrt, ARB_ERROR &error)
 
static void set_marks_of (const SpeciesNames &targetSpecies, GBDATA *gb_main, GroupMarkMode mode)
 

Variables

static GBL_command_definition groupRename_command_table []
 

Macro Definition Documentation

#define TRIGGER_UPDATE_GROUP_RESULTS   "/tmp/trigger/group_result_update"

Definition at line 419 of file group_search.cxx.

Typedef Documentation

typedef SmartPtr<GroupSearchRoot> GroupSearchRootPtr

Definition at line 132 of file group_search.cxx.

Definition at line 187 of file group_search.cxx.

typedef SearchedTreeContainer::iterator SearchedTreeIter

Definition at line 188 of file group_search.cxx.

typedef list<Candidate> CandidateList

Definition at line 674 of file group_search.cxx.

typedef vector<GroupInfo> GroupInfoVec

Definition at line 969 of file group_search.cxx.

typedef set<int> GroupClusterSet

Definition at line 1051 of file group_search.cxx.

typedef GroupClusterSet::const_iterator GroupClusterCIter

Definition at line 1052 of file group_search.cxx.

Function Documentation

bool group_is_folded ( GBDATA gb_group)
inline

Definition at line 274 of file group_search.cxx.

References GB_entry(), and GB_read_byte().

Referenced by FoundGroup::is_folded(), and FoundGroup::overlap_is_folded().

ARB_ERROR group_set_folded ( GBDATA gb_group,
bool  folded 
)
inline
static void tree_node_deleted_cb ( GBDATA gb_node,
GroupSearchCommon common,
GB_CB_TYPE  cbtype 
)
static
static void group_name_changed_cb ( GBDATA gb_group_name,
GroupSearchCommon common 
)
static

Definition at line 512 of file group_search.cxx.

References GB_get_father(), and GroupSearchCommon::notify_modified().

static void result_update_cb ( GBDATA ,
GroupSearchCommon common 
)
static

Definition at line 518 of file group_search.cxx.

References GroupSearchCommon::refresh_all_results().

static void collect_searched_trees ( GBDATA gb_main,
const TreeNameSet trees_to_search,
SearchedTreeContainer searched_tree 
)
static
bool isCorrectParent ( TreeNode node,
GBDATA gb_group,
GBDATA gb_parent_group 
)
inline

check correctness of parent (caching)

Parameters
nodethe TreeNode where clade is shown in tree
gb_groupthe group data related to node (at node for normal groups; at parent-node for keeled groups)
gb_parent_groupthe parent group data (may be NULp)
Returns
true if gb_parent_group is the correct parent

Definition at line 677 of file group_search.cxx.

References TreeNode::find_parent_with_groupInfo(), TreeNode::gb_node, gs_assert, TreeNode::is_keeled_group(), TreeNode::is_normal_group(), TreeNode::keelTarget(), and NULp.

Referenced by GroupSearch::perform_search().

bool contains ( const WordSet ws,
const string w 
)
inline
bool contains ( const WordSet ws,
const char w 
)
inline

Definition at line 928 of file group_search.cxx.

References contains().

static void string2WordSet ( const char name,
WordSet words,
const char wordSeparators,
const WordSet ignored_words 
)
static
void string_to_lower ( string s)
inline

Definition at line 941 of file group_search.cxx.

Referenced by DupNameCriterion::DupNameCriterion(), and GroupInfo::GroupInfo().

unsigned long permutations ( int  elems)
inline

Definition at line 1485 of file group_search.cxx.

const GroupRename_callenv& custom_env ( GBL_command_arguments args)
inline
static GB_ERROR grl_hitidx ( GBL_command_arguments args)
static
static GB_ERROR grl_hitcount ( GBL_command_arguments args)
static
static GB_ERROR grl_groupsize ( GBL_command_arguments args)
static
static GB_ERROR grl_markedingroup ( GBL_command_arguments args)
static
static GB_ERROR grl_aid ( GBL_command_arguments args)
static
static GB_ERROR grl_nesting ( GBL_command_arguments args)
static
static const GBL_command_lookup_table& get_GroupRename_customized_ACI_commands ( )
static

Definition at line 2078 of file group_search.cxx.

References ACI_get_standard_commands(), and ARRAY_ELEMS.

Referenced by GS_calc_resulting_groupname().

char* GS_calc_resulting_groupname ( GBDATA gb_main,
const QueriedGroups queried,
int  hit_idx,
const char input_name,
const char acisrt,
ARB_ERROR error 
)
static void set_marks_of ( const SpeciesNames targetSpecies,
GBDATA gb_main,
GroupMarkMode  mode 
)
static

Variable Documentation

GBL_command_definition groupRename_command_table[]
static
Initial value:
= {
{ "hitidx", grl_hitidx },
{ "hitcount", grl_hitcount },
{ "groupSize", grl_groupsize },
{ "markedInGroup", grl_markedingroup },
{ "aid", grl_aid },
{ "nesting", grl_nesting },
{ NULp, NULp }
}
static GB_ERROR grl_hitcount(GBL_command_arguments *args)
static GB_ERROR grl_nesting(GBL_command_arguments *args)
static GB_ERROR grl_aid(GBL_command_arguments *args)
static GB_ERROR grl_groupsize(GBL_command_arguments *args)
static GB_ERROR grl_markedingroup(GBL_command_arguments *args)
#define NULp
Definition: cxxforward.h:116
static GB_ERROR grl_hitidx(GBL_command_arguments *args)

Definition at line 2067 of file group_search.cxx.