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


C++ Prog类代码示例

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


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

示例1: main

int main(int argc, char *argv[])
{
  fprintf(stderr, "Syntakticky analyzator\n");
  if (argc == 1) {
    fprintf(stderr, "Vstup z klavesnice, zadejte zdrojovy text\n");
    jmeno = NULL;
  } else {
    jmeno = argv[1];
    fprintf(stderr, "Vstupni soubor %s\n", jmeno);
  }
  InitLexan(jmeno);
  CtiSymb();
  Prog *prog = Program();
  prog->printNode();
  fprintf(stderr, "\n\n");
  if (argc > 2) {
    if (strncmp(argv[2], "-O", 2) == 0) {
      prog = (Prog*)(prog->Optimize());
    }
  }
  fprintf(stderr, "\nlast version:\n");
  prog->printNode();
  fprintf(stderr, "\n\n");
  prog->Translate();

}
开发者ID:cejkato2,项目名称:MI-GEN,代码行数:26,代码来源:main.cpp

示例2: CPPUNIT_ASSERT

/*==============================================================================
 * FUNCTION:		CfgTest::testRenameVars
 * OVERVIEW:		Test the renaming of variables
 *============================================================================*/
void CfgTest::testRenameVars ()
{
  BinaryFileFactory bff;
  BinaryFile* pBF = bff.Load(FRONTIER_PENTIUM);
  CPPUNIT_ASSERT(pBF != 0);
  Prog* prog = new Prog;
  FrontEnd* pFE = new PentiumFrontEnd(pBF, prog, &bff);
  Type::clearNamedTypes();
  prog->setFrontEnd(pFE);
  pFE->decode(prog);

  UserProc* pProc = (UserProc*) prog->getProc(0);
  Cfg* cfg = pProc->getCFG();
  DataFlow* df = pProc->getDataFlow();

  // Simplify expressions (e.g. m[ebp + -8] -> m[ebp - 8]
  prog->finishDecode();

  df->dominators(cfg);
  df->placePhiFunctions(pProc);
  pProc->numberStatements();				// After placing phi functions!
  df->renameBlockVars(pProc, 0, 1);		// Block 0, mem depth 1

  // MIKE: something missing here?

  delete pFE;
}
开发者ID:zecke,项目名称:boomerang,代码行数:31,代码来源:CfgTest.cpp

示例3: Prog

/*==============================================================================
 * FUNCTION:		ProcTest::testName
 * OVERVIEW:		Test setting and reading name, constructor, native address
 *============================================================================*/
void ProcTest::testName ()
{
  Prog* prog = new Prog();
  BinaryFile *pBF = new BinaryFileStub();
  CPPUNIT_ASSERT(pBF != 0);
  std::string nm("default name");
  BinaryFileFactory bff;
  pBF = bff.Load(HELLO_PENTIUM);
  FrontEnd *pFE = new PentiumFrontEnd(pBF, prog, &bff);
  CPPUNIT_ASSERT(pFE != 0);
  prog->setFrontEnd(pFE);
  CPPUNIT_ASSERT(prog);
  pFE->readLibraryCatalog();				// Since we are not decoding
  m_proc = new UserProc(prog, nm, 20000); // Will print in decimal if error
  std::string actual(m_proc->getName());
  CPPUNIT_ASSERT_EQUAL(std::string("default name"), actual);

  std::string name("printf");
  LibProc lp(prog, name, 30000);
  actual =  lp.getName();
  CPPUNIT_ASSERT_EQUAL(name, actual);

  ADDRESS a = lp.getNativeAddress();
  ADDRESS expected = 30000;
  CPPUNIT_ASSERT_EQUAL(expected, a);
  a = m_proc->getNativeAddress();
  expected = 20000;
  CPPUNIT_ASSERT_EQUAL(expected, a);

  delete prog;
  delete m_proc;
  // delete pFE;		// No! Deleting the prog deletes the pFE already (which deletes the BinaryFileFactory)
}
开发者ID:zecke,项目名称:boomerang,代码行数:37,代码来源:ProcTest.cpp

