|
ifw-ccf 5.0.2
|
Interface to the OLDB and Pub/Sub. More...
#include <db.hpp>
Public Member Functions | |
| Db () | |
| Constructor. The prefix indicates location in database of this application. | |
| virtual | ~Db () |
| std::string | GenDbPath (const std::vector< std::string > &db_key_els) |
| Generate proper DB name. | |
| std::map< std::string, std::string > | Scan (const std::string &key, const std::string &pattern) |
| Scan the namespace of the associated DB, applying the key and pattern. | |
| bool | IsConnected () |
| Check if connected to the associated database(s). | |
| std::string | GetSmState () |
| std::string | GetSmStatusState () |
| std::string | GetSmStatusSubstate () |
| void | UpdateSmStatus (std::list< scxml4cpp::State * > &status) |
| Update the state/substate/status in the OLDB/PubSub. | |
| void | UpdateSmStatus (const std::string &status) |
| Update the state/substate/status in the OLDB/PubSub. | |
| void | PublishRecStatus (const recif::RecStatus &rec_status) |
| Update the current Recording Status in Pub/Sub. | |
| template<class TYPE > | |
| TYPE | Get (const std::string &db_key) |
| Get value for the given key. | |
| template<class TYPE > | |
| TYPE | Get2 (const std::vector< std::string > &db_key_els) |
| Get value for the given key. | |
| std::string | GetAsStr (const std::string &db_key) |
| Get the attribute as string, in case the type is not know. | |
| template<class TYPE > | |
| void | Set (const std::string &db_key, const TYPE value, const bool force_update=false) |
| Set the referenced key to the given value. | |
| template<class TYPE > | |
| void | Set2 (const std::vector< std::string > &db_key_els, const TYPE value, const bool force_update=false) |
| Set the referenced key to the given value. | |
| void | SetFromStr (const std::string &db_key, const std::string &par_name, const std::string &value, const bool force_update=false) |
| Write the parameter, which values is provided as a string, to the OLDB. | |
| void | SetFromStr2 (const std::vector< std::string > &db_key_els, const std::string &par_name, const std::string &value, const bool force_update=false) |
| Write the parameter, which values is provided as a string, to the OLDB. | |
| void | SetFromStr (const std::string &db_key, const std::string &value, const ifw::fnd::datatype::DataType data_type, const bool force_update=false) |
| Set the value from a string, applying the given IFW data type. | |
| void | SetFromStr2 (const std::vector< std::string > &db_key_els, const std::string &value, const ifw::fnd::datatype::DataType data_type, const bool force_update=false) |
| Set the value from a string, applying the given IFW data type. | |
| void | TestConnection () |
| Test if the connection to the OLDB is working properly. | |
| void | UpdateStagingSetupInDb () |
| Update the current Staging Setup buffered in the DB. | |
| ifw::core::utils::bat::DbInterface & | GetBatDb () |
| Get reference to BAT DB handle. | |
| Db (const Db &)=delete | |
| Db & | operator= (const Db &)=delete |
| Disable copy constructor. | |
Static Public Member Functions | |
| static Db & | Instance () |
| Return reference to Singleton instance of the application class. | |
| static void | Simulate () |
| Put the object in simulation, using an internal map as DB. | |
| static bool | IsSimulated () |
Static Public Attributes | |
| static Db * | s_instance = nullptr |
| Singleton instance. | |
Interface to the OLDB and Pub/Sub.
| ifw::ccf::common::Db::Db | ( | ) |
Constructor. The prefix indicates location in database of this application.
|
virtual |
| std::string ifw::ccf::common::Db::GenDbPath | ( | const std::vector< std::string > & | db_key_els | ) |
Generate proper DB name.
|
inline |
Get value for the given key.
Get value for the given key.
| std::string ifw::ccf::common::Db::GetAsStr | ( | const std::string & | db_key | ) |
Get the attribute as string, in case the type is not know.
| ifw::core::utils::bat::DbInterface & ifw::ccf::common::Db::GetBatDb | ( | ) |
Get reference to BAT DB handle.
| std::string ifw::ccf::common::Db::GetSmState | ( | ) |
| std::string ifw::ccf::common::Db::GetSmStatusState | ( | ) |
| std::string ifw::ccf::common::Db::GetSmStatusSubstate | ( | ) |
|
static |
Return reference to Singleton instance of the application class.
| bool ifw::ccf::common::Db::IsConnected | ( | ) |
Check if connected to the associated database(s).
|
static |
|
delete |
Disable copy constructor.
Update the current Recording Status in Pub/Sub.
| std::map< std::string, std::string > ifw::ccf::common::Db::Scan | ( | const std::string & | key, |
| const std::string & | pattern ) |
Scan the namespace of the associated DB, applying the key and pattern.
|
inline |
Set the referenced key to the given value.
|
inline |
Set the referenced key to the given value.
| void ifw::ccf::common::Db::SetFromStr | ( | const std::string & | db_key, |
| const std::string & | par_name, | ||
| const std::string & | value, | ||
| const bool | force_update = false ) |
Write the parameter, which values is provided as a string, to the OLDB.
| void ifw::ccf::common::Db::SetFromStr | ( | const std::string & | db_key, |
| const std::string & | value, | ||
| const ifw::fnd::datatype::DataType | data_type, | ||
| const bool | force_update = false ) |
Set the value from a string, applying the given IFW data type.
| void ifw::ccf::common::Db::SetFromStr2 | ( | const std::vector< std::string > & | db_key_els, |
| const std::string & | par_name, | ||
| const std::string & | value, | ||
| const bool | force_update = false ) |
Write the parameter, which values is provided as a string, to the OLDB.
| void ifw::ccf::common::Db::SetFromStr2 | ( | const std::vector< std::string > & | db_key_els, |
| const std::string & | value, | ||
| const ifw::fnd::datatype::DataType | data_type, | ||
| const bool | force_update = false ) |
Set the value from a string, applying the given IFW data type.
|
static |
Put the object in simulation, using an internal map as DB.
| void ifw::ccf::common::Db::TestConnection | ( | ) |
Test if the connection to the OLDB is working properly.
Update the state/substate/status in the OLDB/PubSub.
| void ifw::ccf::common::Db::UpdateSmStatus | ( | std::list< scxml4cpp::State * > & | status | ) |
Update the state/substate/status in the OLDB/PubSub.
| void ifw::ccf::common::Db::UpdateStagingSetupInDb | ( | ) |
Update the current Staging Setup buffered in the DB.