Response Class Reference

A rutz::value subclass for observers' responses in a experiment trials. More...

#include <visx/response.h>

Inheritance diagram for Response:

Inheritance graph
[legend]
Collaboration diagram for Response:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

A rutz::value subclass for observers' responses in a experiment trials.

Definition at line 40 of file response.h.


Member Function Documentation

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().


Member Data Documentation

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.


The documentation for this class was generated from the following files:

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:55:43 2008 by Doxygen version 1.5.5.