示例4: Prog

Prog* Parser::prog(){
        Prog* myProg = new Prog();
        myProg->addNode(decls());

        if (!error) {
                myProg->addNode(statements());
        }
        return myProg;
}
开发者ID:RaphaelHippe,项目名称:cpp-compiler,代码行数:9,代码来源:Parser.cpp

示例5: CPPUNIT_ASSERT

/*==============================================================================
 * FUNCTION:		RtlTest::testIsCompare
 * OVERVIEW:		Test the isCompare function
 *============================================================================*/
void RtlTest::testIsCompare ()
{
  BinaryFileFactory bff;
  BinaryFile *pBF = bff.Load(SWITCH_SPARC);
  CPPUNIT_ASSERT(pBF != 0);
  CPPUNIT_ASSERT(pBF->GetMachine() == MACHINE_SPARC);
  Prog* prog = new Prog;
  FrontEnd *pFE = new SparcFrontEnd(pBF, prog, &bff);
  prog->setFrontEnd(pFE);

  // Decode second instruction: "sub		%i0, 2, %o1"
  int iReg;
  Exp* eOperand = NULL;
  DecodeResult inst = pFE->decodeInstruction(0x10910);
  CPPUNIT_ASSERT(inst.rtl != NULL);
  CPPUNIT_ASSERT(inst.rtl->isCompare(iReg, eOperand) == false);

  // Decode fifth instruction: "cmp		%o1, 5"
  inst = pFE->decodeInstruction(0x1091c);
  CPPUNIT_ASSERT(inst.rtl != NULL);
  CPPUNIT_ASSERT(inst.rtl->isCompare(iReg, eOperand) == true);
  CPPUNIT_ASSERT_EQUAL(9, iReg);
  std::string expected("5");
  std::ostringstream ost1;
  eOperand->print(ost1);
  std::string actual(ost1.str());
  CPPUNIT_ASSERT_EQUAL(expected, actual);

  pBF->UnLoad();
  delete pBF;
  delete pFE;
  pBF = bff.Load(SWITCH_PENT);
  CPPUNIT_ASSERT(pBF != 0);
  CPPUNIT_ASSERT(pBF->GetMachine() == MACHINE_PENTIUM);
  pFE = new PentiumFrontEnd(pBF, prog, &bff);
  prog->setFrontEnd(pFE);

  // Decode fifth instruction: "cmp	$0x5,%eax"
  inst = pFE->decodeInstruction(0x80488fb);
  CPPUNIT_ASSERT(inst.rtl != NULL);
  CPPUNIT_ASSERT(inst.rtl->isCompare(iReg, eOperand) == true);
  CPPUNIT_ASSERT_EQUAL(24, iReg);
  std::ostringstream ost2;
  eOperand->print(ost2);
  actual = ost2.str();
  CPPUNIT_ASSERT_EQUAL(expected, actual);

  // Decode instruction: "add		$0x4,%esp"
  inst = pFE->decodeInstruction(0x804890c);
  CPPUNIT_ASSERT(inst.rtl != NULL);
  CPPUNIT_ASSERT(inst.rtl->isCompare(iReg, eOperand) == false);
  pBF->UnLoad();
  delete pFE;
}
开发者ID:zecke,项目名称:boomerang,代码行数:58,代码来源:RtlTest.cpp

示例6: find_prog

samplv1_programs::Prog *samplv1_programs::Bank::add_prog (
	uint16_t prog_id, const QString& prog_name )
{
	Prog *prog = find_prog(prog_id);
	if (prog) {
		prog->set_name(prog_name);
	} else {
		prog = new Prog(prog_id, prog_name);
		m_progs.insert(prog_id, prog);
	}
	return prog;
}
开发者ID:rncbc,项目名称:samplv1,代码行数:12,代码来源:samplv1_programs.cpp

示例7: Prog

/*==============================================================================
 * FUNCTION:		ProgTest::testName
 * OVERVIEW:		Test setting and reading name
 *============================================================================*/
