MCPcopy Create free account
hub / github.com/Kitware/VTK / AddUserField

Function AddUserField

Utilities/MetaIO/vtkmetaio/metaForm.h:136–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135 template <class TType>
136 bool
137 AddUserField(const char * _fieldName,
138 MET_ValueEnumType _type,
139 int _length,
140 TType * _v,
141 bool _required = true,
142 int _dependsOn = -1)
143 {
144 auto * mFw = new MET_FieldRecordType;
145 MET_InitWriteField(mFw, _fieldName, _type, static_cast<size_t>(_length), _v);
146 m_UserDefinedWriteFields.push_back(mFw);
147
148 auto * mFr = new MET_FieldRecordType;
149 MET_InitReadField(mFr, _fieldName, _type, _required, _dependsOn, static_cast<size_t>(_length));
150 m_UserDefinedReadFields.push_back(mFr);
151
152 return true;
153 }
154
155 static bool
156 CanRead(const char * _fileName = nullptr) ;

Callers

nothing calls this directly

Calls 3

MET_InitReadFieldFunction · 0.85
MET_InitWriteFieldFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected