#include <visx/response.h>
Public Member Functions | |
Response (int v=INVALID_VALUE, int m=-1) | |
virtual rutz::fstring | value_typename () const |
Return a string giving the name of the native type. | |
virtual void | print_to (std::ostream &os) const |
Write the value to a std::ostream . | |
virtual void | scan_from (std::istream &is) |
Read the value from a std::istream . | |
bool | shouldIgnore () const |
bool | is_valid () const |
bool | matchesCorrectValue (int cval) const |
int | val () const |
int | msec () const |
void | setVal (int new_val) |
void | setMsec (int new_val) |
rutz::fstring | get_string () const |
Get an rutz::fstring representation of the value. | |
void | set_string (rutz::fstring val) |
Set the value from an rutz::fstring. | |
Static Public Attributes | |
static const int | INVALID_VALUE = -1 |
static const int | ALWAYS_CORRECT = -2 |
static const int | IGNORE = -3 |
IGNORE means to treat the response as if it never happened. |
Definition at line 40 of file response.h.
rutz::fstring rutz::value::get_string | ( | ) | const [inherited] |
Get an rutz::fstring
representation of the value.
Builds a string stream, calls print_to(), and returns its value.
Definition at line 58 of file value.cc.
References rutz::value::print_to().
void rutz::value::set_string | ( | rutz::fstring | val | ) | [inherited] |
Set the value from an rutz::fstring.
Builds a string stream from val and calling scan_from() with it.
Definition at line 66 of file value.cc.
References rutz::fstring::c_str(), and rutz::value::scan_from().
Referenced by GbVec2< double >::GbVec2(), and GbVec3< double >::GbVec3().
const int Response::IGNORE = -3 [static] |
IGNORE means to treat the response as if it never happened.
For instance, this may be useful in handling key or button events that occur when the user hits an errant key.
Definition at line 49 of file response.h.