import iBase version 0.7; import iGeom version 0.6.99; import iMesh version 0.7; package iRel version 0.7 { interface Associate { // Create an association between iface1 and iface2. This simply says // that there will later be associations set between entities owned by // these two interfaces, but does -not- explicitly make those // associations yet. We may or may not want a handle for this // association. Also, this might be a good place to specify one-way // versus two-way associativity. // // Analogs: // createTag // setModel // part of the functionality of setRelations void createAssociation(in sidl.BaseInterface iface1, in int ent_or_set1, in sidl.BaseInterface iface2, in int ent_or_set2) throws iBase.Error; // Terminates association between iface1 and iface2. Like the tag // analog, we may or may not want to add a force option here. // // Analogs: // destroyTag // rmvRelations void destroyAssociation(in sidl.BaseInterface iface1, in sidl.BaseInterface iface2) throws iBase.Error; // Find out what other interfaces this one is associated with. Do we // want to be able to specify a type, allowing retrieval of (say) a // geometric model for a mesh without the field data? // // Analogs: Various entity set stuff (both member and parent-child). void getAssociatedInterfaces( in sidl.BaseInterface iface, inout array interfaces, out int interfaces_size) throws iBase.Error; // Set an association between two entities in the two interfaces. // // Analogs: // EntTag::set* // setClass void setEntEntAssociation( in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in opaque ent1, in int is_set1, in opaque ent2, in int is_set2) throws iBase.Error; // Ditto for associating a single entity to an array of entities. void setEntArrAssociation( in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in opaque ent1, in int is_set1, in array ent_array_2, in int ent_array_2_size, in int is_set2) throws iBase.Error; // Ditto for associating an array to an array (one-to-one only, at // least at the moment; this implies num_ent1 == num_ent2). void setArrAssociation( in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in array ent_array_1, in int ent_array_1_size, in int is_set1, in array ent_array_2, in int ent_array_2_size, in int is_set2) throws iBase.Error; // Get an association from one entity to a -single- entity in another // interface. If ent1 is associated only to a set or to multiple // entities, this function should throw an error. One could easily // argue that getEntArrAssociation is a much more practical alternative. void getEntEntAssociation( in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in opaque ent1, in int is_set1, out opaque ent2, out int is_set2) throws iBase.Error; // Ditto for getting an array of entities associated with a single entity. void getEntArrAssociation( in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in opaque ent1, in int is_set1, in int return_sets, inout array ent_array_2, out int ent_array_2_size) throws iBase.Error; // Array get uses the same offset mechanism that things like the // adjacency calls use. void getArrAssociation(in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in array ent_array_1, in int ent_array_1_size, in int is_set1, in int return_sets, inout array ent_array_2, out int ent_array_2_size, inout array offset, out int offset_size) throws iBase.Error; }; interface createEnt extends Associate { // given xyz coordinates and a geometric entity, create a mesh vertex and // associate the created mesh vertex with the geo. entity. void createVtxAndAssociate( in double x, in double y, in double z, in opaque associatedGeomEnt, out opaque new_entity_handle) throws iBase.Error; // given lower-order bounding entities and a geo. entity, create a new mesh // entity of order>0 and associate the new mesh entity with the geo. entity void createEntAndAssociate( in iMesh.EntityTopology new_entity_topology, in array lower_order_entity_handles, in int lower_order_entity_handles_size, in opaque associatedGeomEnt, out opaque new_entity_handle, out iBase.CreationStatus status) throws iBase.Error; // create multiple vertices and associate them with geo. entities void createVtxArrAndAssociate( in int num_verts, in iBase.StorageOrder storage_order, in array new_coords, in int new_coords_size, in array associatedGeomEnts, inout array new_vertex_handles, in int new_vertex_handles_size) throws iBase.Error; // create multiple entities of order>0 and associate them with geo. entities void createEntArrAndAssociate( in iMesh.EntityTopology new_entity_topology, in array lower_order_entity_handles, in int lower_order_entity_handles_size, in array offsets, in int offsets_size, in array associatedGeomEnts, inout array new_entity_handles, out int new_entity_handles_size, inout array status, out int status_size) throws iBase.Error; // move an entity to owning geometry entity void moveTo(in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in opaque geom_entity) throws iBase.Error; }; interface Infer extends Associate { // Use internal information in the specified interfaces to set all // appropriate associations between their entities and/or sets. // // Analog: // Part of the functionality of setRelations void inferAllAssociations(in sidl.BaseInterface iface1, in sidl.BaseInterface iface2) throws iBase.Error; // Ditto, but for a particular entity/set/array of entities in one of // the interfaces. The intent is that inferences made will be two-way // if the association between iface1 and iface2 is two-way. If that // association is one-way, then the association must be from iface1 to // iface2. // // Analogs: // Tim's relate* functions, at least as I understand them. void inferEntAssociations(in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in opaque entity, in int is_set) throws iBase.Error; void inferArrAssociations(in sidl.BaseInterface iface1, in sidl.BaseInterface iface2, in array entities, in int entities_size, in int is_set) throws iBase.Error; }; class Factory { static Associate newAssoc(in string option) throws iBase.Error; }; };