Added getters/setters to Instruction.

This commit is contained in:
Andrew Lalis 2018-02-12 20:00:59 +01:00
parent 30df250c7c
commit c7072f949f
2 changed files with 31 additions and 4 deletions

View File

@ -1,6 +1,17 @@
#include "model/recipe/instruction.h"
Instruction::Instruction()
{
Instruction::Instruction(){
setHTML("");
}
Instruction::Instruction(string text){
setHTML(text);
}
string Instruction::getHTML(){
return this->htmlText;
}
void Instruction::setHTML(string newText){
this->htmlText = newText;
}

View File

@ -1,11 +1,27 @@
#ifndef INSTRUCTION_H
#define INSTRUCTION_H
#include <string>
using namespace std;
/**
* @brief The Instruction class is meant to hold an HTML document in string form, which holds formatted text as the instructions for the recipe.
*/
class Instruction
{
public:
Instruction();
Instruction(string text);
//Getters
string getHTML();
//Setters
void setHTML(string newText);
private:
string htmlText;
};
#endif // INSTRUCTION_H