#include <DamselUtil.hpp>
Classes | |
struct | DtagP |
struct | MtagP |
class | tinfo |
struct to hold information on damsel/moab tags More... | |
Public Member Functions | |
DamselUtil () | |
Needs to be a constructor to initialize dtom_data_type. More... | |
Static Public Member Functions | |
static ErrorCode | container_to_range (damsel_model m, damsel_container &cont, Range &range) |
Convert handles in a container to a range; assumes EntityHandle and Damsel entity handles are the same size. More... | |
Static Public Attributes | |
static damsel_data_type | mtod_data_type [MB_MAX_DATA_TYPE+1] |
static enum DataType | dtom_data_type [DAMSEL_DATA_TYPE_PREDEFINED_WATERMARK+1] |
static enum damsel_entity_type | mtod_entity_type [MBMAXTYPE+1] |
static enum EntityType | dtom_entity_type [DAMSEL_ENTITY_TYPE_ALL_TYPES+1] |
Private Attributes | |
damsel_library | dmslLib |
Damsel library id. More... | |
damsel_model | dmslModel |
Damsel model id. More... | |
tinfo | xcoordsTag |
Other conventional tags. More... | |
tinfo | ycoordsTag |
tinfo | zcoordsTag |
tinfo | collFlagsTag |
tinfo | parentsTag |
tinfo | childrenTag |
std::vector< tinfo > | tagMap |
MOAB/damsel handles for dense [0], sparse [1], and conventional [2] tags. More... | |
damsel_handle_type | moabHandleType |
Damsel handle type used in (this build of) MOAB. More... | |
Friends | |
class | WriteDamsel |
class | ReadDamsel |
Definition at line 37 of file DamselUtil.hpp.
moab::DamselUtil::DamselUtil | ( | ) |
Needs to be a constructor to initialize dtom_data_type.
Definition at line 60 of file DamselUtil.cpp.
61 : dmslLib( DAMSEL_LIBRARY_INVALID ), dmslModel( DAMSEL_MODEL_INVALID ), moabHandleType( DAMSEL_HANDLE_TYPE_INVALID ) 62 { 63 }
|
static |
Convert handles in a container to a range; assumes EntityHandle and Damsel entity handles are the same size.
Definition at line 67 of file DamselUtil.cpp.
68 {
69 if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_SEQUENCE )
70 {
71 damsel_handle start;
72 size_t count, stride;
73 damsel_err_t err = DMSLcontainer_sequence_get_contents( m, c, &start, &count, &stride );
74 CHK_DMSL_ERR_NM( err );
75 for( damsel_handle i = start + ( count - 1 ) * stride; i >= start; i -= stride )
76 r.insert( i );
77 }
78 else if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_VECTOR )
79 {
80 damsel_handle* handle_ptr;
81 size_t count;
82 damsel_err_t err = DMSLcontainer_vector_get_contents( m, c, &handle_ptr, &count );
83 CHK_DMSL_ERR_NM( err );
84 for( int i = count - 1; i >= 0; i-- )
85 r.insert( handle_ptr[i] );
86 }
87 else if( DMSLcontainer_get_type( c ) == DAMSEL_HANDLE_CONTAINER_TYPE_TREE )
88 {
89 damsel_handle_ptr node_ptr = NULL;
90 damsel_container cont = NULL;
91 damsel_err_t err = DMSLcontainer_tree_get_contents( m, c, &node_ptr, &cont );
92 while( err.id == DMSL_OK.id && cont )
93 {
94 ErrorCode rval = container_to_range( m, c, r );
95 if( MB_SUCCESS != rval ) return rval;
96 err = DMSLcontainer_tree_get_contents( m, c, &node_ptr, &cont );
97 }
98 }
99
100 return MB_SUCCESS;
101 }
References CHK_DMSL_ERR_NM, ErrorCode, moab::Range::insert(), and MB_SUCCESS.
Referenced by moab::ReadDamsel::process_ent_info().
|
friend |
Definition at line 41 of file DamselUtil.hpp.
|
friend |
Definition at line 40 of file DamselUtil.hpp.
|
private |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_tags().
|
private |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_sets(), and moab::WriteDamsel::WriteDamsel().
|
private |
Damsel library id.
Definition at line 110 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::load_file(), moab::WriteDamsel::write_file(), and moab::ReadDamsel::~ReadDamsel().
|
private |
Damsel model id.
Definition at line 113 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::load_file(), moab::WriteDamsel::map_sparse_tags(), moab::ReadDamsel::process_ent_info(), moab::WriteDamsel::write_entities(), moab::WriteDamsel::write_file(), moab::WriteDamsel::write_sets(), and moab::WriteDamsel::write_vertices().
|
static |
= { MB_TYPE_OPAQUE, MB_TYPE_OPAQUE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MB_TYPE_OPAQUE, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_OPAQUE, MB_TYPE_OPAQUE, MB_TYPE_OPAQUE }
Definition at line 46 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_tags().
|
static |
= { MBVERTEX, MBEDGE, MBTRI, MBQUAD, MBPOLYGON, MBTET, MBPRISM, MBPYRAMID, MBHEX, MBPOLYHEDRON, MBMAXTYPE, MBMAXTYPE }
Definition at line 46 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_ent_info().
|
private |
Damsel handle type used in (this build of) MOAB.
Definition at line 122 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::WriteDamsel().
|
static |
= { DAMSEL_DATA_TYPE_BYTES, DAMSEL_DATA_TYPE_INTEGER, DAMSEL_DATA_TYPE_DOUBLE, DAMSEL_DATA_TYPE_INVALID, DAMSEL_DATA_TYPE_HANDLE }
Definition at line 46 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info().
|
static |
= { DAMSEL_ENTITY_TYPE_VERTEX, DAMSEL_ENTITY_TYPE_EDGE, DAMSEL_ENTITY_TYPE_TRI, DAMSEL_ENTITY_TYPE_QUAD, DAMSEL_ENTITY_TYPE_POLYGON, DAMSEL_ENTITY_TYPE_TET, DAMSEL_ENTITY_TYPE_PYRAMID, DAMSEL_ENTITY_TYPE_PRISM, DAMSEL_ENTITY_TYPE_UNDEFINED, DAMSEL_ENTITY_TYPE_HEX, DAMSEL_ENTITY_TYPE_POLYHEDRON, DAMSEL_ENTITY_TYPE_UNDEFINED }
Definition at line 46 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::write_entities().
|
private |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::ReadDamsel::process_tags().
|
private |
MOAB/damsel handles for dense [0], sparse [1], and conventional [2] tags.
Definition at line 119 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::WriteDamsel::map_dense_tags(), moab::WriteDamsel::map_sparse_tags(), moab::ReadDamsel::process_entity_tags(), moab::ReadDamsel::process_tags(), and moab::WriteDamsel::WriteDamsel().
|
private |
Other conventional tags.
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_ent_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_vertices(), and moab::WriteDamsel::WriteDamsel().
|
private |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_ent_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_vertices(), and moab::WriteDamsel::WriteDamsel().
|
private |
Definition at line 116 of file DamselUtil.hpp.
Referenced by moab::WriteDamsel::init_tag_info(), moab::ReadDamsel::process_ent_info(), moab::ReadDamsel::process_tags(), moab::WriteDamsel::write_vertices(), and moab::WriteDamsel::WriteDamsel().