// New a node and put it in the m_lpList EColumn* EColumn::create(string projection, string column) { Log::writeToLog("EColumn", 0, "Create: string projection, string column"); EColumn* lpPObject = new EColumn(projection, column); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList EPlus* EPlus::create() { Log::writeToLog("EPlus", 0, "Create"); EPlus* lpPObject = new EPlus(); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList JoinOutputs* JoinOutputs::create() { Log::writeToLog("JoinOutputs", 10, "Create without arguments"); JoinOutputs* lpNode = new JoinOutputs(); pushBack(lpNode); return lpNode; }
UAggCountNode* UAggCountNode::create(Node* lpAggCol, int iAggColIndex) { Log::writeToLog("UAggCountNode", 10, "Create with arguments: Node* lpAggCol, int iAggColIndex"); UAggCountNode* lpNode = new UAggCountNode(lpAggCol, iAggColIndex); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList DeleteProjectionNode* DeleteProjectionNode::create() { Log::writeToLog("DeleteProjectionNode", 10, "Create without arguments"); DeleteProjectionNode* lpNode = new DeleteProjectionNode(); pushBack(lpNode); return lpNode; }
//============================================================================== void Population::pushBack(const Eigen::VectorXd& x) { if (!isValidX(*mProblem, x)) return; const Eigen::VectorXd f = mProblem->evaluateFitness(x); pushBack(x, f); }
// New a node and put it in the m_lpList EAgg* EAgg::create(EColumn* lpRight, string op) { Log::writeToLog("EAgg", 0, "Create with argeuments: EColumn* lpRight, string op"); EAgg* lpPObject = new EAgg(lpRight, op); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList BEq* BEq::create() { Log::writeToLog("BEq", 0, "Create"); BEq* lpPObject = new BEq(); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList BJoinNode* BJoinNode::create(EColumn* lpLeft, EColumn* lpRight, int iComparisonType) { Log::writeToLog("BJoinNode", 10, "Create with 2 arguments: left node and right node"); BJoinNode* lpNode = new BJoinNode(lpLeft, lpRight, iComparisonType); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList EAgg* EAgg::create() { Log::writeToLog("EAgg", 0, "Create"); EAgg* lpPObject = new EAgg(); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList BJoinNode* BJoinNode::create() { Log::writeToLog("BJoinNode", 10, "Create without arguments"); BJoinNode* lpNode = new BJoinNode(); pushBack(lpNode); return lpNode; }
UDeleteProjectionNode* UDeleteProjectionNode::create(Node* lpChild, string sProjection, bool bIsSinglePredicate) { Log::writeToLog("UDeleteProjectionNode", 10, "Create with arguments: string sProjection, bool bIsSinglePredicate"); UDeleteProjectionNode* lpNode = new UDeleteProjectionNode(lpChild, sProjection, bIsSinglePredicate); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList BAggCountNode* BAggCountNode::create(Node* lpAggCol, int iAggColIndex, Node* lpAggGroup, int iGroupColIndex) { Log::writeToLog("BAggCountNode", 10, "Create with arguments: Node* lpAggCol, int iAggColIndex, Node* lpAggGroup, int iGroupColIndex"); BAggCountNode* lpNode = new BAggCountNode(lpAggCol, iAggColIndex, lpAggGroup, iGroupColIndex); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList BGt* BGt::create() { Log::writeToLog("BGt", 0, "Create"); BGt* lpPObject = new BGt(); pushBack(lpPObject); return lpPObject; }
// 前序遍历非递归二 void PreOrderNorOP(pBTNode pRoot) { Stack s; init(&s); pushBack(&s, pRoot); while (!isEmpty(&s)) { pBTNode pCur = top(&s); pop(&s); while (pCur) { printf("%c ", pCur->_data); if (pCur->_pRight) { pushBack(&s, pCur->_pRight); } pCur = pCur->_pLeft; } } }
// New a node and put it in the m_lpList DeletePlan* DeletePlan::create() { Log::writeToLog("DeletePlan", 10, "Create without arguments"); DeletePlan* lpNode = new DeletePlan(); pushBack(lpNode); return lpNode; }
UNode* UNode::create(Node* lpChild) { Log::writeToLog("UNode", 10, "Create with 1 argument: child node"); UNode* lpNode = new UNode(lpChild); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList BEq* BEq::create(Expression* lpLeft, Expression* lpRight) { Log::writeToLog("BEq", 0, "Create with argeuments: Expression* lpLeft, Expression* lpRight"); BEq* lpPObject = new BEq(lpLeft, lpRight); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList BBinaryLogic* BBinaryLogic::create(BExpression* lpLeft, BExpression* lpRight, string op) { Log::writeToLog("BBinaryLogic", 0, "Create with argeuments: BExpression* lpLeft, BExpression* lpRight, string op"); BBinaryLogic* lpPObject = new BBinaryLogic(lpLeft, lpRight, op); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList DeleteProjectionNode* DeleteProjectionNode::create(string sProjection, bool bIsSinglePredicate) { Log::writeToLog("DeleteProjectionNode", 10, "Create with 2 arguments: string sProjection, bool bIsSinglePredicate"); DeleteProjectionNode* lpNode = new DeleteProjectionNode(sProjection, bIsSinglePredicate); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList BBinaryLogic* BBinaryLogic::create() { Log::writeToLog("BBinaryLogic", 0, "Create"); BBinaryLogic* lpPObject = new BBinaryLogic(); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList BaseNode* BaseNode::create() { Log::writeToLog("BaseNode", 0, "Create"); BaseNode* lpBaseNode = new BaseNode(); pushBack(lpBaseNode); return lpBaseNode; }
// New a node and put it in the m_lpList ListCols* ListCols::create() { Log::writeToLog("ListCols", 0, "Create"); ListCols* lpPObject = new ListCols(); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList UAggCountNode* UAggCountNode::create() { Log::writeToLog("UAggCountNode", 10, "Create without arguments"); UAggCountNode* lpNode = new UAggCountNode(); pushBack(lpNode); return lpNode; }
// New a node and put it in the m_lpList EPlus* EPlus::create(Expression* lpLeft, Expression* lpRight) { Log::writeToLog("EPlus", 0, "Create with argeuments: Expression* lpLeft, Expression* lpRight"); EPlus* lpPObject = new EPlus(lpLeft, lpRight); pushBack(lpPObject); return lpPObject; }
void CharLine::setAtPosition(const char symbol, const int index) { if (index >= size) pushBack(symbol); else string[index] = symbol; }
// New a node and put it in the m_lpList EFloat* EFloat::create() { Log::writeToLog("EFloat", 0, "Create"); EFloat* lpPObject = new EFloat(); pushBack(lpPObject); return lpPObject; }
// New a node and put it in the m_lpList EFloat* EFloat::create(double value) { Log::writeToLog("EFloat", 0, "Create with argeuments: double value"); EFloat* lpPObject = new EFloat(value); pushBack(lpPObject); return lpPObject; }
// Assignment operator (for assigning from a rectangle). DPolygon &DPolygon::operator=(const DRect &rect) { clear(); DRect r1(rect); DRect r2(rect); if (m_counterclock) r2.xInvert(); else r2.yInvert(); pushBack(r1.p1()); pushBack(r2.p1()); pushBack(r1.p2()); pushBack(r2.p2()); unify(); return *this; }
static bool parseAndOrExpression(MemoryStack* stack, LexerCarriage* carriage, Array<SyntaxError>* errors, ASTNode left, ASTNode* result) { if (carriage->topToken.type == TOK_AND) { parseNextToken(carriage); ASTNode right; if (parseCompareExpression(stack, carriage, errors, &right)) { makeFunctionCallNode(result, stack, "opAnd", left, right); parseAndOrExpression(stack, carriage, errors, *result, result); return true; } else { pushBack(errors, SyntaxError{ SET_EXPRESSION_EXPECTED, carriage->currentLineNumber }); return false; } } else if (carriage->topToken.type == TOK_OR) { parseNextToken(carriage); ASTNode right; if (parseCompareExpression(stack, carriage, errors, &right)) { makeFunctionCallNode(result, stack, "opOr", left, right); parseAndOrExpression(stack, carriage, errors, *result, result); return true; } else { pushBack(errors, SyntaxError{ SET_EXPRESSION_EXPECTED, carriage->currentLineNumber }); return false; } } else { *result = left; return true; } }