コード例 #1
0
ファイル: domain.cpp プロジェクト: nathanprat/tlp-gp
vector<lObjType> * Domain::getConstant(){
	Tools tools = Tools();
	vector<lObjType> * ret = new vector<lObjType>();
	vector<Type*>* types_obj,temp2;
	bool marq;
	lObjType temp;
	for (vector<Constant *>::iterator it_const=m_constants->begin(); it_const != m_constants->end() ; ++it_const){//each constant
		types_obj= (*it_const)->getTypes();
		if ( ret->size() != 0){
			marq=true;
			for(vector<lObjType>::iterator it_ret = ret->begin() ;  it_ret != ret->end() ; ++it_ret){
				temp2 =(*it_ret).getType();
				if (tools.compareVectorType(&temp2,types_obj)){
					(*it_ret).addObject( new Object( (*it_const)->getName(),*(*it_const)->getTypes() ));
					marq=false;
				} 
			}
			if(marq) {
				temp = lObjType(*(types_obj));
				temp.addObject(new Object((*it_const)->getName(),*((*it_const)->getTypes())));
				ret->push_back(temp);
			}
		} else {
			temp = lObjType(*(types_obj));
			temp.addObject(new Object((*it_const)->getName(),*((*it_const)->getTypes())));
			ret->push_back(temp);
		}
	}
	return ret;		
}
コード例 #2
0
ファイル: CodeRef.cpp プロジェクト: AbdelghaniDr/mirror
void TopicEditor::MainTool(Bar& bar)
{
	editor.StyleTool(bar);
	bar.Gap();
	editor.FontTools(bar);
	bar.Gap();
	editor.InkTool(bar);
	editor.PaperTool(bar);
	bar.Gap();
	editor.LanguageTool(bar);
	editor.SpellCheckTool(bar);
	bar.Gap();
	editor.IndexEntryTool(bar);
	bar.Break();
	editor.HyperlinkTool(bar, 300, K_CTRL_H);
	bar.Gap();
	editor.ParaTools(bar);
	bar.Gap();
	editor.EditTools(bar);
	bar.Gap();
	bar.Add("Print", CtrlImg::print(), THISBACK(Print))
	   .Key(K_CTRL_P);
	bar.GapRight();
	bar.Break();
	editor.LabelTool(bar, 500, K_CTRL_M, "Code reference");
	bar.Gap();
	Tools(bar);
	bar.Gap();
	editor.TableTools(bar);
}
コード例 #3
0
ファイル: JobFactory.cpp プロジェクト: airguider/OpenStudio
  Job JobFactory::createIdfToModelJob(
      const openstudio::path &t_idf,
      const openstudio::path &t_outdir,
      const boost::optional<openstudio::UUID> &t_uuid)
  {
    JobParams params;
    params.append("outdir", toString(t_outdir));

    Files files;
    files.append(FileInfo(t_idf, "idf"));

    return createIdfToModelJob(Tools(), params, files, std::vector<openstudio::URLSearchPath>(), t_uuid);
  }
コード例 #4
0
bool GameAttributes::setVariablesFromUser()
{
	innings = inningsSpinBox -> value();
	extras = extrasCheckBox -> isChecked();
	bunt = buntingCheckBox -> isChecked();
	hbp = hbpCheckBox -> isChecked();
	stealing = stealingCheckBox -> isChecked();
	balks = balksCheckBox -> isChecked();
	startingBalls = ballsSpinBox -> value();
	startingStrikes = strikesSpinBox -> value();
	players = playersSpinBox -> value();
	subs = Tools().IntToSUB_TYPE(substitutionComboBox -> currentIndex());
	return true;
}
コード例 #5
0
void GameAttributes::writeAttributes(std::ofstream *out)
{
	Tools t = Tools();
	*out << "INNINGS=" << innings << std::endl;
	*out << "EXTRAS=" << t.boolToString(extras) << std::endl; 
	*out << "BUNTING=" << t.boolToString(bunt) << std::endl;
	*out << "HBP=" << t.boolToString(hbp) << std::endl;
	*out << "STEALING=" << t.boolToString(stealing) << std::endl;
	*out << "BALKS=" << t.boolToString(balks) << std::endl;
	*out << "BALLS=" << startingBalls << std::endl;
	*out << "STRIKES=" << startingStrikes << std::endl;
	*out << "PLAYERS=" << players << std::endl;
	*out << "SUBS=" << subs << std::endl;
}
コード例 #6
0
ファイル: JobFactory.cpp プロジェクト: airguider/OpenStudio
  Job JobFactory::createRubyJob(
      const openstudio::path &t_rubyfile,
      const std::string &t_infileregex,
      const openstudio::path &t_outdir,
      const boost::optional<openstudio::UUID> &t_uuid)
  {
    JobParams params;
    params.append("outdir", toString(t_outdir));
    params.append("input_file_regex", t_infileregex);

    Files files;
    files.append(FileInfo(t_rubyfile, "rb"));


    return createRubyJob(Tools(), params, files, std::vector<openstudio::URLSearchPath>(), t_uuid);
  }
コード例 #7
0
void GameAttributes::setVariable(std::string key, std::string value)
{
	if(key == "INNINGS")
	{
		innings = atoi(value.c_str());
		inningsSpinBox -> setValue(innings);
	}
	else if(key == "EXTRAS")
	{
		if(value == "true")
			extras = true;
		else
			extras = false;
		extrasCheckBox -> setChecked(extras);
	}
	else if(key == "BUNTING")
	{
		if(value == "true")
			bunt = true;
		else
			bunt = false;
		buntingCheckBox -> setChecked(bunt);
	}
	else if(key == "HBP")
	{
		if(value == "true")
			hbp = true;
		else
			hbp = false;
		hbpCheckBox -> setChecked(hbp);
	}
	else if(key == "STEALING")
	{
		if(value == "true")
			stealing = true;
		else
			stealing = false;
		stealingCheckBox -> setChecked(stealing);
	}
	else if(key == "BALKS")
	{
		if(value == "true")
			balks = true;
		else
			balks = false;
		balksCheckBox -> setChecked(balks);
	}
	else if(key == "BALLS")
	{
		startingBalls = atoi(value.c_str());
		ballsSpinBox -> setValue(startingBalls);
	}
	else if(key == "STRIKES")
	{
		startingStrikes = atoi(value.c_str());
		strikesSpinBox -> setValue(startingStrikes);
	}
	else if(key == "PLAYERS")
	{
		players = atoi(value.c_str());
		playersSpinBox -> setValue(players);
	}else if(key == "SUBS")
	{
		subs = Tools().IntToSUB_TYPE(atoi(value.c_str()));
		substitutionComboBox -> setCurrentIndex(subs);
	}
	
}