27 #ifndef CORE_METADATA_ROW_VEC_H 28 #define CORE_METADATA_ROW_VEC_H 48 std::vector<MDObject>* _row;
50 std::array<int, MDL_LAST_LABEL>* _label_to_col;
51 std::vector<MDLabel>* _col_to_label;
55 MDObject* iteratorValue(
size_t i)
override;
56 const MDObject* iteratorValue(
size_t i)
const override;
63 MDRowVec(std::vector<MDObject>& row,
size_t rowi, std::array<int, MDL_LAST_LABEL>& label_to_col,
64 std::vector<MDLabel>& col_to_label,
size_t& no_columns);
65 MDRowVec(
const std::vector<MDObject>& row,
size_t rowi,
const std::array<int, MDL_LAST_LABEL>& label_to_col,
66 const std::vector<MDLabel>& col_to_label,
const size_t& no_columns);
74 bool empty()
const override;
75 int size()
const override;
76 void clear()
override;
80 std::vector<MDLabel>
labels()
const override;
100 return MDRow::getValue<T>(label,
d);
103 template <
typename T>
106 template <
typename T>
109 template <
typename T,
typename T1>
111 return MDRow::getValueOrDefault<T, T1>(label,
d, def);
114 template <
typename T>
void setValue(MDLabel label, const T &d, bool addLabel=true)
static MDRowVec deepCopy(const MDRowVec &)
int size() const override
void setValue(const MDObject &object) override
const T & getValueOrDefault(MDLabel label, const T &def) const
friend std::ostream & operator<<(std::ostream &out, const MDRowVec &row)
T & getValueOrDefault(MDLabel label, const T &def)
bool containsLabel(MDLabel label) const override
T & getValue(MDLabel label)
MDObject * getObject(MDLabel label) override
std::vector< MDLabel > labels() const override
void addLabel(MDLabel label) override
MDRowVec & operator=(const MDRowVec &)
bool getValue(MDLabel label, T &d) const
bool empty() const override
void getValueOrDefault(MDLabel label, T &d, T1 def) const
const T & getValue(MDLabel label) const