OpenCPN Partial API docs
Loading...
Searching...
No Matches
chartdb_thread.cpp
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright (C) 2026 by David S. Register *
3
* *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
8
* *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
13
* *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; if not, see <https://www.gnu.org/licenses/>. *
16
***************************************************************************/
17
24
#include <wx/wx.h>
25
26
#include "
chartdb.h
"
27
#include "
chartdbs.h
"
28
#include "
chartdb_thread.h
"
29
30
wxDEFINE_EVENT(wxEVT_OCPN_CHARTTABLEENTRYTHREAD,
31
OCPN_ChartTableEntryThreadEvent
);
32
33
// Static globals
34
extern
ChartDB
*
ChartData
;
35
36
// ChartTableEntryJobTicket implementation
37
bool
ChartTableEntryJobTicket::DoJob() {
38
// printf("DoJob\n");
39
ChartDatabase
*db =
dynamic_cast<
ChartDatabase
*
>
(
ChartData
);
40
ChartTableEntry
*pnewChartTableEntry =
41
db->CreateChartTableEntry(m_ChartPath, m_ChartPath, chart_desc);
42
if
(pnewChartTableEntry) {
43
std::shared_ptr<ChartTableEntry> safe_ptr(pnewChartTableEntry);
44
m_chart_table_entry = safe_ptr;
// class member
45
}
46
47
return
true
;
48
}
ChartData
ChartDB * ChartData
Global instance.
Definition
chartdb.cpp:72
chartdb.h
Charts database management
ChartData
ChartDB * ChartData
Global instance.
Definition
chartdb.cpp:72
chartdb_thread.h
Define threaded chart database classes.
chartdbs.h
Basic chart info storage.
ChartDB
Manages the chart database and provides access to chart data.
Definition
chartdb.h:95
ChartDatabase
Manages a database of charts, including reading, writing, and querying chart information.
Definition
chartdbs.h:304
OCPN_ChartTableEntryThreadEvent
Definition
chartdb_thread.h:118
ChartTableEntry
Represents an entry in the chart table, containing information about a single chart.
Definition
chartdbs.h:187
gui
src
chartdb_thread.cpp
Generated on Fri Jan 16 2026 03:03:27 for OpenCPN Partial API docs by
1.9.8