Update ooo320-m1
[ooovba.git] / lingucomponent / source / languageguessing / guess.hxx
blob4c8a1c42ddf3d174f29aab7dce789cba8c4dcbdb
1 /***************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: guess.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef GUESS_H
31 #define GUESS_H
33 #define GUESS_SEPARATOR_OPEN '['
34 #define GUESS_SEPARATOR_CLOSE ']'
35 #define GUESS_SEPARATOR_SEP '-'
36 #define DEFAULT_LANGUAGE ""
37 #define DEFAULT_COUNTRY ""
38 #define DEFAULT_ENCODING ""
40 #include <string>
42 using namespace std;
44 /**
45 @author Jocelyn Merand
47 class Guess{
48 public:
50 /**
51 * Default init
53 Guess();
55 /**
56 * Init from a string like [en-UK-utf8] and the rank
58 Guess(char * guess_str);
60 ~Guess();
62 string GetLanguage();
63 string GetCountry();
64 string GetEncoding();
66 bool operator==(string lang);
68 protected:
69 string language_str;
70 string country_str;
71 string encoding_str;
74 #endif