BRL-CAD
comb.c File Reference
#include "common.h"
#include <string.h>
#include "bu/cmd.h"
#include "bu/getopt.h"
#include "bu/sort.h"
#include "wdb.h"
#include "./ged_private.h"
Include dependency graph for comb.c:

Go to the source code of this file.

Functions

HIDDEN int region_flag_set (struct ged *gedp, struct directory *dp)
 
HIDDEN int region_flag_clear (struct ged *gedp, struct directory *dp)
 
HIDDEN int color_shader_clear (struct ged *gedp, struct directory *dp)
 
HIDDEN int comb_tree_clear (struct ged *gedp, struct directory *dp)
 
HIDDEN int comb_wrap (struct ged *gedp, struct directory *dp)
 
HIDDEN int name_compare (const void *d1, const void *d2, void *arg)
 
HIDDEN int comb_flatten (struct ged *gedp, struct directory *dp)
 
HIDDEN int comb_lift_region (struct ged *gedp, struct directory *dp)
 
int ged_comb (struct ged *gedp, int argc, const char *argv[])
 
struct directory_ged_combadd (struct ged *gedp, struct directory *objp, char *combname, int region_flag, db_op_t relation, int ident, int air)
 
int _ged_combadd2 (struct ged *gedp, char *combname, int argc, const char *argv[], int region_flag, db_op_t relation, int ident, int air)
 

Detailed Description

The comb command.

Definition in file comb.c.

Function Documentation

HIDDEN int region_flag_set ( struct ged gedp,
struct directory dp 
)

Definition at line 38 of file comb.c.

References bu_avs_add(), bu_avs_free(), bu_avs_init_empty(), bu_vls_printf(), directory::d_flags, directory::d_namep, db5_get_attributes(), db5_standardize_avs(), db5_update_attributes(), rt_wdb::dbip, GED_ERROR, GED_OK, ged::ged_result_str, ged::ged_wdbp, and RT_DIR_REGION.

Referenced by comb_lift_region(), and ged_comb().

Here is the call graph for this function:

HIDDEN int region_flag_clear ( struct ged gedp,
struct directory dp 
)

Definition at line 58 of file comb.c.

References bu_avs_free(), bu_avs_init_empty(), bu_avs_remove(), bu_vls_printf(), directory::d_flags, directory::d_namep, db5_get_attributes(), db5_replace_attributes(), db5_standardize_avs(), rt_wdb::dbip, GED_ERROR, GED_OK, ged::ged_result_str, ged::ged_wdbp, and RT_DIR_REGION.

Referenced by comb_lift_region(), comb_wrap(), and ged_comb().

Here is the call graph for this function:

HIDDEN int color_shader_clear ( struct ged gedp,
struct directory dp 
)

Definition at line 78 of file comb.c.

References bu_avs_free(), bu_avs_init_empty(), bu_avs_remove(), bu_vls_printf(), directory::d_namep, db5_get_attributes(), db5_replace_attributes(), db5_standardize_avs(), rt_wdb::dbip, GED_ERROR, GED_OK, ged::ged_result_str, and ged::ged_wdbp.

Referenced by comb_wrap().

Here is the call graph for this function:

HIDDEN int comb_tree_clear ( struct ged gedp,
struct directory dp 
)

Definition at line 100 of file comb.c.

References bu_vls_printf(), directory::d_namep, db5_standardize_avs(), db5_sync_comb_to_attr(), db_free_tree(), GED_DB_GET_INTERNAL, GED_ERROR, GED_OK, ged::ged_result_str, ged::ged_wdbp, RT_CK_COMB, RT_CK_DB_INTERNAL, rt_db_free_internal(), rt_uniresource, rt_comb_internal::tree, TREE_NULL, and wdb_put_internal().

Referenced by comb_flatten(), and comb_wrap().

Here is the call graph for this function:

HIDDEN int comb_wrap ( struct ged gedp,
struct directory dp 
)
HIDDEN int name_compare ( const void *  d1,
const void *  d2,
void *  arg 
)

Definition at line 208 of file comb.c.

References bu_strcmp(), and directory::d_namep.

Referenced by comb_flatten().

Here is the call graph for this function:

HIDDEN int comb_flatten ( struct ged gedp,
struct directory dp 
)
int ged_comb ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Create or extend combination w/booleans.

Definition at line 466 of file comb.c.

References _ged_combadd(), bu_getopt(), bu_optind, bu_vls_printf(), bu_vls_trunc(), comb_flatten(), comb_lift_region(), comb_wrap(), directory::d_flags, directory::d_namep, db_lookup(), DB_OP_NULL, db_str2op(), rt_wdb::dbip, GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_CHECK_READ_ONLY, GED_ERROR, GED_HELP, GED_OK, ged::ged_result_str, ged::ged_wdbp, LOOKUP_NOISY, LOOKUP_QUIET, region_flag_clear(), region_flag_set(), RT_DIR_COMB, RT_DIR_NULL, and usage().

Here is the call graph for this function:

struct directory* _ged_combadd ( struct ged gedp,
struct directory objp,
char *  combname,
int  region_flag,
db_op_t  relation,
int  ident,
int  air 
)

Definition at line 680 of file comb.c.

References _ged_combadd2(), directory::d_namep, db_lookup(), rt_wdb::dbip, GED_ERROR, ged::ged_wdbp, LOOKUP_QUIET, and RT_DIR_NULL.

Referenced by comb_flatten(), comb_wrap(), ged_comb(), ged_instance(), ged_region(), and ged_sphgroup().

Here is the call graph for this function:

int _ged_combadd2 ( struct ged gedp,
char *  combname,
int  argc,
const char *  argv[],
int  region_flag,
db_op_t  relation,
int  ident,
int  air 
)