Multiply Represented Objects
[libbu (utility functions)]

Collaboration diagram for Multiply Represented Objects:


Files

file  mro.c
 The Multiply Represented Object package.

Data Structures

struct  bu_mro

Defines

#define BU_MRO_MAGIC   0x4D524F4F
#define BU_CK_MRO(_vp)   BU_CKMAG(_vp, BU_MRO_MAGIC, "bu_mro")
#define BU_MRO_INVALIDATE(_p)
#define BU_MRO_GETDOUBLE(_p)
#define BU_MRO_GETLONG(_p)
#define BU_MRO_GETSTRING(_p)   bu_vls_addr( &_p->string_rep )
#define BU_MRO_STRLEN(_p)   bu_vls_strlen( &_p->string_rep )

Functions

void bu_mro_init (struct bu_mro *mrop)
void bu_mro_free (struct bu_mro *mrop)
void bu_mro_set (struct bu_mro *mrop, const char *string)
void bu_mro_init_with_string (struct bu_mro *mrop, const char *string)

Define Documentation

#define BU_MRO_MAGIC   0x4D524F4F
 

Definition at line 1222 of file bu.h.

Referenced by bu_mro_init(), and bu_mro_init_with_string().

#define BU_CK_MRO _vp   )     BU_CKMAG(_vp, BU_MRO_MAGIC, "bu_mro")
 

Definition at line 1223 of file bu.h.

Referenced by bu_mro_free(), and bu_mro_set().

#define BU_MRO_INVALIDATE _p   ) 
 

Value:

{\
        _p->long_rep_is_valid = '\0';\
        _p->double_rep_is_valid = '\0';\
}

Definition at line 1225 of file bu.h.

Referenced by bu_mro_free(), bu_mro_init(), bu_mro_init_with_string(), and bu_mro_set().

#define BU_MRO_GETDOUBLE _p   ) 
 

Value:

( _p->double_rep_is_valid ? _p->double_rep : \
        (_p->double_rep = strtod( bu_vls_addr( &_p->string_rep ), NULL ), \
        ( _p->double_rep_is_valid='y', _p->double_rep ) ) )

Definition at line 1230 of file bu.h.

#define BU_MRO_GETLONG _p   ) 
 

Value:

( _p->long_rep_is_valid ? _p->long_rep : \
        (_p->long_rep = strtol( bu_vls_addr( &_p->string_rep ), NULL, 10 ), \
        ( _p->long_rep_is_valid='y', _p->long_rep ) ) )

Definition at line 1234 of file bu.h.

#define BU_MRO_GETSTRING _p   )     bu_vls_addr( &_p->string_rep )
 

Definition at line 1238 of file bu.h.

#define BU_MRO_STRLEN _p   )     bu_vls_strlen( &_p->string_rep )
 

Definition at line 1240 of file bu.h.


Function Documentation

void bu_mro_init struct bu_mro mrop  ) 
 

Definition at line 65 of file mro.c.

References BU_MRO_INVALIDATE, BU_MRO_MAGIC, bu_vls_init(), bu_mro::magic, and bu_mro::string_rep.

Referenced by rt_load_attrs().

Here is the call graph for this function:

void bu_mro_free struct bu_mro mrop  ) 
 

Definition at line 77 of file mro.c.

References BU_CK_MRO, BU_MRO_INVALIDATE, bu_vls_free(), and bu_mro::string_rep.

Referenced by rt_clean(), rt_del_regtree(), and rt_load_attrs().

Here is the call graph for this function:

void bu_mro_set struct bu_mro mrop,
const char *  string
 

Definition at line 90 of file mro.c.

References BU_CK_MRO, BU_MRO_INVALIDATE, bu_vls_strcpy(), bu_vls_trunc(), and bu_mro::string_rep.

Here is the call graph for this function:

void bu_mro_init_with_string struct bu_mro mrop,
const char *  string
 

Definition at line 104 of file mro.c.

References BU_MRO_INVALIDATE, BU_MRO_MAGIC, bu_vls_init(), bu_vls_strcpy(), bu_mro::magic, and bu_mro::string_rep.

Referenced by rt_gettree_region_end().

Here is the call graph for this function:


Generated on Mon Sep 18 01:25:20 2006 for BRL-CAD by  doxygen 1.4.6