Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
aa79a3e0
Commit
aa79a3e0
authored
Sep 10, 2019
by
Simon Spannagel
Browse files
Clipboard: rename persistance data calls
parent
241f957f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/core/clipboard/Clipboard.cpp
View file @
aa79a3e0
...
...
@@ -4,11 +4,11 @@
using
namespace
corryvreckan
;
void
Clipboard
::
put
_p
ersistent
(
std
::
string
name
,
double
value
)
{
void
Clipboard
::
put
P
ersistent
Data
(
std
::
string
name
,
double
value
)
{
m_persistent_data
[
name
]
=
value
;
}
double
Clipboard
::
get
_p
ersistent
(
std
::
string
name
)
const
{
double
Clipboard
::
get
P
ersistent
Data
(
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
();)
{
...
...
src/core/clipboard/Clipboard.hpp
View file @
aa79a3e0
...
...
@@ -84,7 +84,7 @@ namespace corryvreckan {
* @param name Name of the variable
* @param value Value to be stored
*/
void
put
_p
ersistent
(
std
::
string
name
,
double
value
);
void
put
P
ersistent
Data
(
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
_p
ersistent
(
std
::
string
name
)
const
;
double
get
P
ersistent
Data
(
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
_p
ersistent
(
std
::
string
name
)
const
;
bool
has
P
ersistent
Data
(
std
::
string
name
)
const
;
/**
* @brief Get a list of currently held collections on the clipboard event storage
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment