OpenCPN Partial API docs
TCDataFactory.h
1
/***************************************************************************
2
*
3
* Project: OpenCPN
4
*
5
***************************************************************************
6
* Copyright (C) 2013 by David S. Register *
7
* *
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU General Public License as published by *
10
* the Free Software Foundation; either version 2 of the License, or *
11
* (at your option) any later version. *
12
* *
13
* This program is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU General Public License *
19
* along with this program; if not, write to the *
20
* Free Software Foundation, Inc., *
21
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22
**************************************************************************/
23
24
#ifndef __TCDATAFACTORY_H__
25
#define __TCDATAFACTORY_H__
26
27
#include <wx/string.h>
28
#include <wx/dynarray.h>
29
#include "TC_Error_Code.h"
30
31
#define NUMUNITS 4
32
33
#define REGION 1
34
#define COUNTRY 2
35
#define STATE 3
36
37
class
IDX_entry
;
38
39
typedef
enum
{ LENGTH, VELOCITY, BOGUS } unit_type;
40
41
typedef
struct
{
42
const
char
*name;
43
const
char
*abbrv;
44
unit_type type;
45
double
conv_factor;
46
}
unit
;
47
48
class
abbr_entry
{
49
public
:
50
int
type;
51
wxString short_s;
52
wxString long_s;
53
};
54
55
class
TCDataFactory
{
56
public
:
57
TCDataFactory
() {}
58
virtual
~
TCDataFactory
() {}
59
60
virtual
TC_Error_Code LoadData(
const
wxString &data_file_path) = 0;
61
62
virtual
int
GetMaxIndex(
void
) = 0;
63
virtual
IDX_entry
*GetIndexEntry(
int
n_index) = 0;
64
65
static
int
findunit(
const
char
*
unit
);
66
static
const
unit
known_units[NUMUNITS];
67
68
wxString source_ident;
69
};
70
71
#endif
IDX_entry
Definition:
IDX_entry.h:41
TCDataFactory
Definition:
TCDataFactory.h:55
abbr_entry
Definition:
TCDataFactory.h:48
unit
Definition:
TCDataFactory.h:41
gui
include
gui
TCDataFactory.h
Generated on Thu Aug 1 2024 11:18:00 for OpenCPN Partial API docs by
1.9.1