DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <confaccessor.hpp>
Public Types | |
typedef config_internal_change | t_internal_change |
typedef std::stack< t_internal_change, std::vector< t_internal_change > > | t_internal_changes_stack |
typedef cptr< t_internal_changes_stack > | t_internal_changes_stack_cptr |
typedef QUndoStack | t_undo_stack |
typedef cptr< t_undo_stack > | t_undo_stack_cptr |
Public Slots | |
void | GetFileCache (QList< QStringList > &FileCache) |
Signals | |
void | object_created (QString const &source, dref const &obj) |
void | object_renamed (QString const &source, dref const &obj) |
void | object_changed (QString const &source, dref const &obj) |
void | object_deleted (QString const &source, dref const &obj) |
void | db_committed (const std::list< std::string > &files, const std::string &msg) |
void | IncludeFileDone () |
void | RemoveFileDone () |
void | ResetTree () |
void | ExternalChangesDetected () |
void | ExternalChangesAccepted () |
Public Member Functions | |
~confaccessor () | |
void | force_emit_object_created (QString const &, dref const) |
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) |
QList< QStringList > | GetIncludedFileCache () const |
void | addfile (std::string const &db, std::string const &fn) |
void | removefile (std::string const &db, std::string const &fn) |
Static Public Member Functions | |
static confaccessor & | ref () |
static void | init () |
static bool | load (bool subscribeToChanges=true) |
static void | abort () |
static bool | is_database_loaded () |
static bool | enabled () |
static std::list< std::string > | save (QString const &) |
static cptr< datahandler > | gethandler () |
static cptr< ui::config::info > | guiconfig () |
static t_undo_stack_cptr | get_commands () |
static void | clear_commands () |
static t_internal_changes_stack_cptr | get_internal_change_stack () |
static void | setdbinfo (QString const &location, dbinfo const itype=dbinfo::oks) |
static void | setdblocation (const QString &Implementation) |
static bool | check_file_rw (const QString &FileName) |
static QString | dbfullname () |
static QString | db_implementation_name () |
static void | CallbackFunction (const std::vector< dunedaq::conffwk::ConfigurationChange * > &changes, void *parameter) |
static void | unsubscribe () |
static std::list< std::string > | uncommitted_files () |
static int | get_total_objects () |
static void | set_total_objects (int const i) |
static void | increase_total_objects (int const i) |
Private Types | |
typedef std::mutex | t_mutex |
typedef std::lock_guard< t_mutex > | t_lock |
typedef std::vector< ConfigWrapperExternalChange > | t_external_changes_stack |
Private Member Functions | |
void | setenabled () |
void | setdisabled () |
template<dbinfo N> | |
void | set_dbinfo (QString const &p) |
void | docallback (std::vector< dunedaq::conffwk::ConfigurationChange * > const &changes, void *parameter) |
confaccessor () | |
confaccessor (confaccessor const &)=delete | |
confaccessor & | operator= (confaccessor const &)=delete |
Private Attributes | |
QString | this_dblocation |
QString | this_resource_location |
dunedaq::conffwk::Configuration::CallbackId | CallId |
std::shared_ptr< t_internal_changes_stack > | internal_change_stack |
t_external_changes_stack | external_change_stack |
t_undo_stack * | sequenced_command_stack |
datahandler * | editconfig |
ui::config::info * | coreconfig |
QList< QStringList > | IncludedFileCache |
t_mutex | this_change_enabled_mutex |
t_mutex | mut_changes |
t_mutex | force_mut |
bool | this_change_enabled |
int | this_total_objects |
Friends | |
class | dbaccessor |
Definition at line 58 of file confaccessor.hpp.
|
private |
Definition at line 232 of file confaccessor.hpp.
Definition at line 63 of file confaccessor.hpp.
std::stack<t_internal_change, std::vector<t_internal_change> > dbe::confaccessor::t_internal_changes_stack |
Definition at line 65 of file confaccessor.hpp.
Definition at line 66 of file confaccessor.hpp.
|
private |
Definition at line 230 of file confaccessor.hpp.
|
private |
Definition at line 229 of file confaccessor.hpp.
QUndoStack dbe::confaccessor::t_undo_stack |
Definition at line 68 of file confaccessor.hpp.
Definition at line 69 of file confaccessor.hpp.
dbe::confaccessor::~confaccessor | ( | ) |
Definition at line 51 of file confaccessor.cpp.
|
private |
Definition at line 40 of file confaccessor.cpp.
|
privatedelete |
|
static |
Abort all database changes
Definition at line 272 of file confaccessor.cpp.
void dbe::confaccessor::addfile | ( | std::string const & | db, |
std::string const & | fn ) |
Definition at line 386 of file confaccessor.cpp.
|
static |
Definition at line 411 of file confaccessor.cpp.
|
static |
Definition at line 240 of file confaccessor.cpp.
|
static |
Clear internal changes commands
Definition at line 259 of file confaccessor.cpp.
|
signal |
|
static |
Definition at line 125 of file confaccessor.cpp.
|
static |
Definition at line 120 of file confaccessor.cpp.
|
private |
Definition at line 418 of file confaccessor.cpp.
|
static |
Check if changes are allowed
Definition at line 64 of file confaccessor.cpp.
|
signal |
|
signal |
void dbe::confaccessor::force_emit_object_changed | ( | QString const & | src, |
dref const | obj ) |
Force emit an object changed signal from this object
UUID | string representation of the object causing the creation |
the | object that was changed |
Definition at line 103 of file confaccessor.cpp.
void dbe::confaccessor::force_emit_object_created | ( | QString const & | src, |
dref const | obj ) |
Force emit a creation signal from this object
Definition at line 85 of file confaccessor.cpp.
void dbe::confaccessor::force_emit_object_deleted | ( | QString const & | src, |
dref const | obj ) |
Force emit that an object has been deleted
Parameters must be passed by value, because this signal may be emitted from other than QThreads threads, which may cause a temporary to die prematurely in the other thread.
UUID | string representation of the object causing the creation |
a | description of the object having be created |
Definition at line 97 of file confaccessor.cpp.
void dbe::confaccessor::force_emit_object_renamed | ( | QString const & | src, |
dref const | obj ) |
Force emit that an object has been renamed
UUID | string representation of the object causing the creation |
a | description of the object having be changed, actually contains the original name |
Definition at line 91 of file confaccessor.cpp.
|
static |
Get a thread safe pointer to the internal command stack
Definition at line 145 of file confaccessor.cpp.
|
static |
Get a thread safe pointer to the internal change stack
Definition at line 451 of file confaccessor.cpp.
|
static |
Definition at line 154 of file confaccessor.cpp.
|
slot |
Definition at line 112 of file confaccessor.cpp.
|
static |
Get a thread safe pointer to the data handler
Definition at line 133 of file confaccessor.cpp.
QList< QStringList > dbe::confaccessor::GetIncludedFileCache | ( | ) | const |
Definition at line 378 of file confaccessor.cpp.
|
static |
Access the default oks configuration type information
Definition at line 139 of file confaccessor.cpp.
|
signal |
|
static |
Definition at line 159 of file confaccessor.cpp.
|
static |
Must be called to read default OKS configuration type information
Definition at line 347 of file confaccessor.cpp.
|
static |
Check if the underlying database is actually loaded
Definition at line 232 of file confaccessor.cpp.
|
static |
Load the database from the already specified source
Definition at line 286 of file confaccessor.cpp.
|
signal |
|
signal |
|
signal |
|
signal |
|
privatedelete |
|
static |
Retrieve a reference to this singleton
Definition at line 31 of file confaccessor.cpp.
void dbe::confaccessor::removefile | ( | std::string const & | db, |
std::string const & | fn ) |
Definition at line 397 of file confaccessor.cpp.
|
signal |
|
signal |
|
static |
Commit changes to the database
CommitMessage | to enter for the database |
Definition at line 323 of file confaccessor.cpp.
|
private |
Set database information
p | the location string |
|
static |
Definition at line 164 of file confaccessor.cpp.
|
static |
Definition at line 204 of file confaccessor.cpp.
|
static |
Definition at line 227 of file confaccessor.cpp.
|
private |
Definition at line 76 of file confaccessor.cpp.
|
private |
Definition at line 70 of file confaccessor.cpp.
|
static |
Definition at line 278 of file confaccessor.cpp.
|
static |
Definition at line 442 of file confaccessor.cpp.
|
friend |
Definition at line 272 of file confaccessor.hpp.
|
private |
Definition at line 237 of file confaccessor.hpp.
|
private |
Definition at line 244 of file confaccessor.hpp.
|
private |
Definition at line 243 of file confaccessor.hpp.
|
private |
Definition at line 240 of file confaccessor.hpp.
|
mutableprivate |
Definition at line 250 of file confaccessor.hpp.
|
private |
Definition at line 246 of file confaccessor.hpp.
|
private |
Definition at line 239 of file confaccessor.hpp.
|
mutableprivate |
Definition at line 249 of file confaccessor.hpp.
|
private |
Definition at line 241 of file confaccessor.hpp.
|
private |
Definition at line 252 of file confaccessor.hpp.
|
mutableprivate |
Definition at line 248 of file confaccessor.hpp.
|
private |
Definition at line 234 of file confaccessor.hpp.
|
private |
Definition at line 235 of file confaccessor.hpp.
|
private |
Definition at line 254 of file confaccessor.hpp.