void ProgTest::testName ()
{
  BinaryFileFactory bff;
  BinaryFile *pBF = bff.Load(HELLO_PENTIUM);	// Don't actually use it
  Prog* prog = new Prog();
  FrontEnd *pFE = new PentiumFrontEnd(pBF, prog, &bff);
  // We need a Prog object with a pBF (for getEarlyParamExp())
  prog->setFrontEnd(pFE);
  std::string actual(prog->getName());
  std::string expected(HELLO_PENTIUM);
  CPPUNIT_ASSERT_EQUAL(expected, actual);
  std::string name("Happy prog");
  prog->setName(name.c_str());
  actual =  prog->getName();
  CPPUNIT_ASSERT_EQUAL(name, actual);
  delete pFE;
}
开发者ID:zecke,项目名称:boomerang,代码行数:21,代码来源:ProgTest.cpp

示例8: BinaryFileStub

/*==============================================================================
 * FUNCTION:		FrontPentTest::test1
 * OVERVIEW:		Test decoding some pentium instructions
 *============================================================================*/
void FrontPentTest::test1 ()
{
    std::ostringstream ost;

    BinaryFileFactory bff;
    BinaryFile *pBF = bff.Load(HELLO_PENT);
    if (pBF == NULL)
        pBF = new BinaryFileStub();
    CPPUNIT_ASSERT(pBF != 0);
    CPPUNIT_ASSERT(pBF->GetMachine() == MACHINE_PENTIUM);
    Prog* prog = new Prog;
    FrontEnd *pFE = new PentiumFrontEnd(pBF, prog, &bff);
    prog->setFrontEnd(pFE);

    bool gotMain;
    ADDRESS addr = pFE->getMainEntryPoint(gotMain);
    CPPUNIT_ASSERT (addr != NO_ADDRESS);

    // Decode first instruction
    DecodeResult inst = pFE->decodeInstruction(addr);
    inst.rtl->print(ost);

    std::string expected(
        "08048328    0 *32* m[r28 - 4] := r29\n"
        "            0 *32* r28 := r28 - 4\n");
    CPPUNIT_ASSERT_EQUAL(expected, std::string(ost.str()));

    std::ostringstream o2;
    addr += inst.numBytes;
    inst = pFE->decodeInstruction(addr);
    inst.rtl->print(o2);
    expected = std::string("08048329    0 *32* r29 := r28\n");
    CPPUNIT_ASSERT_EQUAL(expected, std::string(o2.str()));

    std::ostringstream o3;
    addr = 0x804833b;
    inst = pFE->decodeInstruction(addr);
    inst.rtl->print(o3);
    expected = std::string(
                   "0804833b    0 *32* m[r28 - 4] := 0x80483fc\n"
                   "            0 *32* r28 := r28 - 4\n");
    CPPUNIT_ASSERT_EQUAL(expected, std::string(o3.str()));

    delete pFE;
    // delete pBF;
}
开发者ID:JFreaker,项目名称:boomerang,代码行数:50,代码来源:FrontPentTest.cpp

示例9: BinaryFileStub

void FrontSparcTest::test2() {
	DecodeResult inst;
	std::string expected;

	BinaryFileFactory bff;
	BinaryFile *pBF = bff.Load(HELLO_SPARC);
	if (pBF == NULL)
		pBF = new BinaryFileStub();	   // fallback on stub
	CPPUNIT_ASSERT(pBF != 0);
	CPPUNIT_ASSERT(pBF->GetMachine() == MACHINE_SPARC);
	Prog* prog = new Prog;
	FrontEnd *pFE = new SparcFrontEnd(pBF, prog, &bff);
	prog->setFrontEnd(pFE);

	std::ostringstream o1;
	inst = pFE->decodeInstruction(0x10690);
	inst.rtl->print(o1);
	// This call is to out of range of the program's text limits (to the Program Linkage Table (PLT), calling printf)
	// This is quite normal.
	expected = std::string("00010690    0 CALL printf(\n"
		"              )\n"
		"              Reaching definitions: \n"
		"              Live variables: \n");
	CPPUNIT_ASSERT_EQUAL(expected, std::string(o1.str()));

	std::ostringstream o2;
	inst = pFE->decodeInstruction(0x10694);
	inst.rtl->print(o2);
	expected = std::string("00010694\n");
	CPPUNIT_ASSERT_EQUAL(expected, std::string(o2.str()));

	std::ostringstream o3;
	inst = pFE->decodeInstruction(0x10698);
	inst.rtl->print(o3);
	expected = std::string("00010698    0 *32* r8 := 0\n");
	CPPUNIT_ASSERT_EQUAL(expected, std::string(o3.str()));

	std::ostringstream o4;
	inst = pFE->decodeInstruction(0x1069c);
	inst.rtl->print(o4);
	expected = std::string("0001069c    0 *32* r24 := r8\n");
	CPPUNIT_ASSERT_EQUAL(expected, std::string(o4.str()));

	delete pFE;
	// delete pBF;
}
开发者ID:zecke,项目名称:boomerang,代码行数:46,代码来源:FrontSparcTest.cpp

