9 #ifndef CMZN_NODE_HPP__
10 #define CMZN_NODE_HPP__
12 #include "zinc/node.h"
13 #include "zinc/field.hpp"
14 #include "zinc/timesequence.hpp"
49 explicit Node(cmzn_node_id node_id) : id(node_id)
53 id(cmzn_node_access(node.id))
107 cmzn_node_id temp_id = cmzn_node_access(node.id);
110 cmzn_node_destroy(&
id);
120 cmzn_node_destroy(&
id);
153 return cmzn_node_get_identifier(
id);
166 return cmzn_node_set_identifier(
id, identifier);
180 inline bool operator==(
const Node& a,
const Node& b)
182 return a.getId() == b.getId();
196 cmzn_nodetemplate_id id;
204 explicit Nodetemplate(cmzn_nodetemplate_id node_template_id) :
209 id(cmzn_nodetemplate_access(nodeTemplate.id))
214 cmzn_nodetemplate_id temp_id = cmzn_nodetemplate_access(nodeTemplate.id);
217 cmzn_nodetemplate_destroy(&
id);
227 cmzn_nodetemplate_destroy(&
id);
262 return cmzn_nodetemplate_define_field(
id, field.
getId());
281 return cmzn_nodetemplate_set_timesequence(
id, field.
getId(), timesequence.
getId());
300 return cmzn_nodetemplate_get_value_number_of_versions(
id, field.
getId(),
301 componentNumber,
static_cast<cmzn_node_value_label
>(valueLabel));
330 return cmzn_nodetemplate_set_value_number_of_versions(
id, field.
getId(),
331 componentNumber,
static_cast<cmzn_node_value_label
>(valueLabel), numberOfVersions);
345 return cmzn_nodetemplate_undefine_field(
id, field.
getId());
358 cmzn_nodeiterator_id id;
366 explicit Nodeiterator(cmzn_nodeiterator_id node_iterator_id) :
371 id(cmzn_nodeiterator_access(nodeIterator.id))
376 cmzn_nodeiterator_id temp_id = cmzn_nodeiterator_access(nodeIterator.id);
379 cmzn_nodeiterator_destroy(&
id);
389 cmzn_nodeiterator_destroy(&
id);
412 return Node(cmzn_nodeiterator_next(
id));
433 explicit Nodeset(cmzn_nodeset_id nodeset_id) : id(nodeset_id)
437 id(cmzn_nodeset_access(nodeset.id))
442 cmzn_nodeset_id temp_id = cmzn_nodeset_access(nodeset.id);
445 cmzn_nodeset_destroy(&
id);
455 cmzn_nodeset_destroy(&
id);
487 return cmzn_nodeset_contains_node(
id, node.
getId());
499 return Nodetemplate(cmzn_nodeset_create_nodetemplate(
id));
514 return Node(cmzn_nodeset_create_node(
id, identifier, nodeTemplate.
getId()));
529 return Nodeiterator(cmzn_nodeset_create_nodeiterator(
id));
540 return cmzn_nodeset_destroy_all_nodes(
id);
552 return cmzn_nodeset_destroy_node(
id, node.
getId());
568 return cmzn_nodeset_destroy_nodes_conditional(
id, conditionalField.
getId());
579 return Node(cmzn_nodeset_find_node_by_identifier(
id, identifier));
597 return Nodeset(cmzn_nodeset_get_master_nodeset(
id));
609 return cmzn_nodeset_get_name(
id);
619 return cmzn_nodeset_get_size(
id);
624 inline bool operator==(
const Nodeset& a,
const Nodeset& b)
626 return cmzn_nodeset_match(a.getId(), b.getId());
631 return Nodeset(cmzn_node_get_nodeset(
id));
645 explicit NodesetGroup(cmzn_nodeset_group_id nodeset_id) :
Nodeset(reinterpret_cast<cmzn_nodeset_id>(nodeset_id))
655 return (cmzn_nodeset_group_id)(id);
666 return cmzn_nodeset_group_add_node(
667 reinterpret_cast<cmzn_nodeset_group_id>(
id), node.
getId());
677 return cmzn_nodeset_group_remove_all_nodes(
678 reinterpret_cast<cmzn_nodeset_group_id>(
id));
689 return cmzn_nodeset_group_remove_node(reinterpret_cast<cmzn_nodeset_group_id>(
id),
704 return cmzn_nodeset_group_remove_nodes_conditional(
705 reinterpret_cast<cmzn_nodeset_group_id>(
id), conditionalField.
getId());
719 cmzn_nodesetchanges_id id;
727 explicit Nodesetchanges(cmzn_nodesetchanges_id nodesetchanges_id) :
728 id(nodesetchanges_id)
732 id(cmzn_nodesetchanges_access(nodesetchanges.id))
737 cmzn_nodesetchanges_id temp_id = cmzn_nodesetchanges_access(nodesetchanges.id);
739 cmzn_nodesetchanges_destroy(&
id);
747 cmzn_nodesetchanges_destroy(&
id);
762 return cmzn_nodesetchanges_get_node_change_flags(
id, node.
getId());
774 return cmzn_nodesetchanges_get_number_of_changes(
id);
779 return cmzn_nodesetchanges_get_summary_node_change_flags(
id);
783 inline int Node::merge(
const Nodetemplate& nodeTemplate)
785 return cmzn_node_merge(
id, nodeTemplate.getId());
An iterator for looping through all the nodes in a nodeset.
Definition: node.hpp:354
bool isValid() const
Definition: node.hpp:755
Object describing changes to a nodeset in a fieldmoduleevent.
Definition: node.hpp:715
bool isValid() const
Definition: node.hpp:464
int setTimesequence(const Field &field, const Timesequence ×equence)
Definition: node.hpp:279
int addNode(const Node &node)
Definition: node.hpp:664
cmzn_nodetemplate_id getId() const
Definition: node.hpp:246
int setValueNumberOfVersions(const Field &field, int componentNumber, Node::ValueLabel valueLabel, int numberOfVersions)
Definition: node.hpp:327
A description of field parameters to define at a node.
Definition: node.hpp:192
int removeNode(const Node &node)
Definition: node.hpp:687
ValueLabel
Definition: node.hpp:83
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:46
int removeNodesConditional(const Field &conditionalField)
Definition: node.hpp:702
int getIdentifier()
Definition: node.hpp:151
A subset of a master nodeset.
Definition: node.hpp:639
cmzn_nodeset_id getId() const
Definition: node.hpp:474
int destroyAllNodes()
Definition: node.hpp:538
Node next()
Definition: node.hpp:410
bool isValid() const
Definition: node.hpp:236
cmzn_nodeset_group_id getId() const
Definition: node.hpp:653
ChangeFlag
Definition: node.hpp:59
Node findNodeByIdentifier(int identifier)
Definition: node.hpp:577
int undefineField(const Field &field)
Definition: node.hpp:343
Nodetemplate createNodetemplate()
Definition: node.hpp:497
int getValueNumberOfVersions(const Field &field, int componentNumber, Node::ValueLabel valueLabel)
Definition: node.hpp:297
cmzn_field_id getId() const
Definition: field.hpp:98
Nodeiterator createNodeiterator()
Definition: node.hpp:527
int destroyNode(const Node &node)
Definition: node.hpp:550
int setIdentifier(int identifier)
Definition: node.hpp:164
bool isValid() const
Definition: node.hpp:398
Nodeset getMasterNodeset()
Definition: node.hpp:595
Nodeset getNodeset() const
Definition: node.hpp:629
int getSize()
Definition: node.hpp:617
char * getName()
Definition: node.hpp:607
cmzn_node_id getId() const
Definition: node.hpp:139
int getNumberOfChanges()
Definition: node.hpp:772
int defineField(const Field &field)
Definition: node.hpp:260
Container/manager of fields and domains within a region.
Definition: fieldmodule.hpp:126
bool isValid() const
Definition: node.hpp:129
A non-decreasing list of times at which nodal parameters can be stored.
Definition: timesequence.hpp:35
Node createNode(int identifier, const Nodetemplate &nodeTemplate)
Definition: node.hpp:512
cmzn_timesequence_id getId() const
Definition: timesequence.hpp:88
int ChangeFlags
Definition: node.hpp:78
bool containsNode(const Node &node)
Definition: node.hpp:485
Point object used to represent finite element nodes.
Definition: node.hpp:37
int removeAllNodes()
Definition: node.hpp:675
int destroyNodesConditional(const Field &conditionalField)
Definition: node.hpp:566
A set of nodes or points.
Definition: node.hpp:421
Fieldmodule getFieldmodule() const
Definition: fieldmodule.hpp:1582