EvalCaseResult.cpp
Go to the documentation of this file.
00001 //
00002 // EvalCaseResult.cpp
00003 //
00004 // A single EvalCaseResult.
00005 //
00006 //
00007 
00008 #include "EvalCaseResult.hpp"
00009 #include "EvalCases.hpp"
00010 #include "../sopas/colaa.hpp"
00011 #include "../tools/errorhandler.hpp"
00012 
00013 #include <sstream>
00014 
00015 
00016 namespace datatypes
00017 {
00018 
00019 
00020 EvalCaseResult::EvalCaseResult () :
00021         uiVersionNo(0),
00022         CaseHdr(),
00023         m_eCaseResult(),
00024         m_sCaseName("no name"),
00025         m_sComment("no comment"),
00026         aTimeBlock()
00027 {
00028         m_datatype = Datatype_EvalCaseResult;
00029 }
00030 
00031 
00032 
00033 // Default destructor
00034 EvalCaseResult::~EvalCaseResult()
00035 {
00036 }
00037 
00038 // Estimate the memory usage of this object.
00039 const UINT32 EvalCaseResult::getUsedMemory() const
00040 {
00041         return sizeof(*this) +
00042                         m_sCaseName.length() +
00043                         m_sComment.length();
00044 }
00045 
00046 
00047 
00048 std::string EvalCaseResult::toString() const
00049 {
00050         std::ostringstream os;
00051         os << "EvalCaseResult members" << std::endl
00052            << "uiVersionNo:           " << uiVersionNo << std::endl
00053            << "CaseHdr: usiNumber:    " << (UINT16)(CaseHdr.usiNumber) << std::endl
00054            << "   udiSysCount:        " << CaseHdr.udiSysCount << std::endl
00055            << "   dDistScaleFactor:   " << CaseHdr.dDistScaleFactor << std::endl
00056            << "   dDistScaleOffset:   " << CaseHdr.dDistScaleOffset << std::endl
00057            << "   uiAngleScaleFactor: " << CaseHdr.uiAngleScaleFactor << std::endl
00058            << "   iAngleScaleOffset:  " << CaseHdr.iAngleScaleOffset << std::endl
00059            << "eCaseResult:           " << (UINT16)(m_eCaseResult) << std::endl
00060            << "aFieldInfringement:    --- not in use ---" << std::endl
00061            << "sCaseName:             " << ">" << m_sCaseName << "<" << std::endl
00062            << "sComment:              " << ">" << m_sComment  << "<" << std::endl
00063            << "aTimeBlock:            " << (UINT16)(aTimeBlock.uiYear)  << ":" << (UINT16)(aTimeBlock.usiMonth)  << ":" << (UINT16)(aTimeBlock.usiDay) << ":"
00064            << (UINT16)(aTimeBlock.usiHour) << ":" << (UINT16)(aTimeBlock.usiMinute) << ":" << (UINT16)(aTimeBlock.usiSec) << ":"
00065            << (UINT32)(aTimeBlock.udiUSec) << std::endl;
00066 
00067         return os.str();
00068 }
00069 
00070 
00071 
00072 std::ostream& operator<< (std::ostream& os, const EvalCaseResult& result)
00073 {
00074         return os << result.toString();
00075 }
00076 
00077 
00078 
00079 } // END namespace datatypes


libsick_ldmrs
Author(s): SICK AG , Martin G√ľnther , Jochen Sprickerhof
autogenerated on Wed Jun 14 2017 04:04:50