BRL-CAD

Routines for implementing the observer pattern. More...

#include "common.h"
#include <string.h>
#include "bu/cmd.h"
#include "bu/malloc.h"
#include "bu/str.h"
#include "bu/bu_tcl.h"
Include dependency graph for observer.c:

Go to the source code of this file.

Functions

HIDDEN int observer_attach (void *clientData, int argc, const char **argv)
 
HIDDEN int observer_detach (void *clientData, int argc, const char **argv)
 
HIDDEN int observer_show (void *clientData, int argc, const char **argv)
 
void bu_observer_notify (Tcl_Interp *interp, struct bu_observer *headp, char *self)
 
void bu_observer_free (struct bu_observer *headp)
 
int bu_observer_cmd (void *clientData, int argc, const char **argv)
 

Detailed Description

Routines for implementing the observer pattern.

Definition in file observer.c.

Function Documentation

HIDDEN int observer_attach ( void *  clientData,
int  argc,
const char **  argv 
)

Attach observer.

Usage: attach observer [cmd]

Definition at line 38 of file observer.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_GET, BU_LIST_APPEND, BU_LIST_FOR, bu_log(), BU_STR_EQUAL, bu_vls_addr(), bu_vls_init(), bu_vls_strcpy(), bu_observer::cmd, bu_observer::l, and bu_observer::observer.

Here is the call graph for this function:

HIDDEN int observer_detach ( void *  clientData,
int  argc,
const char **  argv 
)

Detach observer.

Usage: detach observer

Definition at line 87 of file observer.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_LIST_DEQUEUE, BU_LIST_FOR, bu_log(), BU_PUT, BU_STR_EQUAL, bu_vls_addr(), bu_vls_free(), bu_observer::cmd, bu_observer::l, and bu_observer::observer.

Here is the call graph for this function:

HIDDEN int observer_show ( void *  clientData,
int  argc,
const char **  argv 
)

Show/list observers.

Usage: show

Definition at line 121 of file observer.c.

References BRLCAD_ERROR, BRLCAD_OK, BU_LIST_FOR, bu_log(), bu_vls_addr(), bu_observer::cmd, bu_observer::l, and bu_observer::observer.

Here is the call graph for this function:

int bu_observer_cmd ( void *  clientData,
int  argc,
const char **  argv 
)

Definition at line 192 of file observer.c.

References BRLCAD_ERROR, BRLCAD_OK, bu_cmd(), and bu_log().

Here is the call graph for this function: