예제 #1
0
파일: student.cpp 프로젝트: Blaubart/itest
uint Student::replaceOccurrences(const QString & old_qname, const QString & new_qname)
{
    QuestionAnswer qans = s_results->value(old_qname, QuestionAnswer());
    uint n = s_results->remove(old_qname);
    if (n > 0) { s_results->insert(new_qname, qans); }
    return n;
}
void vTableQuestions_A()
{

	// Class A:  Question 0-9
	
	// Only consider this class for this answer

	// Is there a vTable for this class?
	// (1 - true, 0 - false)

	QuestionAnswer( 0 , 0 );

	// How many jump vectors(pointers to functions) are in the vTable?
	//  (0 - no table, 1-N - number of jump vectors)?

	QuestionAnswer( 1 , 0 );

	// Next 8 questions, fill in the jump vector
	// Add the function label number 
	// Order is important, do not reorder the classes

	// 1st jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 2 , 0 );

	// 2nd jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 3 , 0 );

	// 3rd jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 4 , 0 );

	// 4th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 5 , 0 );

	// 5th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 6 , 0 );

	// 6th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 7 , 0 );

	// 7th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 8 , 0 );

	// 8th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 9 , 0 );


}
void vTableQuestions_C()
{

	// Class C:  Question 20-29
	
	// Only consider this class for this answer

	// Is there a vTable for this class?
	// (1 - true, 0 - false)

	QuestionAnswer( 20 , 1 );

	// How many jump vectors(pointers to functions) are in the vTable?
	//  (0 - no table, 1-N - number of jump vectors)?

	QuestionAnswer( 21 , 1 );

	// Next 8 questions, fill in the jump vector
	// Add the function label number 
	// Order is important, do not reorder the classes

	// 1st jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 22 , 0xc001 );

	// 2nd jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 23 , 0 );

	// 3rd jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 24 , 0 );

	// 4th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 25 , 0 );

	// 5th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 26 , 0 );

	// 6th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 27 , 0 );

	// 7th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 28 , 0 );

	// 8th jump vector ?
    // (label number, 0- otherwise)

	QuestionAnswer( 29 , 0 );


}