LineValue Class Reference

#include <line.h>

Inheritance diagram for LineValue:

Value List of all members.

Public Member Functions

virtual QString toString ()
double dx ()
double dy ()
 LineValue ()
 LineValue (Token data)
virtual Data getSaveDescription (QString prefix)

Public Attributes

PointValue a
PointValue b

Protected Member Functions

virtual bool equals_same_type (Value *other)

Detailed Description

Definition at line 7 of file line.h.


Constructor & Destructor Documentation

LineValue::LineValue  )  [inline]
 

Definition at line 15 of file line.h.

00016     {
00017     };

LineValue::LineValue Token  data  )  [inline]
 

Definition at line 18 of file line.h.

00018                         : 
00019     a((Token)data["a"]),
00020     b((Token)data["b"])
00021      {
00022      }


Member Function Documentation

double LineValue::dx  )  [inline]
 

Definition at line 13 of file line.h.

References a, b, and PointValue::x.

00013 {return b.x-a.x;};

double LineValue::dy  )  [inline]
 

Definition at line 14 of file line.h.

References a, b, and PointValue::y.

00014 {return b.y-a.y;};

bool LineValue::equals_same_type Value other  )  [protected, virtual]
 

Implements Value.

Definition at line 11 of file line.cpp.

References a, b, and Value::equals().

00012 {
00013   LineValue * o = (LineValue*)other;
00014   return a.equals(o->a) && b.equals(o->b);
00015 }

virtual Data LineValue::getSaveDescription QString  prefix  )  [inline, virtual]
 

Implements Value.

Definition at line 23 of file line.h.

References a, b, and PointValue::getSaveDescription().

00024     {
00025       Token r;
00026       r["type"]=Symbol("line");
00027       r["a"]=a.getSaveDescription(prefix);
00028       r["b"]=b.getSaveDescription(prefix);
00029       return r;
00030     };

QString LineValue::toString  )  [virtual]
 

Implements Value.

Definition at line 4 of file line.cpp.

References a, b, and PointValue::toString().

00005 {
00006   return QString("(")+a.toString()+
00007     QString(", ")+b.toString()+
00008     QString(")");
00009 }


Member Data Documentation

PointValue LineValue::a
 

Definition at line 10 of file line.h.

Referenced by dx(), dy(), equals_same_type(), getSaveDescription(), LinePicker::nextPoint(), Runtime::straighten(), and toString().

PointValue LineValue::b
 

Definition at line 11 of file line.h.

Referenced by dx(), dy(), equals_same_type(), getSaveDescription(), LinePicker::nextPoint(), Runtime::straighten(), and toString().


The documentation for this class was generated from the following files:
Generated on Mon Jun 5 22:08:43 2006 for iis by  doxygen 1.4.6