Commit aa79a3e0 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Clipboard: rename persistance data calls

parent 241f957f
......@@ -4,11 +4,11 @@
using namespace corryvreckan;
void Clipboard::put_persistent(std::string name, double value) {
void Clipboard::putPersistentData(std::string name, double value) {
m_persistent_data[name] = value;
}
double Clipboard::get_persistent(std::string name) const {
double Clipboard::getPersistentData(std::string name) const {
try {
return m_persistent_data.at(name);
} catch(std::out_of_range&) {
......@@ -16,6 +16,10 @@ double Clipboard::get_persistent(std::string name) const {
}
}
bool Clipboard::hasPersistentData(std::string name) const {
return m_persistent_data.find(name) != m_persistent_data.end();
}
bool Clipboard::event_defined() const {
return (m_event != nullptr);
}
......@@ -36,10 +40,6 @@ std::shared_ptr<Event> Clipboard::get_event() const {
return m_event;
}
bool Clipboard::has_persistent(std::string name) const {
return m_persistent_data.find(name) != m_persistent_data.end();
}
void Clipboard::clear() {
// Loop over all data types
for(auto block = m_data.cbegin(); block != m_data.cend();) {
......
......@@ -84,7 +84,7 @@ namespace corryvreckan {
* @param name Name of the variable
* @param value Value to be stored
*/
void put_persistent(std::string name, double value);
void putPersistentData(std::string name, double value);
/**
* @brief Retrieve variable from the persistent clipboard storage
......@@ -92,14 +92,14 @@ namespace corryvreckan {
* @return Stored value from the persistent clipboard storage
* @throws MissingDataError in case the key is not found.
*/
double get_persistent(std::string name) const;
double getPersistentData(std::string name) const;
/**
* @brief Check if variable exists on the persistent clipboard storage
* @param name Name of the variable
* @return True if value exists, false if it does not exist.
*/
bool has_persistent(std::string name) const;
bool hasPersistentData(std::string name) const;
/**
* @brief Get a list of currently held collections on the clipboard event storage
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment