vocfile.H
1 /*
2  Vocatra, a small and fast vocabulary trainer
3  Copyright (C) 2006-2008 Oliver Sauder <os@esite.ch>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License
7  as published by the Free Software Foundation; either version 2
8  of the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19 
20 #ifndef _VOCFILE_H
21 #define _VOCFILE_H
22 
23 #include "vocstruct.H"
24 
28 class CVocFile
29 {
30 private:
35  void trim(std::string &str);
36 
46  size_t checkLine(std::string &line);
47 
53  void seperateWords(std::string str,std::vector<std::string> &words);
54 
64  void addWordToVocabulary(const SWord &word,std::vector<SWord> &vocabulary,
65  const bool &bSynonym,const enVocLang &enLang);
66 
67 public:
72  CVocFile(char* filename);
73 
83  void AppendVocabulary(std::vector<SWord> &vocabulary,
84  const bool &bSynonym,const enVocLang &enLang);
85 
86 
87 private:
89  std::string m_strFilename;
90 };
91 
92 #endif //_VOCFILE_H

Get Vocatra at SourceForge.net. Fast, secure and Free Open Source software downloads Generated for Vocatra by doxygen