8#ifndef DBE_CHANGE_ATTRIBUTE_HPP_
9#define DBE_CHANGE_ATTRIBUTE_HPP_
21#include <QtCore/qobject.h>
22#include <QtCore/qstring.h>
23#include <QtCore/qstringlist.h>
40 QUndoCommand * parent =
nullptr );
51 T NewValueData, QUndoCommand * parent )
64 catch ( dunedaq::conffwk::Exception
const & )
67 catch ( daq::dbe::config_object_retrieval_result_is_null
const & ex )
69 FAIL (
"Operation did not complete because a lookup in the underlying database failed",
71 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, ex );
75 QObject::tr (
"Attribute %1 of object %2 was updated." ).arg (
76 AttributeData.
p_name.c_str() ).arg ( Object.
UID().c_str() ) );
91 catch ( dunedaq::conffwk::Exception
const & e )
94 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, e );
96 catch ( daq::dbe::config_object_retrieval_result_is_null
const & ex )
98 FAIL (
"Operation did not complete because a lookup in the underlying database failed",
100 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, ex );
123 catch ( dunedaq::conffwk::Exception
const & e )
126 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, e );
128 catch ( daq::dbe::config_object_retrieval_result_is_null
const & ex )
130 FAIL (
"Operation did not complete because a lookup in the underlying database failed",
132 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, ex );
ChangeAttribute(tref Object, dunedaq::conffwk::attribute_t AttributeData, T NewValueData, QUndoCommand *parent=nullptr)
dunedaq::conffwk::attribute_t Attribute
onobject(tref obj, QUndoCommand *parent=nullptr, QUuid const &uuid=0)
static T list(dbe::inner::configobject::tref obj, dunedaq::conffwk::attribute_t const &attr)
void attribute(inner::configobject::tref Object, dunedaq::conffwk::attribute_t const &AttributeData, T NewValueData, bool NotEmit=false)
T to(QStringList const &DataList)
inner::configobject::tref tref