#include <Command.hpp>
Definition at line 115 of file Command.hpp.
◆ rename()
dbe::actions::object::rename::rename |
( |
tref | object, |
|
|
std::string const & | Id, |
|
|
QUuid const & | src = 0, |
|
|
QUndoCommand * | parent = nullptr ) |
Definition at line 348 of file Command.cpp.
354{
355 setText (
356 QObject::tr (
"Object changed ID from %1 to %2" ).arg ( this->
checkedref().UID().c_str() )
358}
onobject(tref obj, QUndoCommand *parent=nullptr, QUuid const &uuid=0)
◆ redo()
void dbe::actions::object::rename::redo |
( |
| ) |
|
Definition at line 362 of file Command.cpp.
363{
364 try
365 {
367 {
371
373
374 std::vector<tref> tonotify
376
377 std::for_each ( tonotify.begin(), tonotify.end(), [&] (
tref const & x )
378 {
379 confaccessor::ref().force_emit_object_changed ( source().toString(), x );
380 } );
382 }
383 }
384 catch ( dunedaq::conffwk::Exception const & e )
385 {
387 }
388 catch ( daq::dbe::config_object_retrieval_result_is_null const & e )
389 {
390 FAIL (
"Operation did not complete because a lookup in the underlying database failed",
391 e.what() );
392 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, e );
393 }
394
395}
QUuid const & source() const
void force_emit_object_renamed(QString const &, dref const)
static confaccessor & ref()
std::vector< T > referenced_by(std::string const &name="*", bool check_composite_only=true) const
static configobject::tref rename_object_request(configobject::tref objref, std::string const &newname)
std::string const parse(ers::Issue const &)
inner::configobject::tref tref
config_object_description dref
◆ undo()
void dbe::actions::object::rename::undo |
( |
| ) |
|
Definition at line 399 of file Command.cpp.
400{
401 try
402 {
404 {
409
411
412 std::for_each ( tonotify.begin(), tonotify.end(), [&] (
tref const & x )
413 {
414 confaccessor::ref().force_emit_object_changed ( source().toString(), x );
415 } );
417 }
418 }
419 catch ( dunedaq::conffwk::Exception const & e )
420 {
422 }
423 catch ( daq::dbe::config_object_retrieval_result_is_null const & e )
424 {
425 FAIL (
"Operation did not complete because a lookup in the underlying database failed",
426 e.what() );
427 throw daq::dbe::ObjectChangeWasNotSuccessful (
ERS_HERE, e );
428 }
429
430}
◆ newname
std::string dbe::actions::object::rename::newname |
|
private |
◆ oldname
std::string dbe::actions::object::rename::oldname |
|
private |
The documentation for this class was generated from the following files:
- /github/workspace/dunedaq/sourcecode/dbe/include/dbe/Command.hpp
- /github/workspace/dunedaq/sourcecode/dbe/src/internal/Command.cpp