/
Sentence.h
53 lines (35 loc) · 847 Bytes
/
Sentence.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef SENTENCE_H
#define SENTENCE_H
class Sentence;
class Paragraph;
#include "Word.h"
#include <vector>
class Sentence {
public:
Sentence();
~Sentence();
Sentence(const Sentence& aSen);
Sentence(const string& aString);
void show();
friend Sentence operator+(const Word& a, const Sentence& b);
friend Paragraph operator+(const Sentence& a, const Sentence& b);
friend ostream& operator<<(ostream& out, const Sentence& b);
Sentence operator+(const Word& a);
//postfix
Sentence operator++(int);
Sentence operator--(int);
//postfix
Sentence& operator=(const Sentence& aSen);
Sentence& operator+(const int& i);
//prefix
Sentence& operator++();
Sentence& operator--();
//prefix
Word first();
Sentence rest();
Word* head;
Sentence* next;
private:
vector<string> v; //delete vector or not?
};
#endif