![]() |
Scope
|
#include <ScopeValue.h>
Inherits scope::ScopeValueBase.
Inherited by scope::ScopeNumber< T >.
Public Member Functions | |
| ScopeValue (const T &_value=T(0), const std::wstring &_name=L"None") | |
| ScopeValue & | operator= (const ScopeValue &v) |
| ScopeValue & | operator= (const T &v) |
| T | Value () const |
| T | operator() () const |
| operator T () const | |
| virtual T | Set (const T &_v, const bool &_callguisignal=true, const bool &_callothersignal=true, const bool &_callatnochange=false) |
| void | SetFromString (const std::wstring &str) |
| std::wstring | ToChar () const |
| void | AddToPropertyTree (boost::property_tree::wptree &pt) const |
| void | SetFromPropertyTree (const boost::property_tree::wptree &pt) |
Specializations | |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| void | SetFromString (const std::wstring &str) |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
| template<> | |
| std::wstring | ToChar () const |
Public Member Functions inherited from scope::ScopeValueBase | |
| ScopeValueBase (const std::wstring &_name=L"None") | |
| ScopeValueBase (const ScopeValueBase &_svb) | |
| ScopeValueBase & | operator= (const ScopeValueBase &_svb) |
| virtual | ~ScopeValueBase () |
| std::wstring | Name () const |
| void | SetName (const std::wstring &_name) |
| void | SetRWState (const bool &_state) |
| bool | GetRWState () const |
| boost::signals2::connection | ConnectGUI (signalchange_t::slot_type slot) |
| boost::signals2::connection | ConnectOther (signalchange_t::slot_type slot) |
| boost::signals2::connection | ConnectState (signalstate_t::slot_type slot) |
Protected Member Functions | |
| virtual T | CoerceValue (const T &v) const |
Protected Attributes | |
| T | value |
Protected Attributes inherited from scope::ScopeValueBase | |
| std::wstring | name |
| std::mutex | mutex |
| bool | readwrite |
| signalchange_t | changesiggui |
| signalchange_t | changesigother |
| signalstate_t | statesig |
Additional Inherited Members | |
Protected Types inherited from scope::ScopeValueBase | |
| typedef boost::signals2::signal< void()> | signalchange_t |
| typedef boost::signals2::signal< void(bool)> | signalstate_t |
A templated class for a thread-safe value, with signals to GUI or other stuff that are called on value changes.
Definition at line 11 of file ScopeValue.h.
|
inline |
Construct and set silently.
Definition at line 24 of file ScopeValue.h.
|
inlineprotectedvirtual |
When setting the value it can be coerced by a derivation of this function.
Reimplemented in scope::ScopeNumber< T >, scope::ScopeNumber< uint32_t >, scope::ScopeNumber< double >, scope::ScopeNumber< ValT >, scope::ScopeNumber< uint8_t >, scope::ScopeNumber< scope::ScopeDatatypeBase >, and scope::ScopeNumber< bool >.
Definition at line 20 of file ScopeValue.h.
|
inline |
Safe assignment.
Definition at line 30 of file ScopeValue.h.
|
inline |
Safe assignment.
Definition at line 40 of file ScopeValue.h.
|
inline |
Definition at line 46 of file ScopeValue.h.
|
inline |
Definition at line 52 of file ScopeValue.h.
|
inline |
Definition at line 57 of file ScopeValue.h.
|
inlinevirtual |
Sets the value and calls both change signals if the value actually changed.
| [in] | _v | the new value |
| [in] | _callguisignal | call signal to GUI slots |
| [in] | _callothersignal | call signal to other slots |
| [in] | _callatnochange | call signals also if value did not change |
Definition at line 67 of file ScopeValue.h.
| void scope::ScopeValue< T >::SetFromString | ( | const std::wstring & | str | ) |
Parses a wstring and sets the value accordingly.
See ScopeValue.cpp for specializations.
| std::wstring scope::ScopeValue< T >::ToChar | ( | ) | const |
Converts value into a wstring.
See ScopeValue.cpp for specializations.
|
inline |
Adds the value to a Boost property tree, using its name and value.
Definition at line 103 of file ScopeValue.h.
|
inline |
Set value from a Boost property, using its name as a key.
Definition at line 108 of file ScopeValue.h.
|
protected |
the value proper
Definition at line 16 of file ScopeValue.h.