From 795c7b16b847a9559ed6615f78389e6d95bbe79c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 18 Jul 2017 20:54:48 +0100 Subject: Update to slicer-1.5 pointer based model part --- gentoobrowse-api/domain/converters.cpp | 16 ++++++++-------- gentoobrowse-api/domain/converters.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gentoobrowse-api/domain/converters.cpp b/gentoobrowse-api/domain/converters.cpp index aa51c26..293edab 100644 --- a/gentoobrowse-api/domain/converters.cpp +++ b/gentoobrowse-api/domain/converters.cpp @@ -16,12 +16,12 @@ namespace Slicer { } template - PqArray::PqArray(std::vector & l) : + PqArray::PqArray(std::vector * l) : ModelPartForSequence>(l) { } - PqArray::PqArray(::Gentoo::StringList & sl) : + PqArray::PqArray(::Gentoo::StringList * sl) : ModelPartForSequence<::Gentoo::StringList>(sl) { } @@ -29,36 +29,36 @@ namespace Slicer { template void PqArray::SetValue(ValueSourcePtr s) { - this->Model.clear(); + this->Model->clear(); std::string v; s->set(v); if (v.size() < 3) return; typedef boost::algorithm::split_iterator string_split_iterator; string_split_iterator sfi(++v.begin(), --v.end(), boost::algorithm::first_finder(",", boost::algorithm::is_iequal())); for(auto it = sfi; it != string_split_iterator(); ++it) { - this->Model.push_back(boost::lexical_cast(*it)); + this->Model->push_back(boost::lexical_cast(*it)); } } void PqArray::SetValue(ValueSourcePtr s) { - Model.clear(); + Model->clear(); std::string v; s->set(v); - unpackPqTextArray(v, Model); + unpackPqTextArray(v, *Model); } template void PqArray::GetValue(ValueTargetPtr s) { - s->get(packPqArray(this->Model)); + s->get(packPqArray(*this->Model)); } void PqArray::GetValue(ValueTargetPtr s) { - s->get(packPqArray(this->Model)); + s->get(packPqArray(*this->Model)); } template class PqArray; diff --git a/gentoobrowse-api/domain/converters.h b/gentoobrowse-api/domain/converters.h index 0bd7e91..f286144 100644 --- a/gentoobrowse-api/domain/converters.h +++ b/gentoobrowse-api/domain/converters.h @@ -10,7 +10,7 @@ namespace Slicer { template class DLL_PUBLIC PqArray : public ModelPartForSequence> { public: - PqArray(std::vector &); + PqArray(std::vector *); void SetValue(ValueSourcePtr) override; void GetValue(ValueTargetPtr) override; @@ -19,7 +19,7 @@ namespace Slicer { template<> class DLL_PUBLIC PqArray : public ModelPartForSequence<::Gentoo::StringList> { public: - PqArray(::Gentoo::StringList &); + PqArray(::Gentoo::StringList *); void SetValue(ValueSourcePtr) override; void GetValue(ValueTargetPtr) override; -- cgit v1.2.3