EvalCases.cpp
Go to the documentation of this file.
1 //
2 // EvalCases.cpp
3 //
4 // Created on: 05.09.2011
5 // Author: wahnfla
6 //
7 
8 #include "EvalCases.hpp"
9 #include "../tools/errorhandler.hpp"
10 
11 namespace datatypes
12 {
13 
15 {
17 }
18 
20 {
21  m_evalCases.clear();
22 }
23 
24 //
25 // Add a new EvalCase to the list.
26 //
28 {
29  if (m_evalCases.size() >= 16)
30  {
31  // Error
32  printError("EvalCases::add: Cannot add this eval case. The MRS can only handle up to 16 eval cases!");
33  }
34  else
35  {
36  // Add the case
37  m_evalCases.push_back(evalCase);
38  }
39 }
40 
42 {
43  return m_evalCases;
44 }
45 
46 //
47 // Estimate the total memory usage of this object.
48 //
50 {
51  UINT32 mem = 0;
52  mem += sizeof(*this);
53  for (UINT32 i = 0; i<m_evalCases.size(); i++)
54  {
55  EvalCase* ec = m_evalCases.at(i);
56  mem += ec->getUsedMemory();
57  }
58 
59  return mem;
60 }
61 
62 
63 } // namespace datatypes
void printError(std::string message)
EvalCaseVector m_evalCases
Definition: EvalCases.hpp:34
virtual const UINT32 getUsedMemory() const
Definition: EvalCases.cpp:49
void add(EvalCase_ptr evalCase)
Definition: EvalCases.cpp:27
uint32_t UINT32
const EvalCaseVector & getEvalCases() const
Definition: EvalCases.cpp:41
virtual const UINT32 getUsedMemory() const
Definition: EvalCase.cpp:28
std::vector< EvalCase_ptr > EvalCaseVector
Definition: EvalCases.hpp:19


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