9 #ifndef CMZN_FIELDCOMPOSITE_HPP__ 10 #define CMZN_FIELDCOMPOSITE_HPP__ 13 #include "opencmiss/zinc/fieldcomposite.h" 14 #include "opencmiss/zinc/field.hpp" 15 #include "opencmiss/zinc/fieldmodule.hpp" 21 class FieldIdentity :
public Field
35 explicit FieldIdentity(cmzn_field_id field_id) : Field(field_id)
42 FieldIdentity() : Field(0)
62 explicit FieldComponent(cmzn_field_component_id field_component_id) :
63 Field(reinterpret_cast<cmzn_field_id>(field_component_id))
73 return reinterpret_cast<cmzn_field_component_id
>(id);
83 return cmzn_field_component_get_component_index(getDerivedId());
95 return cmzn_field_component_set_component_index(getDerivedId(), componentIndex);
106 return cmzn_field_component_get_source_component_index(getDerivedId(), index);
119 return cmzn_field_component_set_source_component_index(getDerivedId(), index, sourceComponentIndex);
150 return FieldIdentity(cmzn_fieldmodule_create_field_identity(
id, sourceField.
getId()));
156 cmzn_fieldmodule_create_field_component(this->
id, sourceField.
getId(), sourceComponentIndex)));
160 int sourceComponentIndexesCount,
const int *sourceComponentIndexesIn)
163 cmzn_fieldmodule_create_field_component_multiple(this->
id, sourceField.
getId(),
164 sourceComponentIndexesCount, sourceComponentIndexesIn)));
174 cmzn_field_id concatenateField = 0;
177 cmzn_field_id *source_fields =
new cmzn_field_id[fieldsCount];
178 for (
int i = 0; i < fieldsCount; i++)
180 source_fields[i] = sourceFields[i].
getId();
182 concatenateField = cmzn_fieldmodule_create_field_concatenate(
id, fieldsCount, source_fields);
183 delete[] source_fields;
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
A field which concatenates the components of all source fields, in order, into a single vector...
Definition: fieldcomposite.hpp:131
FieldComponent castComponent()
Definition: fieldcomposite.hpp:167
int setSourceComponentIndex(int index, int sourceComponentIndex)
Definition: fieldcomposite.hpp:117
A field returning one or more components of a source field in a specified order.
Definition: fieldcomposite.hpp:54
cmzn_field_id getId() const
Definition: field.hpp:103
int getComponentIndex()
Definition: fieldcomposite.hpp:81
cmzn_field_component_id getDerivedId()
Definition: fieldcomposite.hpp:71
int getSourceComponentIndex(int index)
Definition: fieldcomposite.hpp:104
int setComponentIndex(int componentIndex)
Definition: fieldcomposite.hpp:93
FieldConcatenate createFieldConcatenate(int fieldsCount, const Field *sourceFields)
Definition: fieldcomposite.hpp:172
FieldComponent createFieldComponent(const Field &sourceField, int sourceComponentIndex)
Definition: fieldcomposite.hpp:153
FieldIdentity createFieldIdentity(const Field &sourceField)
Definition: fieldcomposite.hpp:148
The OpenCMISS namespace.
Definition: context.hpp:20
A field with the single source field.
Definition: fieldcomposite.hpp:30