![]() |
IRSOL
C++ code implementing socket server for interacting with Baumer camera.
|
Represents an assignment operation in the protocol. More...
#include <assignment.hpp>
Public Member Functions | |
| Assignment (const std::string &identifier, irsol::types::protocol_value_t value) | |
| Constructs an Assignment. | |
| std::string | toString () const |
| Converts the assignment to a human-readable string. | |
| bool | hasInt () const |
| bool | hasDouble () const |
| bool | hasString () const |
Public Attributes | |
| std::string | identifier |
| The variable or parameter name being assigned. | |
| irsol::types::protocol_value_t | value |
| The value assigned to the identifier (int, double, or string). | |
Represents an assignment operation in the protocol.
An assignment consists of an identifier and a value, which can be an integer, double, or string. Typically corresponds to input like x=42.
Can be stored in a irsol::protocol::InMessage variant.
Definition at line 31 of file assignment.hpp.
| irsol::protocol::Assignment::Assignment | ( | const std::string & | identifier, |
| irsol::types::protocol_value_t | value | ||
| ) |
Constructs an Assignment.
| identifier | The identifier string; must start with a character and contain alphanumeric characters or underscores. |
| value | The value to assign (int, double, or string). |
Definition at line 11 of file assignment.cpp.
| bool irsol::protocol::Assignment::hasDouble | ( | ) | const |
Definition at line 42 of file assignment.cpp.
| bool irsol::protocol::Assignment::hasInt | ( | ) | const |
Definition at line 36 of file assignment.cpp.
| bool irsol::protocol::Assignment::hasString | ( | ) | const |
Definition at line 48 of file assignment.cpp.
| std::string irsol::protocol::Assignment::toString | ( | ) | const |
Converts the assignment to a human-readable string.
Definition at line 16 of file assignment.cpp.
| std::string irsol::protocol::Assignment::identifier |
The variable or parameter name being assigned.
Definition at line 42 of file assignment.hpp.
| irsol::types::protocol_value_t irsol::protocol::Assignment::value |
The value assigned to the identifier (int, double, or string).
Definition at line 45 of file assignment.hpp.