BRL-CAD
|
Go to the source code of this file.
Data Structures | |
struct | db5_attr_ctype |
struct | db5_registry |
Macros | |
#define | ATTR_STD(attr) db5_standard_attribute(db5_standardize_attribute(attr)) |
Enumerations | |
enum | { ATTR_REGION = 0 , ATTR_REGION_ID , ATTR_MATERIAL_ID , ATTR_MATERIAL_NAME , ATTR_AIR , ATTR_LOS , ATTR_COLOR , ATTR_SHADER , ATTR_INHERIT , ATTR_TIMESTAMP , ATTR_NULL } |
enum | { ATTR_STANDARD = 0 , ATTR_USER_DEFINED , ATTR_UNKNOWN_ORIGIN } |
Variables | |
const struct db5_attr_ctype | db5_attr_std [] |
#define ATTR_STD | ( | attr | ) | db5_standard_attribute(db5_standardize_attribute(attr)) |
Define standard attribute types in BRL-CAD geometry. (See the attributes manual page.) These should be a collective enumeration starting from 0 and increasing without any gaps in the numbers so db5_standard_attribute() can be used as an index-based iterator.
Enumerator | |
---|---|
ATTR_REGION | |
ATTR_REGION_ID | |
ATTR_MATERIAL_ID | |
ATTR_MATERIAL_NAME | |
ATTR_AIR | |
ATTR_LOS | |
ATTR_COLOR | |
ATTR_SHADER | |
ATTR_INHERIT | |
ATTR_TIMESTAMP | |
ATTR_NULL |
|
extern |
Initialize a user attribute registry
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
Free a user attribute registry
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
Register a user attribute
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
Register a user attribute
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
De-register a user attribute
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
Look to see if a specific attribute is registered
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
Get an array of pointers to all registered attributes
PRIVATE: this is new API and should be considered private for the time being.
Function returns the string name for a given standard attribute index. Index values returned from db5_standardize_attribute() correspond to the names returned from this function, returning the "standard" name. Callers may also iterate over all names starting with an index of zero until a NULL is returned.
PRIVATE: this is new API and should be considered private for the time being.
Function returns the string definition for a given standard attribute index. Index values returned from db5_standardize_attribute_def() correspond to the definition returned from this function, returning the "standard" definition. Callers may also iterate over all names starting with an index of zero until a NULL is returned.
PRIVATE: this is new API and should be considered private for the time being.
Function for recognizing various versions of the DB5 standard attribute names that have been used - returns the attribute type of the supplied attribute name, or -1 if it is not a recognized variation of the standard attributes.
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
Ensures that an attribute set containing standard attributes with non-standard/old/deprecated names gets the standard name added. It will update the first non-standard name encountered, but will leave any subsequent matching attributes found unmodified if they have different values. Such "conflict" attributes must be resolved manually.
Returns the number of conflicting attributes.
PRIVATE: this is new API and should be considered private for the time being.
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
PRIVATE: this is new API and should be considered private for the time being.
|
extern |
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
|
extern |
Encode the attribute-value pair information into the external on-disk format.
The on-disk encoding is:
name1 NULL value1 NULL ... nameN NULL valueN NULL NULL
For binary attributes the on-disk encoding is:
bname1 NULL uchar valuelen1 comment1 NULL bvalue1 NULL ... bnameN NULL uchar valuelenN commentN NULL bvalueN NULL NULL
'ext' is initialized on behalf of the caller.
|
extern |
lookup directory entries based on directory flags (dp->d_flags) and attributes the "dir_flags" arg is a mask for the directory flags the *"avs" is an attribute value set used to select from the objects that *pass the flags mask. if "op" is 1, then the object must have all the *attributes and values that appear in "avs" in order to be *selected. If "op" is 2, then the object must have at least one of *the attribute/value pairs from "avs".
dir_flags are in the form used in struct directory (d_flags)
for op: 1 -> all attribute name/value pairs must be present and match 2 -> at least one of the name/value pairs must be present and match
returns a ptbl list of selected directory pointers. An empty list means nothing met the requirements and a NULL return means something went wrong.
|
extern |
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
|
extern |
Update an arbitrary number of attributes on 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
|
extern |
A convenience routine to update the value of a single attribute.
Returns - 0 on success <0 on error
|
extern |
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
|
extern |
Get attributes for an object pointed to by *dp
returns: 0 - all is well <0 - error
|
extern |