Collaboration diagram for Database5:
![]() |
|
|
|
|
|
Definition at line 70 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), db5_header_is_valid(), db5_make_free_object(), and db5_make_free_object_hdr(). |
|
Definition at line 71 of file db5.h. Referenced by db5_export_object3(), db5_get_raw_internal_fp(), db5_get_raw_internal_ptr(), db5_header_is_valid(), db5_make_free_object(), and db5_write_free(). |
|
Definition at line 74 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 75 of file db5.h. Referenced by db5_fwrite_ident(), db5_update_ident(), db_create_inmem(), and db_wrap_v5_external(). |
|
Definition at line 76 of file db5.h. Referenced by db5_diradd_handler(), db5_fwrite_ident(), db5_header_is_valid(), db_create_inmem(), and wdb_dir_check5(). |
|
Definition at line 77 of file db5.h. Referenced by db5_diradd_handler(), db5_make_free_object(), db5_make_free_object_hdr(), and wdb_dir_check5(). |
|
Definition at line 78 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), db5_fwrite_ident(), db5_update_ident(), and db_create_inmem(). |
|
Definition at line 79 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 80 of file db5.h. Referenced by db5_crack_disk_header(), and db5_header_is_valid(). |
|
Definition at line 81 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), db5_header_is_valid(), db5_make_free_object(), and db5_make_free_object_hdr(). |
|
Definition at line 82 of file db5.h. Referenced by db5_crack_disk_header(). |
|
Definition at line 83 of file db5.h. Referenced by db5_crack_disk_header(), and db5_export_object3(). |
|
Definition at line 85 of file db5.h. Referenced by db5_decode_length(), db5_decode_signed(), db5_encode_length(), db5_get_raw_internal_fp(), db5_header_is_valid(), and db5_select_length_encoding(). |
|
Definition at line 86 of file db5.h. Referenced by db5_decode_length(), db5_decode_signed(), db5_encode_length(), db5_get_raw_internal_fp(), and db5_select_length_encoding(). |
|
Definition at line 87 of file db5.h. Referenced by db5_decode_length(), db5_decode_signed(), db5_encode_length(), db5_get_raw_internal_fp(), and db5_select_length_encoding(). |
|
Definition at line 88 of file db5.h. Referenced by db5_decode_length(), db5_decode_signed(), db5_encode_length(), db5_get_raw_internal_fp(), and db5_select_length_encoding(). |
|
Definition at line 91 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 92 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 93 of file db5.h. Referenced by db5_crack_disk_header(), and db5_header_is_valid(). |
|
Definition at line 94 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 97 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 98 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 99 of file db5.h. Referenced by db5_crack_disk_header(), and db5_header_is_valid(). |
|
Definition at line 100 of file db5.h. Referenced by db5_crack_disk_header(), db5_export_object3(), and db5_header_is_valid(). |
|
Definition at line 111 of file db5.h. Referenced by db5_fwrite_ident(), db5_put_color_table(), db5_update_ident(), db_create_inmem(), and db_dirbuild(). |
|
Definition at line 114 of file db5.h. Referenced by db5_fwrite_ident(), db5_header_is_valid(), db5_update_ident(), and db_create_inmem(). |
|
|
|
|
|
Definition at line 120 of file db5.h. Referenced by db5_fwrite_ident(), db5_header_is_valid(), db5_type_codes_from_descrip(), db5_type_codes_from_tag(), db5_type_descrip_from_codes(), db5_type_descrip_from_major(), db5_type_tag_from_codes(), db5_type_tag_from_major(), and db_create_inmem(). |
|
|
Definition at line 122 of file db5.h. Referenced by db5_diradd(), db5_fwrite_ident(), db5_update_ident(), db_create_inmem(), db_diradd5(), db_dirbuild(), wdb_concat_cmd(), wdb_dir_check5(), wdb_do_list(), and wdb_vls_long_dpp(). |
|
Definition at line 123 of file db5.h. Referenced by wdb_binary_cmd(). |
|
Definition at line 124 of file db5.h. Referenced by db5_diradd(), db_diradd5(), rt_bin_import5(), and wdb_vls_long_dpp(). |
|
Definition at line 125 of file db5.h. Referenced by db5_diradd(), db_diradd5(), rt_bin_import5(), rt_binunif_import5(), rt_binunif_make(), rt_db_external5_to_internal5(), rt_mk_binunif(), rt_retrieve_binunif(), wdb_binary_cmd(), and wdb_vls_long_dpp(). |
|
Definition at line 126 of file db5.h. Referenced by db5_diradd(), db_diradd5(), rt_bin_import5(), and wdb_vls_long_dpp(). |
|
|
|
Definition at line 133 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 134 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 135 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 136 of file db5.h. Referenced by wdb_get_type_cmd(), wdb_move_arb_edge_cmd(), wdb_move_arb_face_cmd(), and wdb_rotate_arb_face_cmd(). |
|
Definition at line 137 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 138 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 139 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 140 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 141 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 142 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 143 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 144 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 145 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 146 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 147 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 148 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 149 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 150 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 151 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 152 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 153 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 154 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 155 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 156 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 157 of file db5.h. Referenced by wdb_get_type_cmd(), and wdb_node_write(). |
|
Definition at line 158 of file db5.h. Referenced by wdb_get_type_cmd(), and wdb_move_all_cmd(). |
|
Definition at line 159 of file db5.h. Referenced by db_update_nref(), wdb_get_type_cmd(), wdb_move_all_cmd(), and wdb_node_write(). |
|
Definition at line 160 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 161 of file db5.h. Referenced by wdb_get_type_cmd(). |
|
Definition at line 162 of file db5.h. Referenced by wdb_bot_decimate_cmd(), and wdb_get_type_cmd(). |
|
Definition at line 163 of file db5.h. Referenced by db_flags_raw_internal(), and wdb_get_type_cmd(). |
|
|
|
|
|
Definition at line 168 of file db5.h. Referenced by rt_binunif_describe(). |
|
|
|
Definition at line 170 of file db5.h. Referenced by rt_binunif_describe(). |
|
Definition at line 171 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 172 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 173 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 174 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 175 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 176 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 177 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_binunif_make(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 178 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 179 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_import5(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 180 of file db5.h. Referenced by db5_type_sizeof_h_binu(), db5_type_sizeof_n_binu(), rt_binunif_describe(), rt_binunif_export5(), rt_binunif_tcladjust(), rt_retrieve_binunif(), and wdb_binary_cmd(). |
|
Definition at line 212 of file db5.h. Referenced by db5_scan(). |
|
Definition at line 213 of file db5.h. Referenced by wdb_dir_check5(). |
|
D B 5 _ E N C O D E _ L E N G T H Given a value and a variable-width format spec, store it in network order (XDR). Returns - pointer to next available byte. Definition at line 215 of file db5_io.c. References bu_bomb(), bu_plong(), bu_pshort(), DB5HDR_WIDTHCODE_16BIT, DB5HDR_WIDTHCODE_32BIT, DB5HDR_WIDTHCODE_64BIT, and DB5HDR_WIDTHCODE_8BIT. Referenced by db5_export_object3(), db5_make_free_object(), db5_make_free_object_hdr(), rt_comb_export5(), and rt_comb_v5_serialize(). Here is the call graph for this function: ![]() |
|
D B 5 _ G E T _ R A W _ I N T E R N A L _ P T R Returns - on success, pointer to first unused byte NULL, on error Definition at line 309 of file db5_io.c. References db5_raw_internal::a_present, db5_raw_internal::a_width, db5_raw_internal::attributes, db5_raw_internal::b_present, db5_raw_internal::b_width, db5_raw_internal::body, BU_INIT_EXTERNAL, bu_log(), db5_raw_internal::buf, db5_crack_disk_header(), db5_decode_length(), DB5HDR_MAGIC2, bu_external::ext_buf, bu_external::ext_nbytes, db5_raw_internal::h_name_present, db5_raw_internal::h_name_width, db5_raw_internal::h_object_width, db5_raw_internal::name, NULL, and db5_raw_internal::object_length. Referenced by db5_get_attributes(), db5_replace_attributes(), db5_scan(), db5_update_attributes(), db_dirbuild(), db_wrap_v5_external(), rt_db_external5_to_internal5(), and rt_retrieve_binunif(). Here is the call graph for this function: ![]() |
|
D B 5 _ W R I T E _ F R E E Create a v5 database "free" object of the specified size, and place it at the indicated location in the database. There are two interesting cases:
Definition at line 76 of file db5_alloc.c. References bcopy, bu_free_external(), BU_INIT_EXTERNAL, directory::d_flags, directory::d_un, db5_make_free_object(), db5_make_free_object_hdr(), DB5HDR_MAGIC2, db_write(), bu_external::ext_buf, bu_external::ext_nbytes, directory::ptr, RT_CK_DBI, RT_CK_DIR, and RT_DIR_INMEM. Referenced by db5_realloc(), and db_delete(). Here is the call graph for this function: ![]() |
|
D B 5 _ R E A L L O C Change the size of a v5 database object. If the object is getting smaller, break it into two pieces, and write out free objects for both. The caller is expected to re-write new data on the first one. If the object is getting larger, seek a suitable "hole" large enough to hold it, throwing back any surplus, properly marked. If the object is getting larger and there is no suitable "hole" in the database, extend the file, write a free object in the new space, and write a free object in the old space. There is no point to trying to extend in place, that would require two searches through the memory map, and doesn't save any disk I/O. Returns - 0 OK -1 Failure Definition at line 154 of file db5_alloc.c. References BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_log(), bu_malloc(), bu_realloc(), directory::d_flags, directory::d_len, directory::d_namep, directory::d_un, db5_write_free(), db_i::dbi_eof, db_i::dbi_freep, db_i::dbi_read_only, DEBUG_DB, bu_external::ext_nbytes, mem_map::m_addr, mem_map::m_size, MAP_NULL, directory::ptr, RT_CK_DBI, RT_CK_DIR, RT_DIR_INMEM, RT_G_DEBUG, rt_memalloc_nosplit(), and rt_memfree(). Referenced by db_put_external5(), and rt_db_put_internal5(). Here is the call graph for this function: ![]() |
|
D B 5 _ H E A D E R _ I S _ V A L I D Verify that this is a valid header for a BRL-CAD v5 database. Returns - 0 Not valid v5 header 1 Valid v5 header Definition at line 79 of file db5_io.c. References DB5_MAJORTYPE_RESERVED, DB5_ZZZ_UNCOMPRESSED, db5_ondisk_header::db5h_aflags, db5_ondisk_header::db5h_bflags, db5_ondisk_header::db5h_hflags, db5_ondisk_header::db5h_magic1, db5_ondisk_header::db5h_major_type, db5_ondisk_header::db5h_minor_type, DB5HDR_AFLAGS_PRESENT, DB5HDR_AFLAGS_WIDTH_MASK, DB5HDR_AFLAGS_WIDTH_SHIFT, DB5HDR_AFLAGS_ZZZ_MASK, DB5HDR_BFLAGS_PRESENT, DB5HDR_BFLAGS_WIDTH_MASK, DB5HDR_BFLAGS_WIDTH_SHIFT, DB5HDR_BFLAGS_ZZZ_MASK, DB5HDR_HFLAGS_DLI_HEADER_OBJECT, DB5HDR_HFLAGS_DLI_MASK, DB5HDR_HFLAGS_NAME_PRESENT, DB5HDR_HFLAGS_OBJECT_WIDTH_MASK, DB5HDR_HFLAGS_OBJECT_WIDTH_SHIFT, DB5HDR_MAGIC1, DB5HDR_MAGIC2, and DB5HDR_WIDTHCODE_8BIT. Referenced by db5_scan(), db_dirbuild(), and db_get_version(). |
|
D B 5 _ S E L E C T _ L E N G T H _ E N C O D I N G Given a number to encode, decide which is the smallest encoding format which will contain it. Definition at line 122 of file db5_io.c. References DB5HDR_WIDTHCODE_16BIT, DB5HDR_WIDTHCODE_32BIT, DB5HDR_WIDTHCODE_64BIT, and DB5HDR_WIDTHCODE_8BIT. |
|
D B 5 _ D E C O D E _ L E N G T H Given a variable-width length field in network order (XDR), store it in *lenp. This routine processes unsigned values. Returns - The number of bytes of input that were decoded. Definition at line 142 of file db5_io.c. References bu_bomb(), BU_GLONG, BU_GLONGLONG, BU_GSHORT, DB5HDR_WIDTHCODE_16BIT, DB5HDR_WIDTHCODE_32BIT, DB5HDR_WIDTHCODE_64BIT, and DB5HDR_WIDTHCODE_8BIT. Here is the call graph for this function: ![]() |
|
D B 5 _ D E C O D E _ S I G N E D Given a variable-width length field in network order (XDR), store it in *lenp. This routine processes signed values. Returns - The number of bytes of input that were decoded. Definition at line 179 of file db5_io.c. References bu_bomb(), BU_GLONG, BU_GLONGLONG, BU_GSHORT, DB5HDR_WIDTHCODE_16BIT, DB5HDR_WIDTHCODE_32BIT, DB5HDR_WIDTHCODE_64BIT, and DB5HDR_WIDTHCODE_8BIT. Here is the call graph for this function: ![]() |
|
|
D B 5 _ G E T _ R A W _ I N T E R N A L _ F P Returns - 0 on success -1 on EOF -2 on error Definition at line 374 of file db5_io.c. References db5_raw_internal::a_present, db5_raw_internal::a_width, db5_raw_internal::attributes, db5_raw_internal::b_present, db5_raw_internal::b_width, bcopy, db5_raw_internal::body, BU_ASSERT_LONG, BU_INIT_EXTERNAL, bu_log(), bu_malloc(), db5_raw_internal::buf, db5_crack_disk_header(), db5_decode_length(), DB5HDR_MAGIC2, DB5HDR_WIDTHCODE_16BIT, DB5HDR_WIDTHCODE_32BIT, DB5HDR_WIDTHCODE_64BIT, DB5HDR_WIDTHCODE_8BIT, bu_external::ext_buf, bu_external::ext_nbytes, db5_raw_internal::h_name_present, db5_raw_internal::h_name_width, db5_raw_internal::h_object_width, db5_raw_internal::name, and db5_raw_internal::object_length. Referenced by db5_scan(). Here is the call graph for this function: ![]() |
|
|
D B 5 _ M A K E _ F R E E _ O B J E C T _ H D R Make only the front (header) portion of a free object. This is used when operating on very large contiguous free objects in the database (e.g. 50 MBytes). Definition at line 639 of file db5_io.c. References BU_ASSERT_LONG, bu_calloc(), BU_CK_EXTERNAL, db5_encode_length(), db5_select_length_encoding(), db5_ondisk_header::db5h_hflags, db5_ondisk_header::db5h_magic1, DB5HDR_HFLAGS_DLI_FREE_STORAGE, DB5HDR_HFLAGS_OBJECT_WIDTH_SHIFT, DB5HDR_MAGIC1, bu_external::ext_buf, and bu_external::ext_nbytes. Referenced by db5_write_free(). Here is the call graph for this function: ![]() |
|
D B 5 _ M A K E _ F R E E _ O B J E C T Make a complete, zero-filled, free object. Note that free objects can sometimes get quite large. Definition at line 674 of file db5_io.c. References BU_ASSERT_LONG, bu_calloc(), BU_CK_EXTERNAL, db5_encode_length(), db5_select_length_encoding(), db5_ondisk_header::db5h_hflags, db5_ondisk_header::db5h_magic1, DB5HDR_HFLAGS_DLI_FREE_STORAGE, DB5HDR_HFLAGS_OBJECT_WIDTH_SHIFT, DB5HDR_MAGIC1, DB5HDR_MAGIC2, bu_external::ext_buf, and bu_external::ext_nbytes. Referenced by db5_write_free(). Here is the call graph for this function: ![]() |
|
D B 5 _ I M P O R T _ A T T R I B U T E S Convert the on-disk encoding into a handy easy-to-use bu_attribute_value_set structure. Take advantage of the readonly_min/readonly_max capability so that we don't have to bu_strdup() each string, but can simply point to it in the provided buffer *ap. Important implication: don't free *ap until you're done with this avs. The upshot of this is that bu_avs_add() and bu_avs_remove() can be safely used with this *avs. Returns - >0 count of attributes successfully imported -1 Error, mal-formed input Definition at line 722 of file db5_io.c. References bu_attribute_value_set::avp, BU_ASSERT_LONG, BU_ASSERT_PTR, bu_avs_add(), bu_avs_init(), bu_avs_print(), BU_CK_EXTERNAL, bu_debug, BU_DEBUG_AVS, bu_log(), bu_attribute_value_set::count, bu_external::ext_buf, bu_external::ext_nbytes, bu_attribute_value_set::max, bu_attribute_value_pair::name, name, bu_attribute_value_set::readonly_max, bu_attribute_value_set::readonly_min, and bu_attribute_value_pair::value. Referenced by db5_diradd(), db5_get_attributes(), db5_update_attributes(), db_dirbuild(), db_flags_raw_internal(), and rt_db_external5_to_internal5(). Here is the call graph for this function: ![]() |
|
D B 5 _ E X P O R T _ A T T R I B U T E S Encode the attribute-value pair information into the external on-disk format. The on-disk encoding is: aname1 NULL value1 NULL ... anameN NULL valueN NULL NULL 'ext' is initialized on behalf of the caller. Definition at line 820 of file db5_io.c. References bu_attribute_value_set::avp, bu_avs_print(), BU_CK_AVS, bu_debug, BU_DEBUG_AVS, BU_INIT_EXTERNAL, bu_attribute_value_set::count, bu_attribute_value_pair::name, and bu_attribute_value_pair::value. Referenced by db5_fwrite_ident(), db5_replace_attributes(), db5_update_attributes(), and db_create_inmem(). Here is the call graph for this function: ![]() |
|
D B 5 _ R E P L A C E _ A T T R I B U T E S Replace the attributes of a given database object. For efficiency, this is done without looking at the object body at all. Contents of the bu_attribute_value_set are freed, but not the struct itself. Returns - 0 on success <0 on error Definition at line 876 of file db5_io.c. References db5_raw_internal::a_zzz, db5_raw_internal::b_zzz, db5_raw_internal::body, BU_ASSERT_LONG, bu_avs_free(), bu_avs_print(), BU_CK_AVS, bu_free_external(), BU_INIT_EXTERNAL, bu_log(), directory::d_namep, db5_export_attributes(), db5_export_object3(), db5_get_raw_internal_ptr(), db_get_external(), db_put_external5(), db_i::dbi_filename, db_i::dbi_read_only, db_i::dbi_version, DEBUG_DB, bu_external::ext_buf, db5_raw_internal::h_dli, db5_raw_internal::h_name_hidden, db5_raw_internal::major_type, db5_raw_internal::minor_type, NULL, RT_CK_DBI, RT_CK_DIR, and RT_G_DEBUG. Here is the call graph for this function: ![]() |
|
|
D B 5 _ U P D A T E _ A T T R I B U T E A convenience routine to update the value of a single attribute. Returns - 0 on success <0 on error Definition at line 1033 of file db5_io.c. References bu_avs_add(), bu_avs_init(), db5_update_attributes(), db_lookup(), DIR_NULL, LOOKUP_NOISY, and RT_CK_DBI. Referenced by db5_put_color_table(), and wdb_color_cmd(). Here is the call graph for this function: ![]() |
|
D B 5 _ U P D A T E _ I D E N T Update the _GLOBAL object, which in v5 serves the place of the "ident" header record in v4 as the place to stash global information. Since every database will have one of these things, it's no problem to update it. Returns - 0 Success -1 Fatal Error Definition at line 1060 of file db5_io.c. References bu_avs_add(), bu_avs_init(), bu_free(), bu_free_external(), bu_log(), bu_strdup, bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), directory::d_major_type, db5_export_object3(), DB5_GLOBAL_OBJECT_NAME, DB5_MAJORTYPE_ATTRIBUTE_ONLY, db5_update_attributes(), DB5_ZZZ_UNCOMPRESSED, DB5HDR_HFLAGS_DLI_APPLICATION_DATA_OBJECT, DB5HDR_HFLAGS_HIDDEN_OBJECT, db_diradd(), db_lookup(), db_put_external(), db_i::dbi_title, DIR_NULL, LOOKUP_QUIET, NULL, RT_CK_DBI, and units. Referenced by db_dirbuild(), and db_update_ident(). Here is the call graph for this function: ![]() |
|
D B 5 _ F W R I T E _ I D E N T Create a header for a v5 database. This routine has the same calling sequence as db_fwrite_ident() which makes a v4 database header. In the v5 database, two database objects must be created to match the semantics of what was in the v4 header: First, a database header object. Second, create a specially named attribute-only object which contains the attributes "title=" and "units=". This routine should only be used by db_create(). Everyone else should use db5_update_ident(). Returns - 0 Success -1 Fatal Error Definition at line 1140 of file db5_io.c. References bu_avs_add(), bu_avs_free(), bu_avs_init(), bu_free_external(), bu_fwrite_external(), bu_log(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), db5_export_attributes(), db5_export_object3(), DB5_GLOBAL_OBJECT_NAME, DB5_MAJORTYPE_ATTRIBUTE_ONLY, DB5_MAJORTYPE_RESERVED, DB5_ZZZ_UNCOMPRESSED, DB5HDR_HFLAGS_DLI_APPLICATION_DATA_OBJECT, DB5HDR_HFLAGS_DLI_HEADER_OBJECT, DB5HDR_HFLAGS_HIDDEN_OBJECT, NULL, and units. Referenced by db_create(). Here is the call graph for this function: ![]() |
|
R T _ D B _ C V T _ T O _ E X T E R N A L 5 The attributes are taken from ip->idb_avs If present, convert attributes to on-disk format. This must happen after exporting the body, in case the ft_export5() method happened to extend the attribute set. Combinations are one "solid" which does this. The internal representation is NOT freed, that's the caller's job. The 'ext' pointer is accepted in uninitialized form, and an initialized structure is always returned, so that the caller may free it even when an error return is given. Returns - 0 OK -1 FAIL Definition at line 1213 of file db5_io.c. References body, bu_free_external(), BU_INIT_EXTERNAL, bu_log(), rt_db_internal::idb_meth, RT_CK_DB_INTERNAL, RT_CK_DBI, and RT_CK_RESOURCE. Referenced by nmg_stash_model_to_file(), rt_db_put_internal5(), and wdb_put_internal(). Here is the call graph for this function: ![]() |
|
Definition at line 1268 of file db5_io.c. References db5_raw_internal::a_zzz, db5_raw_internal::attributes, db5_raw_internal::b_zzz, db5_raw_internal::body, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_free_external(), BU_INIT_EXTERNAL, bu_log(), db5_export_object3(), db5_get_raw_internal_ptr(), DB5HDR_HFLAGS_DLI_APPLICATION_DATA_OBJECT, bu_external::ext_buf, db5_raw_internal::h_dli, db5_raw_internal::h_name_hidden, db5_raw_internal::major_type, db5_raw_internal::minor_type, db5_raw_internal::name, and NULL. Referenced by db_put_external5(), and wdb_export_external(). Here is the call graph for this function: ![]() |
|
D B _ P U T _ E X T E R N A L 5 Given that caller already has an external representation of the database object, update it to have a new name (taken from dp->d_namep) in that external representation, and write the new object into the database, obtaining different storage if the size has changed. Changing the name on a v5 object is a relatively expensive operation. Caller is responsible for freeing memory of external representation, using bu_free_external(). This routine is used to efficiently support MGED's "cp" and "keep" commands, which don't need to import and decompress objects just to rename and copy them. Returns - -1 error 0 success Definition at line 1334 of file db5_io.c. References bcopy, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_log(), directory::d_flags, directory::d_len, directory::d_namep, directory::d_un, db5_realloc(), db_wrap_v5_external(), db_write(), db_i::dbi_filename, db_i::dbi_read_only, db_i::dbi_version, DEBUG_DB, bu_external::ext_buf, bu_external::ext_nbytes, directory::ptr, RT_CK_DBI, RT_CK_DIR, RT_DIR_INMEM, and RT_G_DEBUG. Referenced by db5_replace_attributes(), db5_update_attributes(), and db_put_external(). Here is the call graph for this function: ![]() |
|
R T _ D B _ P U T _ I N T E R N A L 5 Convert the internal representation of a solid to the external one, and write it into the database. Applications and middleware shouldn't call this directly, they should use the version-generic interface "rt_db_put_internal()". The internal representation is always freed. (Not the pointer, just the contents). Returns - <0 error 0 success Definition at line 1395 of file db5_io.c. References bcopy, BU_ASSERT_LONG, BU_CK_EXTERNAL, bu_free_external(), bu_log(), directory::d_flags, directory::d_len, directory::d_namep, directory::d_un, db5_realloc(), db_write(), db_i::dbi_version, bu_external::ext_buf, bu_external::ext_nbytes, directory::ptr, RT_CK_DB_INTERNAL, RT_CK_DBI, RT_CK_DIR, RT_CK_RESOURCE, rt_db_cvt_to_external5(), rt_db_free_internal(), and RT_DIR_INMEM. Referenced by rt_db_put_internal(). Here is the call graph for this function: ![]() |
|
R T _ D B _ E X T E R N A L 5 _ T O _ I N T E R N A L 5 Given an object in external form, convert it to internal form. The caller is responsible for freeing the external form. Returns - <0 On error id On success. Definition at line 1456 of file db5_io.c. References db5_raw_internal::attributes, bn_mat_identity, db5_raw_internal::body, BU_ASSERT_LONG, bu_avs_init_empty(), BU_AVS_MAGIC, BU_CK_EXTERNAL, bu_log(), db5_get_raw_internal_ptr(), db5_import_attributes(), DB5_MAJORTYPE_BINARY_UNIF, DB5_MAJORTYPE_BRLCAD, db_i::dbi_version, bu_external::ext_buf, ID_BINUNIF, rt_db_internal::idb_avs, bu_attribute_value_set::magic, db5_raw_internal::major_type, db5_raw_internal::minor_type, NULL, RT_CK_DB_INTERNAL, RT_CK_DBI, and rt_db_free_internal(). Referenced by rt_db_get_internal5(). Here is the call graph for this function: ![]() |
|
R T _ D B _ G E T _ I N T E R N A L 5 Get an object from the database, and convert it into it's internal representation. Applications and middleware shouldn't call this directly, they should use the generic interface "rt_db_get_internal()". Returns - <0 On error id On success. Definition at line 1553 of file db5_io.c. References BU_ASSERT_LONG, bu_free_external(), BU_INIT_EXTERNAL, directory::d_namep, db_get_external(), db_i::dbi_version, rt_db_external5_to_internal5(), and RT_INIT_DB_INTERNAL. Referenced by db_functree(), db_preorder_traverse(), rt_db_get_internal(), and rt_retrieve_binunif(). Here is the call graph for this function: ![]() |
|
Definition at line 1580 of file db5_io.c. References BU_CK_VLS, bu_vls_printf(), MATER_NULL, mater::mt_b, mater::mt_forw, mater::mt_g, mater::mt_high, mater::mt_low, mater::mt_r, RT_CK_DBI, and rt_material_head. Referenced by db5_put_color_table(). Here is the call graph for this function: ![]() |
|
D B 5 _ I M P O R T _ C O L O R _ T A B L E Definition at line 1602 of file db5_io.c. References NULL, and rt_color_addrec(). Referenced by db_dirbuild(). Here is the call graph for this function: ![]() |
|
D B 5 _ P U T _ C O L O R _ T A B L E Put the old region-id-color-table into the global object. A null attribute is set if the material table is empty. Returns - <0 error 0 OK Definition at line 1625 of file db5_io.c. References BU_ASSERT_LONG, bu_vls_addr(), bu_vls_free(), bu_vls_init(), db5_export_color_table(), DB5_GLOBAL_OBJECT_NAME, db5_update_attribute(), db_i::dbi_version, and RT_CK_DBI. Here is the call graph for this function: ![]() |
|
D B _ G E T _ A T T R I B U T E S Get attributes for an object pointed to by *dp returns: 0 - all is well <0 - error Definition at line 1652 of file db5_io.c. References db5_raw_internal::attributes, bu_free_external(), BU_INIT_EXTERNAL, db5_get_raw_internal_ptr(), db5_import_attributes(), db_get_external(), db_i::dbi_version, bu_external::ext_buf, NULL, RT_CK_DBI, and RT_CK_DIR. Referenced by db_lookup_by_attr(), wdb_attr_cmd(), and wdb_do_list(). Here is the call graph for this function: ![]() |
|
D B 5 _ S C A N Returns - 0 Success -1 Fatal Error Definition at line 67 of file db5_scan.c. References BU_ASSERT_LONG, BU_CK_MAPPED_FILE, bu_free(), bu_log(), bu_mapped_file::buflen, db5_get_raw_internal_fp(), db5_get_raw_internal_ptr(), db5_header_is_valid(), DB5_RAW_INTERNAL_MAGIC, db_i::dbi_eof, db_i::dbi_filename, db_i::dbi_fp, db_i::dbi_inmem, db_i::dbi_mf, DEBUG_DB, db5_raw_internal::magic, NULL, RT_CK_DBI, and RT_G_DEBUG. Here is the call graph for this function: ![]() |
|
Definition at line 145 of file db5_scan.c. References bu_avs_get(), BU_LIST_INIT, bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_strcpy(), bu_attribute_value_set::count, directory::d_animate, directory::d_flags, directory::d_forw, directory::d_len, directory::d_major_type, directory::d_minor_type, directory::d_nref, directory::d_un, directory::d_use_hd, directory::d_uses, DB5_MAJORTYPE_ATTRIBUTE_ONLY, DB5_MAJORTYPE_BINARY_EXPM, DB5_MAJORTYPE_BINARY_MIME, DB5_MAJORTYPE_BINARY_UNIF, DB5_MAJORTYPE_BRLCAD, db_dircheck(), DIR_COMB, DIR_HIDDEN, DIR_NON_GEOM, DIR_NULL, DIR_REGION, DIR_SOLID, directory::file_offset, ID_COMBINATION, NULL, directory::ptr, resource::re_magic, RT_CK_DBI, RT_CK_DIR, RT_DIR_SET_NAMEP, RT_GET_DIRECTORY, rt_init_resource(), and rt_uniresource. Here is the call graph for this function: ![]() |
|
|
D B 5 _ D I R A D D _ H A N D L E R In support of db5_scan, add a named entry to the directory. Definition at line 304 of file db5_scan.c. References bu_log(), db5_diradd(), DB5HDR_HFLAGS_DLI_FREE_STORAGE, DB5HDR_HFLAGS_DLI_HEADER_OBJECT, db_i::dbi_freep, DEBUG_DB, bu_external::ext_buf, db5_raw_internal::h_dli, db5_raw_internal::name, NULL, db5_raw_internal::object_length, RT_CK_DBI, RT_G_DEBUG, and rt_memfree(). Referenced by db_dirbuild(). Here is the call graph for this function: ![]() |
|
|
Definition at line 456 of file db5_scan.c. References bu_log(), db5_header_is_valid(), db_i::dbi_filename, and db_i::dbi_fp. Referenced by db_open(). Here is the call graph for this function: ![]() |
|
Definition at line 231 of file db5_types.c. References DB5_MAJORTYPE_RESERVED, db5_type::heed_minor, and db5_type::major_code. |
|
Definition at line 246 of file db5_types.c. References DB5_MAJORTYPE_RESERVED, db5_type::description, db5_type::heed_minor, and db5_type::major_code. |
|
Definition at line 261 of file db5_types.c. References DB5_MAJORTYPE_RESERVED, db5_type::heed_minor, db5_type::major_code, and db5_type::minor_code. |
|
Definition at line 281 of file db5_types.c. References DB5_MAJORTYPE_RESERVED, db5_type::description, db5_type::heed_minor, db5_type::major_code, and db5_type::minor_code. Referenced by rt_retrieve_binunif(). |
|
Definition at line 302 of file db5_types.c. References DB5_MAJORTYPE_RESERVED, db5_type::major_code, and db5_type::minor_code. |
|
Definition at line 319 of file db5_types.c. References DB5_MAJORTYPE_RESERVED, db5_type::description, db5_type::major_code, and db5_type::minor_code. |
|
Definition at line 337 of file db5_types.c. References DB5_MINORTYPE_BINU_16BITINT, DB5_MINORTYPE_BINU_16BITINT_U, DB5_MINORTYPE_BINU_32BITINT, DB5_MINORTYPE_BINU_32BITINT_U, DB5_MINORTYPE_BINU_64BITINT, DB5_MINORTYPE_BINU_64BITINT_U, DB5_MINORTYPE_BINU_8BITINT, DB5_MINORTYPE_BINU_8BITINT_U, DB5_MINORTYPE_BINU_DOUBLE, and DB5_MINORTYPE_BINU_FLOAT. Referenced by rt_mk_binunif(), and wdb_binary_cmd(). |
|
|
Definition at line 62 of file db5_bin.c. Referenced by rt_binunif_tcladjust(), and wdb_vls_long_dpp(). |
|
Definition at line 62 of file db5_io.c. Referenced by db5_export_object3(), and rt_comb_export5(). |
|
Initial value: { 1, 2, 4, 8 } Definition at line 62 of file db5_io.c. Referenced by db5_export_object3(), and rt_comb_export5(). |