3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
8 // JLH = James L. Hammons <jlhamm@acm.org>
11 // --- ---------- -----------------------------------------------------------
12 // JLH 05/07/2010 Moved implementation from header to this file. :-)
15 // We probably could replace all this crap with QVariant...
16 #include "rs_variable.h"
18 RS_Variable::RS_Variable()
20 type = RS2::VariableVoid;
24 RS_Variable::RS_Variable(const Vector & v, int c)
30 RS_Variable::RS_Variable(const QString & v, int c)
36 RS_Variable::RS_Variable(int v, int c)
42 RS_Variable::RS_Variable(double v, int c)
48 /*virtual*/ RS_Variable::~RS_Variable()
52 void RS_Variable::setString(const QString & str)
55 type = RS2::VariableString;
58 void RS_Variable::setInt(int i)
61 type = RS2::VariableInt;
64 void RS_Variable::setDouble(double d)
67 type = RS2::VariableDouble;
70 void RS_Variable::setVector(const Vector & v)
73 type = RS2::VariableVector;
76 QString RS_Variable::getString()
81 int RS_Variable::getInt()
86 double RS_Variable::getDouble()
91 Vector RS_Variable::getVector()
96 RS2::VariableType RS_Variable::getType()
101 int RS_Variable::getCode()