cmlabs::CMMeasurement Class Reference

#include <CogMapObjects.h>

Inheritance diagram for cmlabs::CMMeasurement:

Inheritance graph
[legend]
Collaboration diagram for cmlabs::CMMeasurement:

Collaboration graph
[legend]

List of all members.

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)
Objectclone () 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


Detailed Description

CMMeasurement This class will be used to store multidimensional measurements including uncertainties of these

Base class Object

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 50 of file CogMapObjects.h.


Constructor & Destructor Documentation

cmlabs::CMMeasurement::CMMeasurement (  ) 

public overloaded constructor CMMeasurement This constructs a onedimensional measurement

This function doesn't return a value

Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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

Parameters:
[in] name type const JString & the name of the measurement
[in] dim type unsigned int the dimensionality of the measurement
This function doesn't return a value

Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 32 of file CogMapObjects.cpp.

cmlabs::CMMeasurement::CMMeasurement ( const JString xml  ) 

public overloaded constructor CMMeasurement This constructs a measurement from XML

Parameters:
[in] xml type const JString & raw XML
This function doesn't return a value

Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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

Parameters:
[in,out] node type XMLNode * node containing interpreted XML
This function doesn't return a value

Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 65 of file CogMapObjects.cpp.

cmlabs::CMMeasurement::~CMMeasurement (  ) 

public virtual destructor ~CMMeasurement

This function doesn't return a value

Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 46 of file CogMapObjects.cpp.


Member Function Documentation

JString cmlabs::CMMeasurement::toXML (  )  [virtual]

public virtual toXML The toXML method converts the object to XML and returns this as a JString

	       JString xml = obj->toXML();
	    

Returns:
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in,out] node type XMLNode * contains the interpreted XML
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Reimplemented from cmlabs::Object.

Definition at line 152 of file CogMapObjects.cpp.

JString cmlabs::CMMeasurement::print (  )  const

public constant print The print method returns textual information as a JString

	       text = obj->print();
	    

Returns:
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 228 of file CogMapObjects.cpp.

JString cmlabs::CMMeasurement::toHTML (  )  [virtual]

public virtual toHTML The toHTML method describes the object as HTML by returning a JString ...

	      html = obj->toHTML();
	    

Returns:
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Reimplemented from cmlabs::Object.

Definition at line 232 of file CogMapObjects.cpp.

JString cmlabs::CMMeasurement::toXMLParam ( const JString name  ) 

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" ... >
	    

Parameters:
[in] name type const JString & parameter name
Returns:
Remarks:
See also:
fromXMLParam
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 216 of file CogMapObjects.cpp.

bool cmlabs::CMMeasurement::fromXMLParam ( const JString name,
XMLNode node 
)

public fromXMLParam The fromXMLParam method reads in the values from the parameter field of the XMLNode basically the reverse of toXMLParam

Parameters:
[in] name type const JString & parameter name
[in,out] node type XMLNode * XML node
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
toXMLParam
Author:
CMLabs Inc.
Date:
15-02-2007

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(); 
	    

Returns:
  • non-NULL Object * if successful, or
  • NULL if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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();
	    

Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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];
	    

Parameters:
[in] n type int position of value
Returns:
  • double if successful, or
  • 0 if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] n type int position of value
Returns:
  • double if successful, or
  • 0 if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] n type int position of value
Returns:
  • double if successful, or
  • 0 if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] n type int position of value
[in] value type double value to be set
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] n type int position of uncertainty
[in] value type double value to be set
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] o type const Object * CoreLibrary Object to be compared
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] m type const CMMeasurement & measurement to be compared
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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);
	    

Parameters:
[in] m type const CMMeasurement * measurement to be compared
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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

Parameters:
[in] m type const CMMeasurement & last measurement
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

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 ...

	    

Parameters:
[in] m type const CMMeasurement * last measurement
Returns:
  • true if successful, or
  • false if unsuccessful.
Remarks:
See also:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 127 of file CogMapObjects.cpp.


Member Data Documentation

JString name Name of measurement

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 515 of file CogMapObjects.h.

unsigned int len Dimensionality of measurement

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 525 of file CogMapObjects.h.

double value Value of measurement

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 535 of file CogMapObjects.h.

double uncertainty Uncertainty of measurement

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 545 of file CogMapObjects.h.

JString units The optional unit of the measurement in text

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 555 of file CogMapObjects.h.

double * values The array of values for multidimensional data

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 565 of file CogMapObjects.h.

double * uncertainties The array of value uncertainties for multidimensional data

Remarks:
Author:
CMLabs Inc.
Date:
15-02-2007

Definition at line 575 of file CogMapObjects.h.


The documentation for this class was generated from the following files:

Generated on Tue Jul 7 16:24:00 2009 for CoreLibrary by  doxygen 1.5.6