示例10: CPPUNIT_ASSERT

void FrontPentTest::testFindMain()
{
	// Test the algorithm for finding main, when there is a call to __libc_start_main
	// Also tests the loader hack
	BinaryFileFactory bff;
	BinaryFile *pBF = bff.Load(FEDORA2_TRUE);
	CPPUNIT_ASSERT(pBF != NULL);
	Prog *prog = new Prog;
	FrontEnd *pFE = new PentiumFrontEnd(pBF, prog, &bff);
	prog->setFrontEnd(pFE);
	CPPUNIT_ASSERT(pFE != NULL);
	bool found;
	ADDRESS addr = pFE->getMainEntryPoint(found);
	ADDRESS expected = 0x8048b10;
	CPPUNIT_ASSERT_EQUAL(expected, addr);
	pBF->Close();
	bff.UnLoad();

	pBF = bff.Load(FEDORA3_TRUE);
	CPPUNIT_ASSERT(pBF != NULL);
	pFE = new PentiumFrontEnd(pBF, prog, &bff);
	prog->setFrontEnd(pFE);
	CPPUNIT_ASSERT(pFE != NULL);
	addr = pFE->getMainEntryPoint(found);
	expected = 0x8048c4a;
	CPPUNIT_ASSERT_EQUAL(expected, addr);
	pBF->Close();
	bff.UnLoad();

	pBF = bff.Load(SUSE_TRUE);
	CPPUNIT_ASSERT(pBF != NULL);
	pFE = new PentiumFrontEnd(pBF, prog, &bff);
	prog->setFrontEnd(pFE);
	CPPUNIT_ASSERT(pFE != NULL);
	addr = pFE->getMainEntryPoint(found);
	expected = 0x8048b60;
	CPPUNIT_ASSERT_EQUAL(expected, addr);
	pBF->Close();

	delete pFE;
}
开发者ID:pmatos,项目名称:boomerang,代码行数:41,代码来源:FrontPentTest.cpp

示例11: main

int main(int argc, char **argv)
{
   Prog prog;
   prog.init();
   prog.add_sample("data/haiku/air_0.ogg");
   prog.add_sample("data/haiku/air_1.ogg");
   prog.add_sample("data/haiku/earth_0.ogg");
   prog.add_sample("data/haiku/earth_1.ogg");
   prog.add_sample("data/haiku/earth_2.ogg");
   prog.add_sample("data/haiku/fire_0.ogg");
   prog.add_sample("data/haiku/fire_1.ogg");
   prog.add_sample("data/haiku/water_0.ogg");
   prog.add_sample("data/haiku/water_1.ogg");
   prog.add_stream_path("../demos/cosmic_protector/data/sfx/game_music.ogg");
   prog.add_stream_path("../demos/cosmic_protector/data/sfx/title_music.ogg");
   prog.initial_config();
   prog.run();
   /* Let Allegro handle the cleanup. */
   return 0;

   (void)argc;
   (void)argv;
}
开发者ID:gitustc,项目名称:d2imdev,代码行数:23,代码来源:ex_audio_chain.cpp

