a lot of work on th map-creator
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
#include <Indoor/geo/Point3.h>
|
||||
|
||||
enum class ParamType {
|
||||
NOT_AVAILABLE,
|
||||
BOOL,
|
||||
INT,
|
||||
FLOAT,
|
||||
STRING,
|
||||
@@ -18,6 +20,7 @@ class ParamValue {
|
||||
|
||||
private:
|
||||
union {
|
||||
bool _bool;
|
||||
int _int;
|
||||
float _float;
|
||||
float _arr[3];
|
||||
@@ -31,16 +34,18 @@ public:
|
||||
}
|
||||
|
||||
void setValue(const std::string& val) {_str = val;}
|
||||
void setValue(float val) {_float = val;}
|
||||
void setValue(int val) {_int = val;}
|
||||
void setValue(Point2 p) {_arr[0] = p.x; _arr[1] = p.y;}
|
||||
void setValue(Point3 p) {_arr[0] = p.x; _arr[1] = p.y; _arr[2] = p.z;}
|
||||
void setValue(const float val) {_float = val;}
|
||||
void setValue(const int val) {_int = val;}
|
||||
void setValue(const bool val) {_bool = val;}
|
||||
void setValue(const Point2 p) {_arr[0] = p.x; _arr[1] = p.y;}
|
||||
void setValue(const Point3 p) {_arr[0] = p.x; _arr[1] = p.y; _arr[2] = p.z;}
|
||||
|
||||
Point2 toPoint2() const {return Point2(_arr[0], _arr[1]);}
|
||||
Point3 toPoint3() const {return Point3(_arr[0], _arr[1], _arr[2]);}
|
||||
std::string toString() const {return _str;}
|
||||
float toFloat() const {return _float;}
|
||||
int toInt() const {return _int;}
|
||||
bool toBool() const {return _bool;}
|
||||
|
||||
};
|
||||
|
||||
@@ -66,9 +71,23 @@ public:
|
||||
//};
|
||||
|
||||
struct Param {
|
||||
|
||||
/** parameter name */
|
||||
std::string name;
|
||||
|
||||
/** parameter type */
|
||||
ParamType type;
|
||||
Param(const std::string& name, const ParamType type) : name(name), type(type) {;}
|
||||
|
||||
/** read-only parameter? */
|
||||
bool readOnly;
|
||||
|
||||
|
||||
/** ctor */
|
||||
Param(const std::string& name, const ParamType type, const bool readOnly = false) : name(name), type(type), readOnly(readOnly) {;}
|
||||
|
||||
/** special parameter */
|
||||
static Param getNA() { return Param("", ParamType::NOT_AVAILABLE); }
|
||||
|
||||
};
|
||||
|
||||
/** free parameters */
|
||||
|
||||
Reference in New Issue
Block a user