KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Word.h
Go to the documentation of this file.
1 #ifndef WORD_H_
2 #define WORD_H_
3 
11 #include <iostream>
12 #include <string>
13 #include <vector>
14 
15 #include "spear/RCIPtr.h"
16 #include "spear/Wide.h"
17 
18 namespace spear {
19 
20 class Word {
21 
22  public:
23 
24  Word(const String & w,
25  const String & t) : _word(w), _tag(t) {};
26 
27  Word(const spear::Word & word)
28  : _word(word.getWord()), _tag(word.getTag()) {};
29 
31  _word = word.getWord();
32  _tag = word.getTag();
33  return (* this);
34  }
35 
36  const String & getWord() const { return _word; };
37 
38  const String & getTag() const { return _tag; };
39 
40  void setTag(const String & tag) { _tag = tag; };
41 
42  private:
43 
44  String _word;
45 
46  String _tag;
47 
48 };
49 
50 } // end namespace spear
51 
52 #endif
Reference counting pointer class This file contains the code for the classes and class templates maki...
const String & getWord() const
Definition: Word.h:36
spear::Word & operator=(const spear::Word &word)
Definition: Word.h:30
const String & getTag() const
Definition: Word.h:38
Definition: Word.h:20
#define String
Definition: Wide.h:36
Word(const spear::Word &word)
Definition: Word.h:27
Word(const String &w, const String &t)
Definition: Word.h:24
void setTag(const String &tag)
Definition: Word.h:40