示例12: testDataIntervalOverlaps

/*==============================================================================
 * FUNCTION:		TypeTest::testDataIntervalOverlaps
 * OVERVIEW:		Test the DataIntervalMap class with overlapping addItems
 *============================================================================*/
void TypeTest::testDataIntervalOverlaps() {
	DataIntervalMap dim;

	Prog* prog = new Prog;
	UserProc* proc = (UserProc*) prog->newProc("test", 0x123);
	std::string name("test");
	proc->setSignature(Signature::instantiate(PLAT_PENTIUM, CONV_C, name.c_str()));
	dim.setProc(proc);

	dim.addItem(0x1000, "firstInt", new IntegerType(32, 1));
	dim.addItem(0x1004, "firstFloat", new FloatType(32));
	dim.addItem(0x1008, "secondInt", new IntegerType(32, 1));
	dim.addItem(0x100C, "secondFloat", new FloatType(32));
	CompoundType ct;
	ct.addType(new IntegerType(32, 1), "int3");
	ct.addType(new FloatType(32), "float3");
	dim.addItem(0x1010, "existingStruct", &ct);

	// First insert a new struct over the top of the existing middle pair
	CompoundType ctu;
	ctu.addType(new IntegerType(32, 0), "newInt");		// This int has UNKNOWN sign
	ctu.addType(new FloatType(32), "newFloat");
	dim.addItem(0x1008, "replacementStruct", &ctu);

	DataIntervalEntry* pdie = dim.find(0x1008);
	std::string expected = "struct { int newInt; float newFloat; }";
	std::string actual = pdie->second.type->getCtype();
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	// Attempt a weave; should fail
	CompoundType ct3;
	ct3.addType(new FloatType(32), "newFloat3");
	ct3.addType(new IntegerType(32, 0), "newInt3");
	dim.addItem(0x1004, "weaveStruct1", &ct3);
	pdie = dim.find(0x1004);
	expected = "firstFloat";
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	// Totally unaligned
	dim.addItem(0x1001, "weaveStruct2", &ct3);
	pdie = dim.find(0x1001);
	expected = "firstInt";
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	dim.addItem(0x1004, "firstInt", new IntegerType(32, 1));		// Should fail
	pdie = dim.find(0x1004);
	expected = "firstFloat";
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	// Set up three ints
	dim.deleteItem(0x1004);
	dim.addItem(0x1004, "firstInt", new IntegerType(32, 1));	// Definately signed
	dim.deleteItem(0x1008);
	dim.addItem(0x1008, "firstInt", new IntegerType(32, 0));	// Unknown signedess
	// then, add an array over the three integers
	ArrayType at(new IntegerType(32, 0), 3);
	dim.addItem(0x1000, "newArray", &at);
	pdie = dim.find(0x1005);					// Check middle element
	expected = "newArray";
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);
	pdie = dim.find(0x1000);					// Check first
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);
	pdie = dim.find(0x100B);					// Check last
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	// Already have an array of 3 ints at 0x1000. Put a new array completely before, then with only one word overlap
	dim.addItem(0xF00, "newArray2", &at);
	pdie = dim.find(0x1000);					// Shouyld still be newArray at 0x1000
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	pdie = dim.find(0xF00);
	expected = "newArray2";
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	dim.addItem(0xFF8, "newArray3", &at);		// Should fail
	pdie = dim.find(0xFF8);
	unsigned ue = 0;							// Expect NULL
	unsigned ua = (unsigned)pdie;
	CPPUNIT_ASSERT_EQUAL(ue, ua);
}
开发者ID:PhuongLam94,项目名称:Boomerang-Production,代码行数:92,代码来源:TypeTest.cpp

示例13: testDataInterval

/*==============================================================================
 * FUNCTION:		TypeTest::testDataInterval
 * OVERVIEW:		Test the DataIntervalMap class
 *============================================================================*/
