![]() |
Scanframe Modular Application 0.1.0
|
#include <VariableReference.h>
Public Member Functions | |
VariableReference (bool global) | |
Constructor when global is true the reference is added to the global list. | |
~VariableReference () | |
Destructor. | |
void | copy (const VariableReference &ref) |
Copies the members to this instance except for the list and global members. | |
![]() | |
template<typename T > | |
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), data_type > | toDataType (T value) const |
Casts any type to a data_type value. | |
template<typename T > | |
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), T > | fromDataType (data_type value) const |
Casts a data_type value to a given type. | |
Public Attributes | |
bool | _global {false} |
bool | _exported {false} |
bool | _valid {false} |
id_type | _id {0} |
flags_type | _flags {0} |
flags_type | _curFlags {0} |
Value::EType | _type {Value::vitUndefined} |
std::string | _name |
std::string | _description |
std::string | _unit |
Value | _curValue |
Value | _defValue |
Value | _maxValue |
Value | _minValue |
Value | _rndValue |
int | _sigDigits {0} |
State::Vector | _states |
PtrVector | _list |
int | _localActive {0} |
std::string | _convertOption |
std::string | _convertUnit |
Value | _convertCurValue |
Value | _convertDefValue |
Value | _convertMaxValue |
Value | _convertMinValue |
Value | _convertRndValue |
int | _convertSigDigits {0} |
Value | _convertMultiplier |
Value | _convertOffset |
Additional Inherited Members | |
![]() | |
enum | EEvent : int { veConvert = 64000 , veNewId = -32000 , veUserGlobal , veFirstLocal = 0 , veFlagsChange = 1 , veValueChange = 2 , veInvalid = 3 , veConverted = 4 , veUserLocal = 5 , veFirstPrivate = 16000 , veIdChanged = 16001 , veDesiredId = 16002 , veRemove = 16003 , veGetOwner = 16004 , veLostOwner = 16005 , veLinked = 16006 , veUnlinked = 16007 , veSetup = 16008 , veUserPrivate = 16009 } |
Events send to the handler set with sf::Variable::setHandler. More... | |
enum | EField : int { vfId = 0 , vfName , vfUnit , vfFlags , vfDescription , vfType , vfConversionType , vfRound , vfDefault , vfMinimum , vfMaximum , vfFirstState } |
Enumeration of the order of fields in the setup string. More... | |
enum | EFlag : flags_type { flgReadonly = 1 << 0 , flgArchive = 1 << 1 , flgShare = 1 << 2 , flgLink = 1 << 3 , flgFunction = 1 << 4 , flgParameter = 1 << 5 , flgHidden = 1 << 6 , flgExport = 1 << 7 , flgWriteable = 1 << 8 } |
Enumeration type for specifying flags. More... | |
enum | EStringType : int { stNormal = 0 , stMulti , stPath , stDirectory , stFilename , stSubdirectory } |
Enumeration of string types used for filtering. More... | |
typedef TVector< Variable * > | PtrVector |
Vector for pointers to variables. | |
typedef TVector< Variable > | Vector |
Vector for instances of variables. | |
typedef TVector< VariableReference * > | ReferenceVector |
Types for internal use. | |
![]() | |
typedef unsigned long long | id_type |
Type used for the identifying integer (64-bits). | |
typedef int32_t | flags_type |
Type used for the flag integer. | |
typedef size_t | size_type |
Type used for size of vectors. | |
typedef uint64_t | data_type |
Type used for containing a single data element which is the largest integer. | |
typedef int64_t | sdata_type |
Type used for containing a single data element which is the largest signed integer. | |
typedef TVector< id_type > | IdVector |
Vector for lists of information ID's. | |
typedef TVector< InformationBase * > | Vector |
Vector for containing different information base derived classes. | |
![]() | |
static constexpr size_t | npos = std::numeric_limits<size_type>::max() |
Unsigned size value indicating not found or no index. | |
Class referenced by the Variable class which carries the actual data. This type is never directly used.
|
explicit |
Constructor when global is true the reference is added to the global list.
global |
sf::VariableReference::~VariableReference | ( | ) |
Destructor.
void sf::VariableReference::copy | ( | const VariableReference & | ref | ) |
Copies the members to this instance except for the list and global members.
Value sf::VariableReference::_convertCurValue |
Converted current value.
Value sf::VariableReference::_convertDefValue |
Converted default value.
Value sf::VariableReference::_convertMaxValue |
Converted maximum value.
Value sf::VariableReference::_convertMinValue |
Converted minimum value.
Value sf::VariableReference::_convertMultiplier |
Multiplication value for convert calculation.
Value sf::VariableReference::_convertOffset |
offset value for convert calculation.
std::string sf::VariableReference::_convertOption |
Conversion option.
Value sf::VariableReference::_convertRndValue |
Converted rounding value.
int sf::VariableReference::_convertSigDigits {0} |
Significant digits after conversion.
std::string sf::VariableReference::_convertUnit |
Converted unit. String length of unit is used as a flag for conversion enabling.
flags_type sf::VariableReference::_curFlags {0} |
Holds the current flags.
Value sf::VariableReference::_curValue |
current value.
Value sf::VariableReference::_defValue |
Default value.
std::string sf::VariableReference::_description |
Describes the variable.
bool sf::VariableReference::_exported {false} |
Holds the exported flag for local variables.
flags_type sf::VariableReference::_flags {0} |
Holds the flags at creation.
bool sf::VariableReference::_global {false} |
Holds the flag about the global status of this reference.
id_type sf::VariableReference::_id {0} |
In case of a global instance this value is a unique ID.
PtrVector sf::VariableReference::_list |
list of variables attached to this reference.
int sf::VariableReference::_localActive {0} |
Static this counter is increased if a local event is generated.
It is decreased when it returns from the event handler.
Value sf::VariableReference::_maxValue |
Maximum value.
Value sf::VariableReference::_minValue |
Minimum value.
std::string sf::VariableReference::_name |
Name path separated by '|' characters.
Value sf::VariableReference::_rndValue |
Rounding value.
int sf::VariableReference::_sigDigits {0} |
Significant digits based on the round value.
State::Vector sf::VariableReference::_states |
Vector which holds all states of this instance.
Value::EType sf::VariableReference::_type {Value::vitUndefined} |
Holds the internal type of the variable.
std::string sf::VariableReference::_unit |
contains the SI unit or the string filter.
bool sf::VariableReference::_valid {false} |
Holds the valid status of this reference.