ARB
|
#include "awt_TreeAwars.hxx"
#include <arbdbt.h>
#include <ad_cb.h>
#include <arb_global_defs.h>
#include <aw_awar.hxx>
#include <aw_root.hxx>
#include <aw_global_awars.hxx>
#include <set>
#include <cstddef>
Go to the source code of this file.
Classes | |
class | BoundTreeAwarCallback |
class | TreeAwarRegistry |
Macros | |
#define | awt_assert(cond) arb_assert(cond) |
Typedefs | |
typedef SmartPtr < BoundTreeAwarCallback > | BoundTreeAwarCallbackPtr |
typedef std::set < BoundTreeAwarCallbackPtr > | BoundTreeAwarCallbacks |
Functions | |
bool | operator< (const BoundTreeAwarCallbackPtr &bc1, const BoundTreeAwarCallbackPtr &bc2) |
static void | destroy_TreeAwarRegistry () |
static void | TreeDataChanged_cb (UNFIXED, BoundTreeAwarCallback *tac, GB_CB_TYPE cbtype) |
static void | TreeAwarChanged_cb (UNFIXED, BoundTreeAwarCallback *tac) |
static void | tree_renamed_cb (AW_root *aw_root) |
void | AWT_initTreeAwarRegistry (GBDATA *gbmain) |
void | AWT_registerTreeAwarCallback (AW_awar *awar, const TreeAwarCallback &tacb, bool triggerIfTreeDataChanges) |
static void | null_cb () |
void | AWT_registerTreeAwarSimple (AW_awar *awar) |
static void | announce_renamed (const char *oldname, const char *newname) |
void | AWT_announce_tree_renamed (const char *oldname, const char *newname) |
void | AWT_announce_tree_deleted (const char *name) |
#define awt_assert | ( | cond | ) | arb_assert(cond) |
Definition at line 26 of file AWT_TreeAwars.cxx.
Referenced by AWT_initTreeAwarRegistry().
Definition at line 61 of file AWT_TreeAwars.cxx.
typedef std::set<BoundTreeAwarCallbackPtr> BoundTreeAwarCallbacks |
Definition at line 67 of file AWT_TreeAwars.cxx.
|
inline |
Definition at line 63 of file AWT_TreeAwars.cxx.
|
static |
Definition at line 88 of file AWT_TreeAwars.cxx.
References SmartPtr< T, C >::setNull().
Referenced by TreeAwarRegistry::TreeAwarRegistry().
|
static |
Definition at line 95 of file AWT_TreeAwars.cxx.
References BoundTreeAwarCallback::call(), GB_CB_DELETE, and BoundTreeAwarCallback::tree_lost().
Referenced by BoundTreeAwarCallback::bind_tree_callback().
|
static |
Definition at line 101 of file AWT_TreeAwars.cxx.
References BoundTreeAwarCallback::bind_tree_callback(), and BoundTreeAwarCallback::call().
Referenced by BoundTreeAwarCallback::BoundTreeAwarCallback(), and BoundTreeAwarCallback::~BoundTreeAwarCallback().
|
static |
Definition at line 149 of file AWT_TreeAwars.cxx.
References AW_root::awar(), AWAR_ARB_TREE_RENAMED, error(), NULp, AW_awar::read_char_pntr(), AW_awar::read_string(), and TreeAwarRegistry::tree_renamed().
Referenced by TreeAwarRegistry::TreeAwarRegistry().
void AWT_initTreeAwarRegistry | ( | GBDATA * | gbmain | ) |
initialize TreeAwarRegistry.
Has to be called after ARB_init_global_awars(). Will be destroyed on GB_close().
Allows to use other functions provided by this module.
Definition at line 189 of file AWT_TreeAwars.cxx.
References awt_assert, GBK_terminate(), and get_gb_main().
Referenced by ARB_main(), and startup_mainwindow_and_dbserver().
void AWT_registerTreeAwarCallback | ( | AW_awar * | awar, |
const TreeAwarCallback & | tacb, | ||
bool | triggerIfTreeDataChanges | ||
) |
bind and register TreeAwarCallback
Signature of TreeAwarCallback is 'void cb(AW_awar *awar, bool treeDataChanged, ...)' 'treeDataChanged' is true, if the callback is triggered by a change of the tree-data 'treeDataChanged' is false, if the callback is triggered by a change of the awar
if 'triggerIfTreeDataChanges' is false, the callback will not trigger if tree-data changes
Definition at line 208 of file AWT_TreeAwars.cxx.
References TreeAwarRegistry::add().
Referenced by AWT_registerTreeAwarSimple(), DI_create_matrix_variables(), and popup_new_main_window().
|
static |
Definition at line 221 of file AWT_TreeAwars.cxx.
Referenced by AWT_registerTreeAwarSimple().
void AWT_registerTreeAwarSimple | ( | AW_awar * | awar | ) |
just register a tree awar, w/o any client cb. -> awar will just automatically follow tree-renames
Definition at line 222 of file AWT_TreeAwars.cxx.
References AWT_registerTreeAwarCallback(), and null_cb().
Referenced by AP_create_pos_var_pars_window(), TreeAdmin::create_awars(), and create_trees_var().
Definition at line 229 of file AWT_TreeAwars.cxx.
References AW_root::awar(), AWAR_ARB_TREE_RENAMED, GBS_global_string(), AW_root::SINGLETON, and AW_awar::write_string().
Referenced by AWT_announce_tree_deleted(), and AWT_announce_tree_renamed().
Definition at line 234 of file AWT_TreeAwars.cxx.
References announce_renamed().
Referenced by TreeAdmin::tree_copy_or_rename_cb().
void AWT_announce_tree_deleted | ( | const char * | name | ) |
Definition at line 235 of file AWT_TreeAwars.cxx.
References announce_renamed(), and NO_TREE_SELECTED.
Referenced by TreeAdmin::delete_tree_cb().