Classes | Macros | Typedefs | Functions
AWT_TreeAwars.cxx File Reference
#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>
Include dependency graph for AWT_TreeAwars.cxx:

Go to the source code of this file.


class  BoundTreeAwarCallback
class  TreeAwarRegistry


#define awt_assert(cond)   arb_assert(cond)


typedef SmartPtr
< BoundTreeAwarCallback
typedef std::set
< BoundTreeAwarCallbackPtr


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)

Macro Definition Documentation

#define awt_assert (   cond)    arb_assert(cond)

Definition at line 26 of file AWT_TreeAwars.cxx.

Referenced by AWT_initTreeAwarRegistry().

Typedef Documentation

Definition at line 61 of file AWT_TreeAwars.cxx.

Definition at line 67 of file AWT_TreeAwars.cxx.

Function Documentation

bool operator< ( const BoundTreeAwarCallbackPtr bc1,
const BoundTreeAwarCallbackPtr bc2 

Definition at line 63 of file AWT_TreeAwars.cxx.

static void destroy_TreeAwarRegistry ( )

Definition at line 88 of file AWT_TreeAwars.cxx.

References SmartPtr< T, C >::setNull().

Referenced by TreeAwarRegistry::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)

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 void null_cb ( )

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().

static void announce_renamed ( const char oldname,
const char newname 
void AWT_announce_tree_renamed ( const char oldname,
const char newname 

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().