#include <EFResult.h>
|
| EFResult (std::vector< std::string >) |
|
| EFResult (std::vector< uint32_t >, uint32_t) |
|
| EFResult () |
|
virtual | ~EFResult () |
|
virtual const CLID & | clID () const |
|
const std::vector< uint32_t > | getEFVec () const |
|
const uint32_t | getEFVec (uint32_t pos) const |
|
bool | push_back (uint32_t val) |
|
bool | appToEFVec (double val, uint32_t pos) |
|
bool | addToEFVec (uint32_t val, uint32_t pos) |
|
bool | setVecBit (uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend) |
|
bool | setVecBit (bool val, uint32_t vecpos, uint32_t bitpos) |
|
void | setAnswer (std::string &answer) |
|
void | setMidAnswer (std::string &answer) |
|
void | reset () |
|
const std::string | getAnswer () const |
|
const std::string | getMidAnswer () const |
|
const int | getAnswerIndex () const |
|
const int | getMidAnswerIndex () const |
|
const int | getDecNum () const |
|
| EFResult (std::vector< std::string >) |
|
| EFResult (std::vector< uint32_t >, uint32_t) |
|
| EFResult () |
|
virtual | ~EFResult () |
|
virtual const CLID & | clID () const |
|
const std::vector< uint32_t > | getEFVec () const |
|
const uint32_t | getEFVec (uint32_t pos) const |
|
bool | push_back (uint32_t val) |
|
bool | appToEFVec (double val, uint32_t pos) |
|
bool | addToEFVec (uint32_t val, uint32_t pos) |
|
bool | setVecBit (uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend) |
|
bool | setVecBit (bool val, uint32_t vecpos, uint32_t bitpos) |
|
void | setAnswer (std::string &answer) |
|
void | setMidAnswer (std::string &answer) |
|
void | reset () |
|
const std::string | getAnswer () const |
|
const std::string | getMidAnswer () const |
|
const int | getAnswerIndex () const |
|
const int | getMidAnswerIndex () const |
|
const int | getDecNum () const |
|
◆ EFResult() [1/6]
EFResult::EFResult |
( |
std::vector< std::string > |
ans | ) |
|
Definition at line 4 of file EFResult.cxx.
5 : m_answerVector(ans),
6 m_answerIndex(-1),
7 m_midanswerIndex(-1),
8 m_efVec()
9{
10}
◆ EFResult() [2/6]
EFResult::EFResult |
( |
std::vector< uint32_t > |
vec, |
|
|
uint32_t |
pos |
|
) |
| |
Definition at line 12 of file EFResult.cxx.
13 : m_answerVector(),
14 m_answerIndex(-1),
15 m_midanswerIndex(-1),
16 m_efVec()
17{
18 if(
vec.size()+pos>54) {
19 std::cout <<"***EFResult:EFResult(): vector size error!" << std::endl;
20 m_efVec.resize(54,0);
21 }
22 else{
23 for(unsigned int i=0;i<54;++i){
24 if(i<pos||i>=
vec.size()+pos) m_efVec.push_back(0);
25 else m_efVec.push_back(
vec[i-pos]);
26 }
27 }
28}
◆ EFResult() [3/6]
Definition at line 30 of file EFResult.cxx.
30 :
31 m_answerVector(),
32 m_answerIndex(-1),
33 m_midanswerIndex(-1),
34 m_efVec()
35{
36
37}
◆ ~EFResult() [1/2]
◆ EFResult() [4/6]
EFResult::EFResult |
( |
std::vector< std::string > |
| ) |
|
◆ EFResult() [5/6]
EFResult::EFResult |
( |
std::vector< uint32_t > |
, |
|
|
uint32_t |
|
|
) |
| |
◆ EFResult() [6/6]
◆ ~EFResult() [2/2]
virtual EFResult::~EFResult |
( |
| ) |
|
|
virtual |
◆ addToEFVec() [1/2]
bool EFResult::addToEFVec |
( |
uint32_t |
val, |
|
|
uint32_t |
pos |
|
) |
| |
◆ addToEFVec() [2/2]
bool EFResult::addToEFVec |
( |
uint32_t |
val, |
|
|
uint32_t |
pos |
|
) |
| |
◆ appToEFVec() [1/2]
bool EFResult::appToEFVec |
( |
double |
val, |
|
|
uint32_t |
pos |
|
) |
| |
◆ appToEFVec() [2/2]
bool EFResult::appToEFVec |
( |
double |
val, |
|
|
uint32_t |
pos |
|
) |
| |
◆ classID() [1/2]
const CLID & EFResult::classID |
( |
| ) |
|
|
static |
◆ classID() [2/2]
static const CLID & EFResult::classID |
( |
| ) |
|
|
static |
◆ clID() [1/2]
const CLID & EFResult::clID |
( |
| ) |
const |
|
virtual |
Definition at line 46 of file EFResult.cxx.
47{
49}
static const CLID & classID()
◆ clID() [2/2]
virtual const CLID & EFResult::clID |
( |
| ) |
const |
|
virtual |
◆ getAnswer() [1/2]
const std::string EFResult::getAnswer |
( |
| ) |
const |
◆ getAnswer() [2/2]
const std::string EFResult::getAnswer |
( |
| ) |
const |
◆ getAnswerIndex() [1/2]
const int EFResult::getAnswerIndex |
( |
| ) |
const |
◆ getAnswerIndex() [2/2]
const int EFResult::getAnswerIndex |
( |
| ) |
const |
◆ getDecNum() [1/2]
const int EFResult::getDecNum |
( |
| ) |
const |
|
inline |
◆ getDecNum() [2/2]
const int EFResult::getDecNum |
( |
| ) |
const |
|
inline |
◆ getEFVec() [1/4]
const std::vector< uint32_t > EFResult::getEFVec |
( |
| ) |
const |
◆ getEFVec() [2/4]
const std::vector< uint32_t > EFResult::getEFVec |
( |
| ) |
const |
◆ getEFVec() [3/4]
const uint32_t EFResult::getEFVec |
( |
uint32_t |
pos | ) |
const |
Definition at line 55 of file EFResult.cxx.
56{
57 if(pos>=m_efVec.size())return 0;
58 else return m_efVec[pos];
59}
◆ getEFVec() [4/4]
const uint32_t EFResult::getEFVec |
( |
uint32_t |
pos | ) |
const |
◆ getMidAnswer() [1/2]
const std::string EFResult::getMidAnswer |
( |
| ) |
const |
Definition at line 170 of file EFResult.cxx.
170{ return m_answerVector[m_midanswerIndex]; }
◆ getMidAnswer() [2/2]
const std::string EFResult::getMidAnswer |
( |
| ) |
const |
◆ getMidAnswerIndex() [1/2]
const int EFResult::getMidAnswerIndex |
( |
| ) |
const |
◆ getMidAnswerIndex() [2/2]
const int EFResult::getMidAnswerIndex |
( |
| ) |
const |
◆ push_back() [1/2]
bool EFResult::push_back |
( |
uint32_t |
val | ) |
|
Definition at line 61 of file EFResult.cxx.
61 {
62 if(m_efVec.size()>0&&m_efVec.size()<54) return false;
63 if(m_efVec.size()==0) m_efVec.resize(54,0);
64 m_efVec.push_back(val);
65 return true;
66}
Referenced by StepHandler::execute().
◆ push_back() [2/2]
bool EFResult::push_back |
( |
uint32_t |
val | ) |
|
◆ reset() [1/2]
Definition at line 153 of file EFResult.cxx.
154{
155 m_answerIndex = -1;
156 m_midanswerIndex = -1;
157 if(m_efVec.size()>=54){
158 m_efVec.resize(54,0);
159 for(unsigned int i=0;i<m_efVec.size();++i) m_efVec[i]=0;
160 }
161 else if(m_efVec.size()!=0){
162 std::cout <<"EFResult::reset(): m_efVec size check error!"<<std::endl;
163 }
164}
Referenced by StepHandler::execute(), and EFEventLoopMgr::executeEvent().
◆ reset() [2/2]
◆ setAnswer() [1/2]
void EFResult::setAnswer |
( |
std::string & |
answer | ) |
|
Definition at line 115 of file EFResult.cxx.
116{
117 int iCount = 0;
118
119 std::vector<std::string>::iterator itVs = m_answerVector.begin();
120 std::vector<std::string>::iterator endVs = m_answerVector.end();
121 for (;itVs != endVs && m_answerIndex == -1; ++itVs) {
122 if (*itVs == answer) {
123 m_answerIndex = iCount;
124
125
126
127
128 }
129 iCount++;
130 }
131}
Referenced by StepHandler::execute(), and EFEventLoopMgr::executeEvent().
◆ setAnswer() [2/2]
void EFResult::setAnswer |
( |
std::string & |
answer | ) |
|
◆ setMidAnswer() [1/2]
void EFResult::setMidAnswer |
( |
std::string & |
answer | ) |
|
Definition at line 133 of file EFResult.cxx.
134{
135 int iCount = 0;
136
137 std::vector<std::string>::iterator itVs = m_answerVector.begin();
138 std::vector<std::string>::iterator endVs = m_answerVector.end();
139 for (;itVs != endVs && m_answerIndex == -1; ++itVs) {
140 if (*itVs == answer) {
141 m_midanswerIndex = iCount;
142
143
144
145
146 }
147
148 iCount++;
149 }
150
151}
Referenced by StepHandler::execute().
◆ setMidAnswer() [2/2]
void EFResult::setMidAnswer |
( |
std::string & |
answer | ) |
|
◆ setVecBit() [1/4]
bool EFResult::setVecBit |
( |
bool |
val, |
|
|
uint32_t |
vecpos, |
|
|
uint32_t |
bitpos |
|
) |
| |
Definition at line 105 of file EFResult.cxx.
106{
107 if(vecpos>=54) return false;
108 if(bitpos>=32) return false;
109 if(m_efVec.size()==0) m_efVec.resize(54,0);
110 if(val) m_efVec[vecpos]|=(1<<bitpos);
111 else m_efVec[vecpos]&=(~(1<<bitpos));
112 return true;
113}
◆ setVecBit() [2/4]
bool EFResult::setVecBit |
( |
bool |
val, |
|
|
uint32_t |
vecpos, |
|
|
uint32_t |
bitpos |
|
) |
| |
◆ setVecBit() [3/4]
bool EFResult::setVecBit |
( |
uint32_t |
val, |
|
|
uint32_t |
vecpos, |
|
|
uint32_t |
bbegin, |
|
|
uint32_t |
bend |
|
) |
| |
◆ setVecBit() [4/4]
bool EFResult::setVecBit |
( |
uint32_t |
val, |
|
|
uint32_t |
vecpos, |
|
|
uint32_t |
bbegin, |
|
|
uint32_t |
bend |
|
) |
| |
The documentation for this class was generated from the following files: