Added getters/setters to Instruction.
This commit is contained in:
parent
30df250c7c
commit
c7072f949f
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
#endif // INSTRUCTION_H
|
||||
|
|
Loading…
Reference in New Issue