当前位置: 首页>>代码示例>>C++>>正文


C++ Executer::execute方法代码示例

本文整理汇总了C++中Executer::execute方法的典型用法代码示例。如果您正苦于以下问题:C++ Executer::execute方法的具体用法?C++ Executer::execute怎么用?C++ Executer::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Executer的用法示例。


在下文中一共展示了Executer::execute方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main()
{
	Executer exe;
	exe.execute();
}
开发者ID:gamepattisiere,项目名称:laboratory,代码行数:5,代码来源:LeagueInitTest.cpp

示例2: main

int main() {
  Engine* engine = new Engine();
  Executer* executer = new Executer();  
  Parser* parser = new Parser();

  string q1 = "a <- Project (Animal, Number) animals;";
  string q2 = "a <- cross1 * cross2";
  string q3 = "a <- cross1 - cross3";
  string q4 = "a <- cross1 + cross2;";
  string q5 = "a<- j1 JOIN j2";
  //all test queries above this function correctly
  string q6 = "";
  string createTest = "CREATE TABLE Teams (id INTEGER, favnum INTEGER, state INTEGER) PRIMARY KEY (id)";
  string insertTest = "INSERT INTO Students VALUES FROM (Mouse, 12345665, Mexico)";
  string insertTest2 = "INSERT INTO Mammals VALUES FROM (Mouse, 12345665, Mexico)";
  string DiffTest = "a <- All_Warriors - Warriors_Starters;";

  engine->open("join1.txt");
  engine->changeRelationName(0, "j1");
  engine->show("j1");
  engine->open("join2.txt");
  engine->changeRelationName(1, "j2");
  engine->show("j2");

  vector<int> theVec;
// To test use the different hardcoded strings to parse first.
  //vector<Token> tok = parser->splitInput(q1);
  //vector<Token> tok = parser->splitInput(insertTest2);
  vector<Token> tokenvec = parser->splitInput(q5);
  //vector<Token> tokenvec0 = parser->splitInput(q2);

  Executer* exec = new Executer();
  exec->execute(engine, tokenvec);

  /*for(int i = 0; i < tok.size(); i++){
	  cout << "tok value: " << tok.at(i).getValue() << "\t" << tok.at(i).getTokenType() << endl;
  }
  cout << endl;
  for(int j =0; j < tokenvec.size(); j++){
	  cout << "token value: " << tokenvec.at(j).getValue() << "\t" << tokenvec.at(j).getTokenType() << endl;
  }*/
  //engine->show("Students");
  //engine->show("Mammals");
  //engine->show("Teams");
  //engine->show("projection");
  //engine->show("Students");

    /*cout << "Running" << endl;
    
    while (true) {
    string line;
    getline(cin, line);
   
      // temp
      if      (line == "q" || line == "quit") return 0;
      else if (line == "h" || line == "help") help();
      
    // parsing
      vector<int> conditions;
      parser->splitInput (line, conditions);
      // create condition tree
   
    // executer
      executer->execute (engine, parser->getTokenVector().at(0)); // NOT ALWAYS ZERO!
  }*/
}
开发者ID:harumhl,项目名称:MaroonGoonsRDBMS,代码行数:66,代码来源:main.cpp


注:本文中的Executer::execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。