EchoesOfFate
A game for our COMP315 Project
 
Loading...
Searching...
No Matches
QuestionList.h
Go to the documentation of this file.
1#pragma once
2#include "Question.h"
3#include <iostream>
4
8
10private:
11 std::vector<Question> questions;
12 int current;
13
14public:
16 QuestionList(const Question &q);
17 QuestionList(std::vector<Question> &questions);
19 QuestionList(std::string QuestionTextFileName);
20 bool checkQuestionExist(const Question &q);
21 void addLast(const Question &q);
22 bool insert(const Question &q, int index);
23 void remove(int index);
26 std::vector<Question> getQuestions();
27
28};
Definition Question.h:5
bool checkQuestionExist(const Question &q)
checks if a question already exists in the QuestionList
Definition QuestionList.cpp:117
int numberOfQuestions()
Definition QuestionList.cpp:161
bool insert(const Question &q, int index)
adds a Question at a specific index in the QuestionList
Definition QuestionList.cpp:136
void addLast(const Question &q)
adds a Question to the back of the QuestionList
Definition QuestionList.cpp:127
void remove(int index)
Removes from a Question from an index in the QuesstionList.
Definition QuestionList.cpp:145
std::vector< Question > getQuestions()
returns a vector of Questions
Definition QuestionList.cpp:166
Question & getCurrentQuestion()
iterates through the QuestionList-returns the current question and moves the current variable to the ...
Definition QuestionList.cpp:152
QuestionList()
Definition QuestionList.cpp:4