File: zstring.h

package info (click to toggle)
mozzemberek 0.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 168 kB
  • ctags: 111
  • sloc: cpp: 686; makefile: 111
file content (50 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (3)
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
/*
  Copyright (c) 2004, TUBITAK/UEKAE

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  Please read the COPYING file.
*/

#ifndef ZSTRING_H
#define ZSTRING_H

#include <string>
#include <vector>

using namespace std;

enum Z_CHECK_RESULT {
    Z_TRUE = 0,
    Z_FALSE,
    Z_SUGGESTION,
    Z_UNKNOWN
};

class ZString
{
public:
    ZString(const string& str, int offset );

    void setStatus( enum Z_CHECK_RESULT status );
    void setSuggestions( const vector<string>& suggestions);
    void addSuggestion( const string& suggestion );

    int offset() const;
    const string& str() const;
    enum Z_CHECK_RESULT status() const;
    const vector<string>& suggestions() const;
    int suggestionCount() const;
    const string suggestionString() const;

private:
    int _offset;
    enum Z_CHECK_RESULT _status;
    const string _str;
    vector<string> _suggestions;
};

#endif // ZSTRING_H