EvalCaseResult.cpp
Go to the documentation of this file.
1 //
2 // EvalCaseResult.cpp
3 //
4 // A single EvalCaseResult.
5 //
6 //
7 
8 #include "EvalCaseResult.hpp"
9 #include "EvalCases.hpp"
10 #include "../sopas/colaa.hpp"
11 #include "../tools/errorhandler.hpp"
12 
13 #include <sstream>
14 
15 
16 namespace datatypes
17 {
18 
19 
21  uiVersionNo(0),
22  CaseHdr(),
23  m_eCaseResult(),
24  m_sCaseName("no name"),
25  m_sComment("no comment"),
26  aTimeBlock()
27 {
29 }
30 
31 
32 
33 // Default destructor
35 {
36 }
37 
38 // Estimate the memory usage of this object.
40 {
41  return sizeof(*this) +
42  m_sCaseName.length() +
43  m_sComment.length();
44 }
45 
46 
47 
48 std::string EvalCaseResult::toString() const
49 {
50  std::ostringstream os;
51  os << "EvalCaseResult members" << std::endl
52  << "uiVersionNo: " << uiVersionNo << std::endl
53  << "CaseHdr: usiNumber: " << (UINT16)(CaseHdr.usiNumber) << std::endl
54  << " udiSysCount: " << CaseHdr.udiSysCount << std::endl
55  << " dDistScaleFactor: " << CaseHdr.dDistScaleFactor << std::endl
56  << " dDistScaleOffset: " << CaseHdr.dDistScaleOffset << std::endl
57  << " uiAngleScaleFactor: " << CaseHdr.uiAngleScaleFactor << std::endl
58  << " iAngleScaleOffset: " << CaseHdr.iAngleScaleOffset << std::endl
59  << "eCaseResult: " << (UINT16)(m_eCaseResult) << std::endl
60  << "aFieldInfringement: --- not in use ---" << std::endl
61  << "sCaseName: " << ">" << m_sCaseName << "<" << std::endl
62  << "sComment: " << ">" << m_sComment << "<" << std::endl
63  << "aTimeBlock: " << (UINT16)(aTimeBlock.uiYear) << ":" << (UINT16)(aTimeBlock.usiMonth) << ":" << (UINT16)(aTimeBlock.usiDay) << ":"
64  << (UINT16)(aTimeBlock.usiHour) << ":" << (UINT16)(aTimeBlock.usiMinute) << ":" << (UINT16)(aTimeBlock.usiSec) << ":"
65  << (UINT32)(aTimeBlock.udiUSec) << std::endl;
66 
67  return os.str();
68 }
69 
70 
71 
72 std::ostream& operator<< (std::ostream& os, const EvalCaseResult& result)
73 {
74  return os << result.toString();
75 }
76 
77 
78 
79 } // END namespace datatypes
uint16_t UINT16
uint32_t UINT32
std::string toString() const
struct datatypes::EvalCaseResult::@0 CaseHdr
struct datatypes::EvalCaseResult::@1 aTimeBlock
const UINT32 getUsedMemory() const
std::ostream & operator<<(std::ostream &os, const EvalCaseResult &result)


libsick_ldmrs
Author(s): SICK AG , Martin Günther , Jochen Sprickerhof
autogenerated on Mon Oct 26 2020 03:27:30