Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Copying the refcounted pointer to the FieldNames object in Row::operator =() instead of copying the field names. We can share the object. |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1e03cb233c4d298ec3d6347ac13507ef |
User & Date: | tangent 2015-12-18 23:29:05 |
Context
2015-12-21
| ||
02:10 | Added a FIXME comment check-in: 01622c2244 user: tangent tags: trunk | |
2015-12-18
| ||
23:29 | Copying the refcounted pointer to the FieldNames object in Row::operator =() instead of copying the field names. We can share the object. check-in: 1e03cb233c user: tangent tags: trunk | |
22:42 | Removed need for Impl parameter to ResultBase::fetch_row() and its derivatives. ResultBase can provide the implementation object to the DBDriver layer, which is the only code that needed this. check-in: 3f91a82d13 user: tangent tags: trunk | |
Changes
Changes to src/row.cpp.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
} } Row& Row::operator =(const Row& rhs) { data_->assign(rhs.data_->begin(), rhs.data_->end()); field_names_->clear(); #if defined(HAVE_CXX_CBEGIN_CEND) copy(rhs.field_names_->cbegin(), rhs.field_names_->cend(), field_names_->begin()); #else copy(rhs.field_names_->begin(), rhs.field_names_->end(), field_names_->begin()); #endif initialized_ = rhs.initialized_; return *this; } const Row::value_type& Row::operator [](const char* field) const |
| | < < < < < < < |
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
} } Row& Row::operator =(const Row& rhs) { data_ = rhs.data_; field_names_ = rhs.field_names_; initialized_ = rhs.initialized_; return *this; } const Row::value_type& Row::operator [](const char* field) const |
Changes to src/row.h.
524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
create_vector(*this, vb, s0, s1, s2, s3, s4, s5, s6, s7, s8,
s9, sa, sb, sc);
return value_list_b<Row, quote_type0>(*this, vb, ",", quote);
}
private:
RefCountedPointer<Impl> data_;
const RefCountedPointer<FieldNames> field_names_;
bool initialized_;
};
} // end namespace libtabula
#endif // !defined(LIBTABULA_ROW_H)
|
| |
524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
create_vector(*this, vb, s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sa, sb, sc); return value_list_b<Row, quote_type0>(*this, vb, ",", quote); } private: RefCountedPointer<Impl> data_; RefCountedPointer<FieldNames> field_names_; bool initialized_; }; } // end namespace libtabula #endif // !defined(LIBTABULA_ROW_H) |