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 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 05/07/2010 Moved implementation from header to this file. :-)
17 // We probably could replace all this crap with QVariant...
18 #include "rs_variable.h"
20 RS_Variable::RS_Variable()
22 type = RS2::VariableVoid;
26 RS_Variable::RS_Variable(const Vector & v, int c)
32 RS_Variable::RS_Variable(const QString & v, int c)
38 RS_Variable::RS_Variable(int v, int c)
44 RS_Variable::RS_Variable(double v, int c)
50 /*virtual*/ RS_Variable::~RS_Variable()
54 void RS_Variable::setString(const QString & str)
57 type = RS2::VariableString;
60 void RS_Variable::setInt(int i)
63 type = RS2::VariableInt;
66 void RS_Variable::setDouble(double d)
69 type = RS2::VariableDouble;
72 void RS_Variable::setVector(const Vector & v)
75 type = RS2::VariableVector;
78 QString RS_Variable::getString()
83 int RS_Variable::getInt()
88 double RS_Variable::getDouble()
93 Vector RS_Variable::getVector()
98 RS2::VariableType RS_Variable::getType()
103 int RS_Variable::getCode()