ARB
Macros | Functions | Variables
NT_syncroot.cxx File Reference
#include <SyncRoot.hxx>
#include <TreeRead.h>
#include <aw_window.hxx>
#include <aw_msg.hxx>
#include <aw_root.hxx>
#include <aw_select.hxx>
#include <aw_awar.hxx>
#include <awt_sel_boxes.hxx>
#include <arb_global_defs.h>
Include dependency graph for NT_syncroot.cxx:

Go to the source code of this file.

Macros

#define TREE_SYNCROOT_AWAR_BASE   "tree/syncroot/"
 
#define TREE_SYNCROOT_TEMP_BASE   "tmp/" TREE_SYNCROOT_AWAR_BASE
 
#define AWAR_TREE_SYNCROOT_SELECTED   TREE_SYNCROOT_TEMP_BASE "selected"
 

Functions

static GB_ERROR load_and_add_tree (GBDATA *gb_main, const char *treename, RootSynchronizer &addTo)
 
static ARB_ERROR adjustTreeRoot (ConstSizeAwareTreePtr newRootEdge, RootSynchronizer &rsync, size_t t, GBDATA *gb_main, const char *distInfo, int rt)
 
static ARB_ERROR adjustTreeRoot (ErrorOrSizeAwareTreePtr bestEdge, RootSynchronizer &rsync, size_t t, GBDATA *gb_main, const char *distInfo, int rt)
 
static void rootsync_subsetTrees_vs_selected (AW_window *aws, GBDATA *gb_main, AW_selection *tosync_trees_selection)
 
static void multiroot_sync_subsetTrees (AW_window *, GBDATA *gb_main, AW_selection *tosync_trees_selection)
 
static void create_syncroot_awars (AW_root *awr)
 
AW_windowNT_create_syncroot_window (AW_root *awr, GBDATA *gb_main)
 

Variables

const int MULTIROOT_SEARCH_DEPTH = 1
 

Macro Definition Documentation

#define TREE_SYNCROOT_AWAR_BASE   "tree/syncroot/"

Definition at line 25 of file NT_syncroot.cxx.

#define TREE_SYNCROOT_TEMP_BASE   "tmp/" TREE_SYNCROOT_AWAR_BASE

Definition at line 26 of file NT_syncroot.cxx.

#define AWAR_TREE_SYNCROOT_SELECTED   TREE_SYNCROOT_TEMP_BASE "selected"

Function Documentation

static GB_ERROR load_and_add_tree ( GBDATA gb_main,
const char treename,
RootSynchronizer addTo 
)
static
static ARB_ERROR adjustTreeRoot ( ConstSizeAwareTreePtr  newRootEdge,
RootSynchronizer rsync,
size_t  t,
GBDATA gb_main,
const char distInfo,
int  rt 
)
static

save tree to DB (if 'bestEdge' not already is the root edge). logs into tree comment + prints info message to gui.

Parameters
newRootEdgeson node of edge wanted as root edge.
rsyncsynchronizer used to find 'bestEdge'.
tindex of tree in 'rsync' (tree has to contain 'bestEdge')
gb_mainthe database
distInfoinformation about distance. gets added to message and/or log entries.
rtindex of reference tree (or -1 when multiroot optimization is performed)
Returns
error

Definition at line 42 of file NT_syncroot.cxx.

References arb_assert, aw_message(), GB_transaction::close(), error(), GBS_global_string(), GBT_find_tree(), GBT_log_to_tree_remark(), GBT_overwrite_tree(), TreeContainer::get_tree_info(), TreeInfo::name(), ta, and RootSynchronizer::take_tree().

Referenced by adjustTreeRoot(), multiroot_sync_subsetTrees(), and rootsync_subsetTrees_vs_selected().

static ARB_ERROR adjustTreeRoot ( ErrorOrSizeAwareTreePtr  bestEdge,
RootSynchronizer rsync,
size_t  t,
GBDATA gb_main,
const char distInfo,
int  rt 
)
static
static void rootsync_subsetTrees_vs_selected ( AW_window aws,
GBDATA gb_main,
AW_selection tosync_trees_selection 
)
static
static void multiroot_sync_subsetTrees ( AW_window ,
GBDATA gb_main,
AW_selection tosync_trees_selection 
)
static
static void create_syncroot_awars ( AW_root awr)
static
AW_window* NT_create_syncroot_window ( AW_root awr,
GBDATA gb_main 
)

Variable Documentation

const int MULTIROOT_SEARCH_DEPTH = 1

Definition at line 159 of file NT_syncroot.cxx.