cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
mtsGenericObject Class Reference

Base class for data object in cisstMultiTask. More...

#include <mtsGenericObject.h>

Inheritance diagram for mtsGenericObject:
cmnGenericObject ireTaskConstructorArg mtsCANBusFrame mtsComponentConstructorNameAndArg< T > mtsConnection mtsEventHandlerList mtsFixedSizeVector< _elementType, _size > mtsGenericObjectProxyBase< _elementType > mtsGenericObjectProxyBase< bool > mtsGenericObjectProxyBase< double > mtsGenericObjectProxyBase< float > mtsGenericObjectProxyBase< int > mtsGenericObjectProxyBase< std::string > mtsHistoryBase mtsIntervalStatistics mtsLogMessage mtsMatrix< _elementType > mtsMatrix< double > mtsQtApplicationConstructorArg mtsSocketProxyClientConstructorArg mtsSocketProxyInitData mtsSocketProxyServerConstructorArg mtsStateIndex mtsStateTable::IndexRange mtsStealthFrame mtsStealthFrame mtsStealthProbeCal mtsStealthProbeCal mtsStealthRegistration mtsStealthRegistration mtsStealthTool mtsStealthTool mtsTaskContinuousConstructorArg mtsTaskPeriodicConstructorArg mtsVector< _elementType > mtsVector< bool > mtsVector< double > mtsVector< short > mtsVector< unsigned char > mtsVFBase prmActuatorParameters prmActuatorState prmEventButton prmFixtureGainCartesianSet prmForceCartesianGet prmGainParameters prmIMUSensors prmMaskedVector< _elementType > prmMotionBase prmPositionCartesianGet prmPositionJointGet prmRobotState prmStateJoint prmVelocityCartesianGet prmVelocityJointGet svlSample

Public Member Functions

 mtsGenericObject (void)
 
 mtsGenericObject (double timestamp, bool automaticTimestamp, bool valid)
 
 mtsGenericObject (const mtsGenericObject &other)
 
virtual ~mtsGenericObject (void)
 
bool SetTimestampIfAutomatic (double timestamp)
 
virtual void ToStream (std::ostream &outputStream) const
 
virtual void ToStreamRaw (std::ostream &outputStream, const char delimiter= ' ', bool headerOnly=false, const std::string &headerPrefix="") const
 
virtual bool FromStreamRaw (std::istream &inputStream, const char delimiter= ' ')
 
virtual void SerializeRaw (std::ostream &outputStream) const
 
virtual void DeSerializeRaw (std::istream &inputStream)
 
size_t ScalarNumber (void) const
 
bool ScalarNumberIsFixed (void) const
 
double Scalar (const size_t index) const throw (std::out_of_range)
 
std::string ScalarDescription (const size_t index, const std::string &userDescription="") const throw (std::out_of_range)
 
- Public Member Functions inherited from cmnGenericObject
virtual ~cmnGenericObject (void)
 
virtual const
cmnClassServicesBase
Services (void) const =0
 
bool ReconstructFrom (const cmnGenericObject &other)
 
std::string ToString (void) const
 
virtual cmnLogger::StreamBufTypeGetLogMultiplexer (void) const
 
virtual double Scalar (const size_t CMN_UNUSED(index)) const throw (std::out_of_range)
 
virtual std::string ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const
 

Detailed Description

Base class for data object in cisstMultiTask.

See Also
cmnGenericObject

Constructor & Destructor Documentation

mtsGenericObject::mtsGenericObject ( void  )
inline

Constructor, initialize Timestamp to 0 and Valid flag to false.

mtsGenericObject::mtsGenericObject ( double  timestamp,
bool  automaticTimestamp,
bool  valid 
)
inline

Constructor with initialization for each member

mtsGenericObject::mtsGenericObject ( const mtsGenericObject other)
inline

Copy constructor

virtual mtsGenericObject::~mtsGenericObject ( void  )
inlinevirtual

Destructor. Does nothing specific.

Member Function Documentation

virtual void mtsGenericObject::DeSerializeRaw ( std::istream &  inputStream)
virtual

Binary deserialization

Reimplemented from cmnGenericObject.

Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, svlSampleImageCustom< _ValueType, _DataChannels, _VideoChannels >, svlSampleImageCustom< float, 3, 1 >, svlSampleImageCustom< unsigned char, 3, 1 >, prmPositionCartesianSet, prmVelocityCartesianSet, prmFixtureGainCartesianSet, svlSampleMatrixCustom< _ValueType >, svlSampleMatrixCustom< float >, mtsStateIndex, mtsIntervalStatistics, prmActuatorState, mtsMatrix< _elementType >, mtsMatrix< double >, prmMaskedVector< _elementType >, prmGainParameters, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, mtsSocketProxyInitData, mtsStealthTool, prmVelocityCartesianGet, prmVelocityJointSet, mtsFixedSizeVector< _elementType, _size >, mtsLogMessage, prmIMUSensors, prmStateJoint, prmMotionBase, prmPositionJointSet, prmForceCartesianSet, prmVelocityJointGet, mtsConnection, prmForceCartesianGet, prmPositionCartesianGet, prmActuatorParameters, prmEventButton, prmForceTorqueJointSet, prmPositionJointGet, mtsStealthTool, mtsComponentConstructorNameAndArg< T >, prmRobotState, mtsEventHandlerList, svlSampleCameraGeometry, mtsQtApplicationConstructorArg, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, svlSampleImage, mtsTaskContinuousConstructorArg, svlSampleMatrix, svlSampleBlobs, svlSampleTargets, svlSampleText, svlSampleTransform3D, svlSample, and svlSampleCUDAImage.

