28#ifndef _cmnGenericObject_h
29#define _cmnGenericObject_h
94 virtual void ToStream(std::ostream & outputStream)
const;
101 virtual void ToStreamRaw(std::ostream & outputStream,
const char delimiter =
' ',
102 bool headerOnly =
false,
const std::string & headerPrefix =
"")
const;
106 virtual bool FromStreamRaw(std::istream & inputStream,
const char delimiter =
' ');
146 cmnThrow(std::out_of_range(
"cmnGenericObject::Scalar base method called, no scalar"));
155 cmnThrow(std::out_of_range(
"cmnGenericObject::ScalarDescription base method called, no scalar"));
156 return "index out of range";
160 virtual void SerializeTextJSON(Json::Value &
CMN_UNUSED(jsonValue))
const {};
161 virtual void DeSerializeTextJSON(
const Json::Value &
CMN_UNUSED(jsonValue))
171 object.ToStream(output);
Base class for class services.
Definition cmnClassServicesBase.h:46
Base class for high level objects.
Definition cmnGenericObject.h:53
virtual std::string ScalarDescription(const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const
Definition cmnGenericObject.h:154
virtual void DeSerializeRaw(std::istream &inputStream)
virtual double Scalar(const size_t CMN_UNUSED(index)) const CISST_THROW(std
Definition cmnGenericObject.h:145
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=' ')
bool ReconstructFrom(const cmnGenericObject &other)
virtual size_t ScalarNumber(void) const
Definition cmnGenericObject.h:129
virtual const cmnClassServicesBase * Services(void) const =0
virtual void ToStream(std::ostream &outputStream) const
virtual cmnLogger::StreamBufType * GetLogMultiplexer(void) const
virtual void SerializeRaw(std::ostream &outputStream) const
virtual bool ScalarNumberIsFixed(void) const
Definition cmnGenericObject.h:138
virtual ~cmnGenericObject(void)
Definition cmnGenericObject.h:57
std::string ToString(void) const
cmnLODMultiplexerStreambuf< char > StreamBufType
Definition cmnLogger.h:246
Class register definitions and log macros.
Class registration macros.
Defines cmnClassServices.
Macros to export the symbols of cisstCommon (in a Dll).
#define CISST_EXPORT
Definition cmnExportMacros.h:50
std::ostream & operator<<(std::ostream &output, const cmnGenericObject &object)
Definition cmnGenericObject.h:169
Declaration of cmnLogger amd macros for human readable logging.
Portability across compilers and operating systems tools.
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
#define CISST_THROW(exceptionParameter)
Somewhat portable compilation warning message. This works with very recent versions of gcc (4....
Definition cmnPortability.h:559
Declaration of the template function cmnThrow.
void cmnThrow(const _exceptionType &except, cmnLogLevel lod=CMN_LOG_LEVEL_INIT_ERROR)
Definition cmnThrow.h:76