1#ifndef COMSERVATORY_FIELD_HPP
2#define COMSERVATORY_FIELD_HPP
35 virtual size_t size()
const = 0;
91template<
typename T, Type tt>
106template<
typename T, Type tt>
114 std::iota(missing.begin(), missing.end(), 0);
121 std::vector<size_t> missing;
122 std::vector<T> values;
128 return values.size();
132 values.emplace_back(std::move(x));
137 size_t i = values.size();
138 missing.push_back(i);
139 values.resize(i + 1);
149template<
typename T, Type tt>
Defines the Type enumeration for field types.
Contains all comservatory functions and classes.
Definition: Field.hpp:16
TypedField< std::string, STRING > StringField
Definition: Field.hpp:189
TypedField< bool, BOOLEAN > BooleanField
Virtual class for a Field of booleans.
Definition: Field.hpp:219
DummyField< std::complex< double >, COMPLEX > DummyComplexField
Definition: Field.hpp:244
Type
Definition: Type.hpp:15
TypedField< std::complex< double >, COMPLEX > ComplexField
Definition: Field.hpp:234
FilledField< double, NUMBER > FilledNumberField
Definition: Field.hpp:209
FilledField< std::string, STRING > FilledStringField
Definition: Field.hpp:194
FilledField< std::complex< double >, COMPLEX > FilledComplexField
Definition: Field.hpp:239
FilledField< bool, BOOLEAN > FilledBooleanField
Definition: Field.hpp:224
DummyField< bool, BOOLEAN > DummyBooleanField
Definition: Field.hpp:229
DummyField< std::string, STRING > DummyStringField
Definition: Field.hpp:199
TypedField< double, NUMBER > NumberField
Definition: Field.hpp:204
DummyField< double, NUMBER > DummyNumberField
Definition: Field.hpp:214
Template class for a typed dummy field that only pretends to store its values.
Definition: Field.hpp:150
bool filled() const
Definition: Field.hpp:179
void push_back(T)
Definition: Field.hpp:169
DummyField(size_t n=0)
Definition: Field.hpp:155
size_t size() const
Definition: Field.hpp:165
void add_missing()
Definition: Field.hpp:174
Virtual base class for a describing a field.
Definition: Field.hpp:23
virtual Type type() const =0
virtual bool filled() const
Definition: Field.hpp:51
virtual void add_missing()=0
virtual size_t size() const =0
Template class for a typed field that uses a std::vector to store its values.
Definition: Field.hpp:107
void push_back(T x)
Definition: Field.hpp:131
void add_missing()
Definition: Field.hpp:136
size_t size() const
Definition: Field.hpp:127
FilledField(size_t n=0)
Definition: Field.hpp:112
Template class for a field of a known type.
Definition: Field.hpp:92
virtual void push_back(T x)=0
Type type() const
Definition: Field.hpp:93
Field of an unknown type.
Definition: Field.hpp:63
void add_missing()
Definition: Field.hpp:80
Type type() const
Definition: Field.hpp:76
size_t size() const
Definition: Field.hpp:72