105 bool LoadBinary(
const wxString &filename, ArrayOfCDI &dir_array_check);
106 bool SaveBinary(
const wxString &filename) {
107 return ChartDatabase::Write(filename);
110 int BuildChartStack(
ChartStack *cstk,
float lat,
float lon,
int groupIndex);
111 int BuildChartStack(
ChartStack *cstk,
float lat,
float lon,
int db_add,
115 wxString GetFullPath(
ChartStack *ps,
int stackindex);
116 int GetStackChartScale(
ChartStack *ps,
int stackindex,
char *buf,
int nbuf);
117 int GetCSPlyPoint(
ChartStack *ps,
int stackindex,
int plyindex,
float *lat,
119 ChartTypeEnum GetCSChartType(
ChartStack *ps,
int stackindex);
120 ChartFamilyEnum GetCSChartFamily(
ChartStack *ps,
int stackindex);
121 bool SearchForChartDir(
const wxString &dir);
123 bool bLargest, ChartTypeEnum New_Type,
124 ChartFamilyEnum New_Family_Fallback);
126 wxArrayPtrVoid *GetChartCache(
void) {
return pChartCache; }
129 int GetStackEntry(
ChartStack *ps, wxString fp);
130 bool IsChartInCache(
int dbindex);
131 bool IsChartInCache(wxString path);
132 bool IsChartInGroup(
const int db_index,
const int group);
133 bool IsENCInGroup(
const int group);
134 bool IsNonMBTileInGroup(
const int group);
135 bool IsChartDirectoryExcluded(
const std::string &chart_file);
138 ChartInitFlag iflag = FULL_INIT);
139 ChartBase *OpenChartFromDB(
int index, ChartInitFlag init_flag);
140 ChartBase *OpenChartFromDBAndLock(
int index, ChartInitFlag init_flag,
142 ChartBase *OpenChartFromDBAndLock(wxString chart_path,
143 ChartInitFlag init_flag);
144 ChartBase *OpenChartFromDB(wxString chart_path, ChartInitFlag init_flag);
146 void ApplyColorSchemeToCachedCharts(ColorScheme cs);
148 void PurgeCachePlugins();
149 bool DeleteCacheChart(
ChartBase *pChart);
151 void LockCache(
bool bl) { m_b_locked = bl; }
152 void LockCache() { m_b_locked =
true; }
153 void UnLockCache() { m_b_locked =
false; }
154 bool IsCacheLocked() {
return m_b_locked; }
155 wxXmlDocument GetXMLDescription(
int dbIndex,
bool b_getGeom);
157 bool LockCacheChart(
int index);
158 bool IsChartLocked(
int index);
160 void UnLockCacheChart(
int index);
161 void UnLockAllCacheCharts();
163 void ClearCacheInUseFlags(
void);
164 void PurgeCacheUnusedCharts(
double factor);
166 bool IsBusy() {
return m_b_busy; }
167 void SetBusy(
bool _busy) { m_b_busy = _busy; }
168 bool CheckExclusiveTileGroup(
int canvasIndex);
169 bool CheckAnyCanvasExclusiveTileGroup();
172 virtual ChartBase *GetChart(
const wxChar *theFilePath,
176 InitReturn CreateChartTableEntry(wxString full_name,
ChartTableEntry *pEntry);
178 int SearchDirAndAddSENC(wxString &dir,
bool bshow_prog,
bool bupdate);
179 bool CreateS57SENCChartTableEntry(wxString full_name,
ChartTableEntry *pEntry,
181 bool CheckPositionWithinChart(
int index,
float lat,
float lon);
182 ChartBase *OpenChartUsingCache(
int dbindex, ChartInitFlag init_flag);
183 CacheEntry *FindOldestDeleteCandidate(
bool blog);
184 void DeleteCacheEntry(
int i,
bool bDelTexture =
false,
185 const wxString &msg = wxEmptyString);
186 void DeleteCacheEntry(
CacheEntry *pce,
bool bDelTexture =
false,
187 const wxString &msg = wxEmptyString);
189 wxArrayPtrVoid *pChartCache;
195 wxCriticalSection m_critSect;
196 wxMutex m_cache_mutex;
197 int m_checkGroupIndex[2];
198 bool m_checkedTileOnly[2];
Represents an entry in the chart table, containing information about a single chart.