24 std::vector<std::string>
const& object_names_tolink,
32 for (std::string
const& oname : object_names_tolink) {
35 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& ex) {
41 }
catch (dunedaq::conffwk::Exception
const& e) {
47 QObject::tr(
"Relation %1 of object %2 was updated.").arg(
this_relation.
p_name.c_str()).arg(
object.UID().c_str()));
62 }
catch (dunedaq::conffwk::Exception
const& e) {
64 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& ex) {
65 FAIL(
"Operation did not complete because a lookup in the underlying database failed", ex.what());
66 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, ex);
82 }
catch (dunedaq::conffwk::Exception
const& e) {
85 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& ex) {
86 FAIL(
"Operation did not complete because a lookup in the underlying database failed", ex.what());
87 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, ex);
94 std::string
const& include_file,
101 setText(QObject::tr(
"Add Include File %1 to %2")
103 .arg(QFileInfo(QString(
m_db_file.c_str())).fileName()));
115 }
catch (dunedaq::conffwk::Exception
const& e) {
132 }
catch (dunedaq::conffwk::Exception
const& e) {
140 std::string& include_file,
142 QUndoCommand* parent)
147 setText(QObject::tr(
"Remove Include File %1 from %2")
149 .arg(QFileInfo(QString(
m_db_file.c_str())).fileName()));
161 }
catch (dunedaq::conffwk::Exception
const& e) {
175 }
catch (dunedaq::conffwk::Exception
const& e) {
186 setText(QObject::tr(
"Creation of : Object %2@%1 ")
206 }
catch (dunedaq::conffwk::Exception
const& e) {
208 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& e) {
209 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, e);
223 }
catch (dunedaq::conffwk::Exception
const& e) {
233 setText(QObject::tr(
"Delete object of class %1 with ID %2")
234 .arg((this->
checkedref().class_name()).c_str())
253 }
catch (dunedaq::conffwk::Exception
const& e) {
255 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& ex) {
256 FAIL(
"Operation did not complete because a lookup in the underlying database failed", ex.what());
257 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, ex);
276 }
catch (dunedaq::conffwk::Exception
const& e) {
278 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& ex) {
279 FAIL(
"Operation did not complete because a lookup in the underlying database failed", ex.what());
280 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, ex);
290 setText(QObject::tr(
"Object changed ID from %1 to %2").arg(this->
checkedref().UID().c_str()).arg(
newname.c_str()));
306 std::vector<tref> tonotify{ this->
checkedref().referenced_by(
"*",
false) };
308 std::for_each(tonotify.begin(), tonotify.end(), [&](
tref const& x) {
309 confaccessor::ref().force_emit_object_changed(source().toString(), x);
313 }
catch (dunedaq::conffwk::Exception
const& e) {
315 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& e) {
316 FAIL(
"Operation did not complete because a lookup in the underlying database failed", e.what());
317 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, e);
333 std::vector<tref> tonotify =
checkedref().referenced_by(
"*",
false);
335 std::for_each(tonotify.begin(), tonotify.end(), [&](
tref const& x) {
336 confaccessor::ref().force_emit_object_changed(source().toString(), x);
340 }
catch (dunedaq::conffwk::Exception
const& e) {
342 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& e) {
343 FAIL(
"Operation did not complete because a lookup in the underlying database failed", e.what());
344 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, e);
374 }
catch (dunedaq::conffwk::Exception
const& e) {
376 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& e) {
377 FAIL(
"Operation did not complete because a lookup in the underlying database failed", e.what());
378 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, e);
393 }
catch (dunedaq::conffwk::Exception
const& e) {
395 }
catch (daq::dbe::config_object_retrieval_result_is_null
const& e) {
396 FAIL(
"Operation did not complete because a lookup in the underlying database failed", e.what());
397 throw daq::dbe::ObjectChangeWasNotSuccessful(
ERS_HERE, e);
420 : QUndoCommand(parent)
add(std::string const &db_file, std::string const &include_file, QUuid const &src=0, QUndoCommand *parent=0)
std::string m_include_file
remove(std::string &db_file, std::string &include_file, QUuid const &src=0, QUndoCommand *parent=0)
std::string m_include_file
changerefs(tref object, dunedaq::conffwk::relationship_t const &relation, std::vector< std::string > const &object_names_tolink, QUuid const &src=0, QUndoCommand *Parent=nullptr)
std::vector< tref > this_target_neighbors
std::vector< tref > this_current_neighbors
dunedaq::conffwk::relationship_t this_relation
create(dbe::t_config_object_preimage const &img, QUuid const &src=0, QUndoCommand *parent=0)
dbe::t_config_object_preimage this_object_key
std::string destination_file
move(tref ObjectChanged, std::string const &File, QUuid const &src=0, QUndoCommand *parent=nullptr)
remove(tref item, QUuid const &uuid=0, QUndoCommand *parent=0)
rename(tref object, std::string const &Id, QUuid const &src=0, QUndoCommand *parent=nullptr)
onobject(tref obj, QUndoCommand *parent=nullptr, QUuid const &uuid=0)
void setundoable(bool s=true) const
void setredoable(bool s=true) const
state(QUndoCommand *parent=nullptr, QUuid const &uuid=0)
QUuid const & source() const
void force_emit_object_created(QString const &, dref const)
void removefile(std::string const &db, std::string const &fn)
void force_emit_object_deleted(QString const &, dref const)
void force_emit_object_renamed(QString const &, dref const)
void force_emit_object_changed(QString const &, dref const)
static confaccessor & ref()
void addfile(std::string const &db, std::string const &fn)
std::function< void(dref const)> config_action_notifiable
dunedaq::conffwk::ConfigObject & ref(bool check_null=true) const
static configobject::gref< T > delete_object_request(configobject::tref const &obj)
static configobject::tref move_object_request(configobject::tref objref, std::string const &destfile)
static configobject::tref get(dbe::cokey const &desc)
static configobject::tref rename_object_request(configobject::tref objref, std::string const &newname)
static configobject::tref create_object_request(dbe::t_config_object_preimage const &rep)
void relation(dbe::inner::configobject::tref src, dunedaq::conffwk::relationship_t const &edge, std::vector< dbe::inner::configobject::tref > const &targets)
std::string const parse(ers::Issue const &)
inner::configobject::tref tref
config_object_preimage< std::string > t_config_object_preimage
config_object_description dref