47 : m_algoName(algoNameValue), m_algoLogicalExpression(algoLogicalExpressionValue) {
59 const int algoBitNumberValue)
60 : m_algoName(algoNameValue),
61 m_algoLogicalExpression(algoLogicalExpressionValue),
62 m_algoBitNumber(algoBitNumberValue)
81 const int pinsOnConditionChip,
82 const std::vector<int>& orderConditionChip)
const {
84 for (
int iChip = 0; iChip < numberConditionChips; ++iChip) {
85 if (posChip == orderConditionChip[iChip]) {
96 const int pinsOnConditionChip,
97 const std::vector<int>& orderConditionChip)
const {
98 int iChip =
algoChipNumber(numberConditionChips, pinsOnConditionChip, orderConditionChip);
100 int outputPin =
m_algoBitNumber - (orderConditionChip[iChip] - 1) * pinsOnConditionChip + 1;
109 myCout <<
" Algorithm name: " <<
m_algoName << std::endl;
110 myCout <<
" Algorithm alias: " <<
m_algoAlias << std::endl;
114 myCout <<
" - not properly initialized! " << std::endl;
121 myCout <<
" - not properly initialized! " << std::endl;
130 myCout <<
" RPN vector size: " << rpnVectorSize;
132 if (rpnVectorSize == 0) {
133 myCout <<
" - not properly initialized! " << std::endl;
137 for (
int i = 0;
i < rpnVectorSize; ++
i) {
std::string m_algoAlias
algorithm alias
virtual ~GlobalAlgorithm()
destructor
int m_algoChipNumber
chip number (redundant with bit number)
std::string m_algoLogicalExpression
algorithm logical expression
const int algoOutputPin(const int numberConditionChips, const int pinsOnConditionChip, const std::vector< int > &orderConditionChip) const
get the output pin on the condition chip for the algorithm
const int algoChipNumber() const
get / set algorithm bit number
virtual void print(std::ostream &myCout) const
print condition
std::ostream & operator<<(std::ostream &os, const GlobalAlgorithm &result)
std::string m_algoName
algorithm name
std::vector< GlobalLogicParser::TokenRPN > m_algoRpnVector
algorithm RPN vector
RpnVector rpnVector() const
return the RPN vector