56void newobj ( std::string
const & fn, std::string
const & cn, std::string
const & name,
60 std::string description
61 {
"Object created : " + name +
"@" + cn };
78 std::string
const description
79 {
"Object deleted : " + obj.UID() +
"@" + obj.class_name()
86 catch ( daq::dbe::ObjectChangeWasNotSuccessful
const & dbe_err )
97bool renobj (
tref obj, std::string
const & newuuid, QUuid
const & src )
101 std::string
const description =
103 "Object renamed : " + obj.UID() +
"@" + obj.class_name() +
" to " + newuuid +
"@"
117 catch ( daq::dbe::ObjectChangeWasNotSuccessful
const & dbe_err )
127bool movobj (
tref obj, std::string
const & destination, QUuid
const & src )
131 std::string
const description
132 {
"Object " + obj.UID() +
"@" + obj.class_name() +
" contained in " + obj.contained_in()
133 +
" moved to " + destination
145 catch ( daq::dbe::ObjectChangeWasNotSuccessful
const & dbe_err )
156 std::vector<std::string>
const & others_names )
164 others_names.size() != 1 ?
"Multi Relationship : " + linkinfo.
p_name :
165 "Single Relationship : " + linkinfo.
p_name );
174 catch ( daq::dbe::ObjectChangeWasNotSuccessful
const & dbe_err )
189 Change.
uid = Object.
UID();
192 Change.
description = QString (
"Attribute " ).append ( AttributeData.
p_name.c_str() )
224 catch ( daq::dbe::ObjectChangeWasNotSuccessful
const & dbe_err )
235 std::vector<std::string> Value )
240 Change.
uid = Object.UID();
243 Change.
description = QString (
"Attribute " ).append ( AttributeData.p_name.c_str() )
279 catch ( daq::dbe::ObjectChangeWasNotSuccessful
const & dbe_err )
296void remove ( QString
const & db, QString
const & fn )
298 std::string dbname = db.toStdString();
299 std::string sinclude = fn.toStdString();
306 Change.
description = QString (
"File(deleted) : " ).append ( fn ).toStdString();
311 catch ( daq::dbe::DatabaseChangeNotSuccessful
const & dbe_err )
318void add (
const QString & Database,
const QString & IncludedFile )
320 std::string dbname = Database.toStdString();
321 std::string sinclude = IncludedFile.toStdString();
326 Change.
filename = IncludedFile.toStdString();
328 Change.
description = QString (
"File(included) : " ).append ( IncludedFile ).toStdString();
333 catch ( daq::dbe::DatabaseChangeNotSuccessful
const & dbe_err )
static t_undo_stack_cptr get_commands()
static t_internal_changes_stack_cptr get_internal_change_stack()
std::string class_name() const
void remove(QString const &db, QString const &fn)
void add(QString const &db, QString const &fn)
void modobj< std::string >(tref Object, const dunedaq::conffwk::attribute_t &AttributeData, std::string Value)
void newobj(std::string const &fn, std::string const &class_name, std::string const &UID, dbe::t_config_object_preimage::type_attrmap const &attributes, dbe::t_config_object_preimage::type_relmap const &relations, QUuid const &src)
bool renobj(inner::configobject::tref obj, std::string const &newuuid, QUuid const &src)
void modobj(tref Object, dunedaq::conffwk::attribute_t const &AttributeData, T Value)
bool movobj(inner::configobject::tref obj, std::string const &destination, QUuid const &src)
bool delobj(inner::configobject::tref obj, QUuid const &src)
std::string const parse(ers::Issue const &)
modification request
Type of modification.
std::string uid
Object Identification.
M< type_str, type_attributes > type_attrmap
M< type_str, type_images > type_relmap