OpenCMISS-Zinc C++ API Documentation
fieldalias.hpp
Go to the documentation of this file.
1 
5 /* OpenCMISS-Zinc Library
6 *
7 * This Source Code Form is subject to the terms of the Mozilla Public
8 * License, v. 2.0. If a copy of the MPL was not distributed with this
9 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #ifndef CMZN_FIELDALIAS_HPP__
11 #define CMZN_FIELDALIAS_HPP__
12 
13 #include "opencmiss/zinc/fieldalias.h"
14 #include "opencmiss/zinc/field.hpp"
15 #include "opencmiss/zinc/fieldmodule.hpp"
16 
17 namespace OpenCMISS
18 {
19 namespace Zinc
20 {
21 
29 class FieldAlias : public Field
30 {
31 private:
32  // takes ownership of C handle, responsibility for destroying it
33  explicit FieldAlias(cmzn_field_id field_id) : Field(field_id)
34  { }
35 
36  friend FieldAlias Fieldmodule::createFieldAlias(const Field& sourceField);
37 
38 public:
39 
40  FieldAlias() : Field(0)
41  { }
42 
43 };
44 
46 {
47  return FieldAlias(cmzn_fieldmodule_create_field_alias(id, sourceField.getId()));
48 }
49 
50 } // namespace Zinc
51 }
52 #endif
FieldAlias createFieldAlias(const Field &sourceField)
Definition: fieldalias.hpp:45
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
cmzn_field_id getId() const
Definition: field.hpp:103
The OpenCMISS namespace.
Definition: context.hpp:20
A specialised field type creating a local alias.
Definition: fieldalias.hpp:29