#include <CogMapObjects.h>
Public Member Functions | |
CMMeasurement () | |
CMMeasurement (const JString &name, unsigned int dim) | |
CMMeasurement (const JString &xml) | |
CMMeasurement (XMLNode *node) | |
~CMMeasurement () | |
JString | toXML () |
bool | fromXML (XMLNode *node) |
JString | print () const |
JString | toHTML () |
JString | toXMLParam (const JString &name) |
bool | fromXMLParam (const JString &name, XMLNode *node) |
Object * | clone () const |
bool | reset () |
double | operator[] (int n) const |
double | getValue (int n) const |
double | getUncertainty (int n) const |
bool | setValue (int n, double value) |
bool | setUncertainty (int n, double value) |
bool | equals (const Object *o) const |
bool | equals (const CMMeasurement &m) const |
bool | equals (const CMMeasurement *m) const |
bool | hasChangedSince (const CMMeasurement &m) |
bool | hasChangedSince (const CMMeasurement *m) |
Public Attributes | |
JString | name |
unsigned | len |
double | value |
double | uncertainty |
JString | units |
double * | values |
double * | uncertainties |
Base class Object
Definition at line 50 of file CogMapObjects.h.
cmlabs::CMMeasurement::CMMeasurement | ( | ) |
public overloaded constructor CMMeasurement This constructs a onedimensional measurement
This function doesn't return a value
Definition at line 25 of file CogMapObjects.cpp.
cmlabs::CMMeasurement::CMMeasurement | ( | const JString & | name, | |
unsigned int | dim | |||
) |
public overloaded constructor CMMeasurement This constructs a multidimensional measurement
[in] | name | type const JString & the name of the measurement |
[in] | dim | type unsigned int the dimensionality of the measurement |
Definition at line 32 of file CogMapObjects.cpp.
cmlabs::CMMeasurement::CMMeasurement | ( | const JString & | xml | ) |
public overloaded constructor CMMeasurement This constructs a measurement from XML
[in] | xml | type const JString & raw XML |
Definition at line 57 of file CogMapObjects.cpp.
cmlabs::CMMeasurement::CMMeasurement | ( | XMLNode * | node | ) |
public overloaded constructor CMMeasurement This constructs a measurement from an XML node
[in,out] | node | type XMLNode * node containing interpreted XML |
Definition at line 65 of file CogMapObjects.cpp.
cmlabs::CMMeasurement::~CMMeasurement | ( | ) |
public virtual destructor ~CMMeasurement
This function doesn't return a value
Definition at line 46 of file CogMapObjects.cpp.
JString cmlabs::CMMeasurement::toXML | ( | ) | [virtual] |
public virtual toXML The toXML method converts the object to XML and returns this as a JString
Reimplemented from cmlabs::Object.
Definition at line 186 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::fromXML | ( | XMLNode * | node | ) | [virtual] |
public virtual fromXML The fromXML method returns reads in the XML and overwrites the values of the object with the data stored in the XML
obj->fromXML(xmlNode);
[in,out] | node | type XMLNode * contains the interpreted XML |
Reimplemented from cmlabs::Object.
Definition at line 152 of file CogMapObjects.cpp.
JString cmlabs::CMMeasurement::print | ( | ) | const |
JString cmlabs::CMMeasurement::toHTML | ( | ) | [virtual] |
public virtual toHTML The toHTML method describes the object as HTML by returning a JString ...
html = obj->toHTML();
Reimplemented from cmlabs::Object.
Definition at line 232 of file CogMapObjects.cpp.
public toXMLParam The toXMLParam method returns a string with the XML parameters for this object. This is mainly used if the parent object wants to put this child object into the XML as a parameter instead of a subtag.
example: <xxx name="34" name_uncertainty="12" ... >
[in] | name | type const JString & parameter name |
Definition at line 216 of file CogMapObjects.cpp.
public fromXMLParam The fromXMLParam method reads in the values from the parameter field of the XMLNode basically the reverse of toXMLParam
Definition at line 206 of file CogMapObjects.cpp.
Object * cmlabs::CMMeasurement::clone | ( | ) | const [virtual] |
public virtual constant clone The clone method returns a copy of the object as an Object *
obj2 = (CMMeasurement*) obj->clone();
Implements cmlabs::Object.
Definition at line 73 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::reset | ( | ) |
public reset The reset method resets all the values to CMMEASUREMENT_NOVALUE
obj->reset();
Definition at line 84 of file CogMapObjects.cpp.
double cmlabs::CMMeasurement::operator[] | ( | int | n | ) | const |
public constant operator [] The operator [] method returns the value at position N
value = obj[3];
[in] | n | type int position of value |
Definition at line 238 of file CogMapObjects.cpp.
double cmlabs::CMMeasurement::getValue | ( | int | n | ) | const |
public constant getValue The getValue method returns the value at position N
value = obj->getValue(3);
[in] | n | type int position of value |
Definition at line 242 of file CogMapObjects.cpp.
double cmlabs::CMMeasurement::getUncertainty | ( | int | n | ) | const |
public constant getUncertainty The getUncertainty method returns uncertainty of the value at position N ...
value = obj->getUncertainty(3);
[in] | n | type int position of value |
Definition at line 253 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::setValue | ( | int | n, | |
double | value | |||
) |
public setValue The setValue method sets the value at position N
obj->setValue(15.2);
[in] | n | type int position of value |
[in] | value | type double value to be set |
Definition at line 264 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::setUncertainty | ( | int | n, | |
double | value | |||
) |
public setUncertainty The setUncertainty method sets the uncertainty of the value at position N ...
obj->setUncertainty(15.2);
[in] | n | type int position of uncertainty |
[in] | value | type double value to be set |
Definition at line 277 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::equals | ( | const Object * | o | ) | const [virtual] |
public virtual overloaded constant equals The equals method returns true if the two measurements are identical. Version that accepts any CoreLibrary Object and returns false if the wrong object type is compared.
obj2->equals(obj1);
Reimplemented from cmlabs::Object.
Definition at line 96 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::equals | ( | const CMMeasurement & | m | ) | const |
public overloaded constant equals The equals method returns true if the two measurements are identical.
obj2->equals(obj1);
[in] | m | type const CMMeasurement & measurement to be compared |
Definition at line 103 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::equals | ( | const CMMeasurement * | m | ) | const |
public overloaded constant equals The equals method returns true if the two measurements are identical.
obj2->equals(obj1);
[in] | m | type const CMMeasurement * measurement to be compared |
Definition at line 107 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::hasChangedSince | ( | const CMMeasurement & | m | ) |
public overloaded hasChangedSince The hasChangedSince method returns true if the measurement has changed since the last measurement was taken
[in] | m | type const CMMeasurement & last measurement |
Definition at line 123 of file CogMapObjects.cpp.
bool cmlabs::CMMeasurement::hasChangedSince | ( | const CMMeasurement * | m | ) |
public overloaded hasChangedSince The hasChangedSince method returns true if the measurement has changed since the last measurement was taken ...
[in] | m | type const CMMeasurement * last measurement |
Definition at line 127 of file CogMapObjects.cpp.
JString name Name of measurement
Definition at line 515 of file CogMapObjects.h.
unsigned cmlabs::CMMeasurement::len |
unsigned int len Dimensionality of measurement
Definition at line 525 of file CogMapObjects.h.
double cmlabs::CMMeasurement::value |
double value Value of measurement
Definition at line 535 of file CogMapObjects.h.
double uncertainty Uncertainty of measurement
Definition at line 545 of file CogMapObjects.h.
JString units The optional unit of the measurement in text
Definition at line 555 of file CogMapObjects.h.
double* cmlabs::CMMeasurement::values |
double * values The array of values for multidimensional data
Definition at line 565 of file CogMapObjects.h.
double * uncertainties The array of value uncertainties for multidimensional data
Definition at line 575 of file CogMapObjects.h.