virtual bool mtsGenericObject::FromStreamRaw ( std::istream &  inputStream,
const char  delimiter = ' ' 
)
virtual
double mtsGenericObject::Scalar ( const size_t  index) const
throw (std::out_of_range
)
std::string mtsGenericObject::ScalarDescription ( const size_t  index,
const std::string &  userDescription = "" 
) const
throw (std::out_of_range
)
size_t mtsGenericObject::ScalarNumber ( void  ) const
virtual

Methods for data visualization. Derived classes should override the following methods in order to be properly processed by the data visualizer of the global component manager.

Return a number of data (which can be visualized, i.e., type-casted to double)

Reimplemented from cmnGenericObject.

Reimplemented in prmFixtureGainCartesianSet, prmIMUSensors, prmStateJoint, prmPositionCartesianGet, and prmPositionJointGet.

bool mtsGenericObject::ScalarNumberIsFixed ( void  ) const
virtual

Indicates if this object has a fixed number of scalars. This is used for arrays of object in order to optimize random access for a given scalar. When defining an object with a fixed number of scalars, overloading this method to return true allows some optimizations.

Reimplemented from cmnGenericObject.

Reimplemented in prmFixtureGainCartesianSet, prmIMUSensors, prmStateJoint, prmPositionCartesianGet, and prmPositionJointGet.

virtual void mtsGenericObject::SerializeRaw ( std::ostream &  outputStream) const
virtual

Binary serialization

Reimplemented from cmnGenericObject.

Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, svlSampleImageCustom< _ValueType, _DataChannels, _VideoChannels >, svlSampleImageCustom< float, 3, 1 >, svlSampleImageCustom< unsigned char, 3, 1 >, prmPositionCartesianSet, prmVelocityCartesianSet, prmFixtureGainCartesianSet, svlSampleMatrixCustom< _ValueType >, svlSampleMatrixCustom< float >, mtsStateIndex, mtsIntervalStatistics, prmActuatorState, mtsMatrix< _elementType >, mtsMatrix< double >, prmMaskedVector< _elementType >, mtsSocketProxyInitData, mtsStealthTool, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, mtsLogMessage, prmVelocityCartesianGet, prmVelocityJointSet, prmGainParameters, prmIMUSensors, mtsFixedSizeVector< _elementType, _size >, prmStateJoint, prmMotionBase, prmPositionJointSet, prmForceCartesianSet, prmVelocityJointGet, mtsConnection, prmForceCartesianGet, prmPositionCartesianGet, prmPositionJointGet, prmActuatorParameters, prmEventButton, prmForceTorqueJointSet, mtsStealthTool, mtsEventHandlerList, svlSampleCameraGeometry, prmRobotState, mtsComponentConstructorNameAndArg< T >, mtsQtApplicationConstructorArg, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, svlSampleImage, mtsTaskContinuousConstructorArg, svlSampleMatrix, svlSampleBlobs, svlSampleTargets, svlSampleText, svlSampleTransform3D, svlSample, and svlSampleCUDAImage.

bool mtsGenericObject::SetTimestampIfAutomatic ( double  timestamp)

Set timestamp if AutomaticTimeStamp is set to true. This is only meaningful if the derived class contains a timestamp and overrides this method.

Parameters
timeStamptime stamp in seconds
Returns
true if time stamp was set.
virtual void mtsGenericObject::ToStream ( std::ostream &  outputStream) const
virtual

Human readable text output. This method only streams the data members of mtsGenericObject, i.e. the Timestamp and Valid flag. It should be called by any derived class re-implementing ToStream.

Reimplemented from cmnGenericObject.

Reimplemented in mtsGenericObjectProxyRef< _elementType >, mtsGenericObjectProxy< _elementType >, mtsGenericObjectProxy< double >, mtsGenericObjectProxy< std::string >, mtsGenericObjectProxy< float >, mtsGenericObjectProxy< int >, mtsGenericObjectProxy< bool >, mtsStealthProbeCal, prmFixtureGainCartesianSet, mtsStealthRegistration, mtsStealthProbeCal, mtsStealthFrame, mtsStateIndex, mtsStealthRegistration, prmActuatorState, mtsIntervalStatistics, mtsSocketProxyInitData, mtsHistory< _elementType >, prmMaskedVector< _elementType >, mtsStealthTool, mtsStealthFrame, mtsLogMessage, mtsMatrix< _elementType >, mtsMatrix< double >, prmIMUSensors, prmStateJoint, prmVelocityCartesianGet, mtsVector< _elementType >, mtsVector< double >, mtsVector< short >, mtsVector< unsigned char >, mtsVector< bool >, prmGainParameters, mtsComponentConstructorNameAndArg< T >, mtsConnection, mtsFixedSizeVector< _elementType, _size >, prmPositionCartesianGet, prmPositionJointGet, prmForceCartesianSet, prmVelocityJointGet, prmForceCartesianGet, mtsStealthTool, mtsEventHandlerList, mtsQtApplicationConstructorArg, prmEventButton, mtsSocketProxyServerConstructorArg, ireTaskConstructorArg, prmRobotState, mtsSocketProxyClientConstructorArg, mtsTaskPeriodicConstructorArg, and mtsTaskContinuousConstructorArg.

virtual void mtsGenericObject::ToStreamRaw ( std::ostream &  outputStream,
const char  delimiter = ' ',
bool  headerOnly = false,
const std::string &  headerPrefix = "" 
) const
virtual

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