void TypeTest::testDataInterval() {
	DataIntervalMap dim;

	Prog* prog = new Prog;
	UserProc* proc = (UserProc*) prog->newProc("test", 0x123);
	std::string name("test");
	proc->setSignature(Signature::instantiate(PLAT_PENTIUM, CONV_C, name.c_str()));
	dim.setProc(proc);

	dim.addItem(0x1000, "first", new IntegerType(32, 1));
	dim.addItem(0x1004, "second", new FloatType(64));
	std::string actual(dim.prints());
	std::string expected("0x1000 first int\n"
		"0x1004 second double\n");
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	DataIntervalEntry* pdie = dim.find(0x1000);
	expected = "first";
	CPPUNIT_ASSERT(pdie);
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	pdie = dim.find(0x1003);
	CPPUNIT_ASSERT(pdie);
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	pdie = dim.find(0x1004);
	CPPUNIT_ASSERT(pdie);
	expected = "second";
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);
	
	pdie = dim.find(0x1007);
	CPPUNIT_ASSERT(pdie);
	actual = pdie->second.name;
	CPPUNIT_ASSERT_EQUAL(expected, actual);
	
	CompoundType ct;
	ct.addType(new IntegerType(16, 1), "short1");
	ct.addType(new IntegerType(16, 1), "short2");
	ct.addType(new IntegerType(32, 1), "int1");
	ct.addType(new FloatType(32), "float1");
	dim.addItem(0x1010, "struct1", &ct);

	ComplexTypeCompList& ctcl = ct.compForAddress(0x1012, dim);
	unsigned ua = ctcl.size();
	unsigned ue = 1;
	CPPUNIT_ASSERT_EQUAL(ue, ua);
	ComplexTypeComp& ctc = ctcl.front();
	ue = 0;
	ua = ctc.isArray;
	CPPUNIT_ASSERT_EQUAL(ue, ua);
	expected = "short2";
	actual = ctc.u.memberName;
	CPPUNIT_ASSERT_EQUAL(expected, actual);

	// An array of 10 struct1's
	ArrayType at(&ct, 10);
	dim.addItem(0x1020, "array1", &at);
	ComplexTypeCompList& ctcl2 = at.compForAddress(0x1020+0x3C+8, dim);
	// Should be 2 components: [5] and .float1
	ue = 2;
	ua = ctcl2.size();
	CPPUNIT_ASSERT_EQUAL(ue, ua);
	ComplexTypeComp& ctc0 = ctcl2.front();
	ComplexTypeComp& ctc1 = ctcl2.back();
	ue = 1;
	ua = ctc0.isArray;
	CPPUNIT_ASSERT_EQUAL(ue, ua);
	ue = 5;
	ua = ctc0.u.index;
	CPPUNIT_ASSERT_EQUAL(ue, ua);
	ue = 0;
	ua = ctc1.isArray;
	CPPUNIT_ASSERT_EQUAL(ue, ua);
	expected = "float1";
	actual = ctc1.u.memberName;
	CPPUNIT_ASSERT_EQUAL(expected, actual);
}
开发者ID:PhuongLam94,项目名称:Boomerang-Production,代码行数:84,代码来源:TypeTest.cpp

示例14: GetRoomTemp

float GetRoomTemp (long int day, float t_comf, float t_eco)
{
	
	switch (day_prog[day-1])   // 0 index refer to MON, 1 to TU, etc
	{
		case PROG1:  
		return P1.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG2:  
		return P2.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG3:  
		return P3.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG4:  
		return P4.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG5:  
		return P5.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG6:  
		return P6.SetRoomTempr(t_comf, t_eco);
		break;
	
		case PROG7:  
		return P7.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG8:  
		return P8.SetRoomTempr(t_comf, t_eco);
		break;
		
		case PROG9:  
		return P9.SetRoomTempr(t_comf, t_eco);
		break;
		
		default:
		return P1.SetRoomTempr(t_comf, t_eco);
	}
	
}
开发者ID:AlexTriman,项目名称:WetherDependentRegulation,代码行数:46,代码来源:climate.cpp

示例15: draw

void draw(void)   
{
	p.run();
}
开发者ID:JonnyGrilli,项目名称:yr3ood,代码行数:4,代码来源:main.cpp


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