|
OpenCPN Partial API docs
|
Manages the chart database and provides access to chart data. More...
#include <chartdb.h>
Public Member Functions | |
| bool | LoadBinary (const wxString &filename, ArrayOfCDI &dir_array_check) |
| Load the chart database from a binary file. | |
| bool | SaveBinary (const wxString &filename) |
| int | BuildChartStack (ChartStack *cstk, float lat, float lon, int groupIndex) |
| int | BuildChartStack (ChartStack *cstk, float lat, float lon, int db_add, int groupIndex) |
| bool | EqualStacks (ChartStack *, ChartStack *) |
| bool | CopyStack (ChartStack *pa, ChartStack *pb) |
| wxString | GetFullPath (ChartStack *ps, int stackindex) |
| int | GetStackChartScale (ChartStack *ps, int stackindex, char *buf, int nbuf) |
| int | GetCSPlyPoint (ChartStack *ps, int stackindex, int plyindex, float *lat, float *lon) |
| ChartTypeEnum | GetCSChartType (ChartStack *ps, int stackindex) |
| ChartFamilyEnum | GetCSChartFamily (ChartStack *ps, int stackindex) |
| bool | SearchForChartDir (const wxString &dir) |
| ChartBase * | OpenStackChartConditional (ChartStack *ps, int start_index, bool bLargest, ChartTypeEnum New_Type, ChartFamilyEnum New_Family_Fallback) |
| wxArrayPtrVoid * | GetChartCache (void) |
| std::vector< int > | GetCSArray (ChartStack *ps) |
| int | GetStackEntry (ChartStack *ps, wxString fp) |
| bool | IsChartInCache (int dbindex) |
| bool | IsChartInCache (wxString path) |
| bool | IsChartInGroup (const int db_index, const int group) |
| bool | IsENCInGroup (const int group) |
| bool | IsNonMBTileInGroup (const int group) |
| bool | IsChartDirectoryExcluded (const std::string &chart_file) |
| ChartBase * | OpenChartFromStack (ChartStack *pStack, int StackEntry, ChartInitFlag iflag=FULL_INIT) |
| ChartBase * | OpenChartFromDB (int index, ChartInitFlag init_flag) |
| ChartBase * | OpenChartFromDBAndLock (int index, ChartInitFlag init_flag, bool lock=true) |
| ChartBase * | OpenChartFromDBAndLock (wxString chart_path, ChartInitFlag init_flag) |
| ChartBase * | OpenChartFromDB (wxString chart_path, ChartInitFlag init_flag) |
| void | ApplyColorSchemeToCachedCharts (ColorScheme cs) |
| void | PurgeCache () |
| void | PurgeCachePlugins () |
| bool | DeleteCacheChart (ChartBase *pChart) |
| void | LockCache (bool bl) |
| void | LockCache () |
| void | UnLockCache () |
| bool | IsCacheLocked () |
| wxXmlDocument | GetXMLDescription (int dbIndex, bool b_getGeom) |
| bool | LockCacheChart (int index) |
| bool | IsChartLocked (int index) |
| void | UnLockCacheChart (int index) |
| void | UnLockAllCacheCharts () |
| void | ClearCacheInUseFlags (void) |
| void | PurgeCacheUnusedCharts (double factor) |
| bool | IsBusy () |
| void | SetBusy (bool _busy) |
| bool | CheckExclusiveTileGroup (int canvasIndex) |
| bool | CheckAnyCanvasExclusiveTileGroup () |
Public Member Functions inherited from ChartDatabase | |
| void | OnEvtThread (OCPN_ChartTableEntryThreadEvent &event) |
| void | OnAnyEvent (wxEvent &event) |
| bool | Create (ArrayOfCDI &dir_array, wxGenericProgressDialog *pprog) |
| Creates a new chart database from a list of directories. | |
| bool | Update (ArrayOfCDI &dir_array, bool bForce, wxGenericProgressDialog *pprog) |
| Updates the chart database. | |
| void | FinalizeChartUpdate () |
| bool | Read (const wxString &filePath) |
| bool | Write (const wxString &filePath) |
| bool | AddSingleChart (wxString &fullpath, bool b_force_full_search=true) |
| bool | RemoveSingleChart (wxString &ChartFullPath) |
| const wxString & | GetDBFileName () const |
| ArrayOfCDI & | GetChartDirArray () |
| wxArrayString & | GetChartDirArrayString () |
| void | SetChartDirArray (ArrayOfCDI array) |
| bool | CompareChartDirArray (ArrayOfCDI &test_array) |
| wxString | GetMagicNumberCached (wxString dir) |
| void | UpdateChartClassDescriptorArray (void) |
| bool | UpdateChartDatabaseInplace (ArrayOfCDI &DirArray, bool b_force, wxGenericProgressDialog *_prog) |
| std::vector< std::shared_ptr< ChartTableEntry > > & | GetChartTable () |
| int | GetChartTableEntries () const |
| ChartTableEntry & | GetChartTableEntry (int index) const |
| bool | IsValid () const |
| int | DisableChart (wxString &PathToDisable) |
| bool | GetCentroidOfLargestScaleChart (double *clat, double *clon, ChartFamilyEnum family) |
| int | GetDBChartType (int dbIndex) |
| int | GetDBChartFamily (int dbIndex) |
| float | GetDBChartSkew (int dbIndex) |
| int | GetDBChartProj (int dbIndex) |
| int | GetDBChartScale (int dbIndex) |
| bool | GetDBBoundingBox (int dbindex, LLBBox &box) |
| const LLBBox & | GetDBBoundingBox (int dbIndex) |
| int | GetnAuxPlyEntries (int dbIndex) |
| int | GetDBPlyPoint (int dbIndex, int plyindex, float *lat, float *lon) |
| int | GetDBAuxPlyPoint (int dbIndex, int plyindex, int iAuxPly, float *lat, float *lon) |
| int | GetVersion () |
| wxString | GetFullChartInfo (ChartBase *pc, int dbIndex, int *char_width, int *line_count) |
| int | FinddbIndex (wxString PathToFind) |
| wxString | GetDBChartFileName (int dbIndex) |
| void | ApplyGroupArray (ChartGroupArray *pGroupArray) |
| bool | IsChartAvailable (int dbIndex) |
| std::vector< float > | GetReducedPlyPoints (int dbIndex) |
| std::vector< float > | GetReducedAuxPlyPoints (int dbIndex, int iTable) |
| bool | IsBusy () |
| void | SetBusy (bool _busy) |
| bool | ScrubGroupArray () |
| ChartTableEntry * | CreateChartTableEntry (const wxString &filePath, wxString &utf8Path, ChartClassDescriptor &chart_desc) |
| void | OnDBSProgressUpdate (wxCommandEvent &evt) |
Protected Member Functions | |
| virtual ChartBase * | GetChart (const wxChar *theFilePath, ChartClassDescriptor &chart_desc) const |
Protected Member Functions inherited from ChartDatabase | |
| int | AddChartDirectory (const wxString &theDir, bool bshow_prog) |
| void | SetValid (bool valid) |
Additional Inherited Members | |
Public Attributes inherited from ChartDatabase | |
| std::map< wxString, int > | active_chartTable_pathindex |
| std::vector< std::shared_ptr< ChartTableEntry > > | active_chartTable |
Protected Attributes inherited from ChartDatabase | |
| std::vector< ChartClassDescriptor > | m_ChartClassDescriptorArray |
| ArrayOfCDI | m_dir_array |
| bool | m_b_busy |
Manages the chart database and provides access to chart data.
Responsible for loading, saving, and managing the chart database. Provides methods for building chart stacks, opening charts, and managing the chart cache.
| ChartDB::ChartDB | ( | ) |
Definition at line 209 of file chartdb.cpp.
|
virtual |
Definition at line 235 of file chartdb.cpp.
| void ChartDB::ApplyColorSchemeToCachedCharts | ( | ColorScheme | cs | ) |
Definition at line 1480 of file chartdb.cpp.
| int ChartDB::BuildChartStack | ( | ChartStack * | cstk, |
| float | lat, | ||
| float | lon, | ||
| int | db_add, | ||
| int | groupIndex | ||
| ) |
Definition at line 466 of file chartdb.cpp.
| int ChartDB::BuildChartStack | ( | ChartStack * | cstk, |
| float | lat, | ||
| float | lon, | ||
| int | groupIndex | ||
| ) |
Definition at line 475 of file chartdb.cpp.
| bool ChartDB::CheckAnyCanvasExclusiveTileGroup | ( | ) |
Definition at line 1822 of file chartdb.cpp.
| bool ChartDB::CheckExclusiveTileGroup | ( | int | canvasIndex | ) |
Definition at line 1781 of file chartdb.cpp.
| void ChartDB::ClearCacheInUseFlags | ( | void | ) |
Definition at line 319 of file chartdb.cpp.
| bool ChartDB::CopyStack | ( | ChartStack * | pa, |
| ChartStack * | pb | ||
| ) |
Definition at line 770 of file chartdb.cpp.
| bool ChartDB::DeleteCacheChart | ( | ChartBase * | pChart | ) |
Definition at line 1449 of file chartdb.cpp.
| bool ChartDB::EqualStacks | ( | ChartStack * | pa, |
| ChartStack * | pb | ||
| ) |
Definition at line 755 of file chartdb.cpp.
|
protectedvirtual |
Reimplemented from ChartDatabase.
Definition at line 405 of file chartdb.cpp.
| std::vector< int > ChartDB::GetCSArray | ( | ChartStack * | ps | ) |
Definition at line 876 of file chartdb.cpp.
| ChartFamilyEnum ChartDB::GetCSChartFamily | ( | ChartStack * | ps, |
| int | stackindex | ||
| ) |
Definition at line 848 of file chartdb.cpp.
| ChartTypeEnum ChartDB::GetCSChartType | ( | ChartStack * | ps, |
| int | stackindex | ||
| ) |
Definition at line 839 of file chartdb.cpp.
| int ChartDB::GetCSPlyPoint | ( | ChartStack * | ps, |
| int | stackindex, | ||
| int | plyindex, | ||
| float * | lat, | ||
| float * | lon | ||
| ) |
Definition at line 792 of file chartdb.cpp.
| wxString ChartDB::GetFullPath | ( | ChartStack * | ps, |
| int | stackindex | ||
| ) |
Definition at line 783 of file chartdb.cpp.
| int ChartDB::GetStackChartScale | ( | ChartStack * | ps, |
| int | stackindex, | ||
| char * | buf, | ||
| int | nbuf | ||
| ) |
Definition at line 812 of file chartdb.cpp.
| int ChartDB::GetStackEntry | ( | ChartStack * | ps, |
| wxString | fp | ||
| ) |
Definition at line 827 of file chartdb.cpp.
| wxXmlDocument ChartDB::GetXMLDescription | ( | int | dbIndex, |
| bool | b_getGeom | ||
| ) |
Definition at line 1551 of file chartdb.cpp.
| bool ChartDB::IsChartDirectoryExcluded | ( | const std::string & | chart_file | ) |
Definition at line 456 of file chartdb.cpp.
| bool ChartDB::IsChartInCache | ( | int | dbindex | ) |
Definition at line 889 of file chartdb.cpp.
| bool ChartDB::IsChartInCache | ( | wxString | path | ) |
Definition at line 909 of file chartdb.cpp.
| bool ChartDB::IsChartInGroup | ( | const int | db_index, |
| const int | group | ||
| ) |
Definition at line 638 of file chartdb.cpp.
| bool ChartDB::IsChartLocked | ( | int | index | ) |
Definition at line 928 of file chartdb.cpp.
| bool ChartDB::IsENCInGroup | ( | const int | group | ) |
Definition at line 656 of file chartdb.cpp.
| bool ChartDB::IsNonMBTileInGroup | ( | const int | group | ) |
Definition at line 687 of file chartdb.cpp.
| bool ChartDB::LoadBinary | ( | const wxString & | filename, |
| ArrayOfCDI & | dir_array_check | ||
| ) |
Load the chart database from a binary file.
| filename | Name of the file to load |
| dir_array_check | Array to store directory information |
Definition at line 242 of file chartdb.cpp.
| bool ChartDB::LockCacheChart | ( | int | index | ) |
Definition at line 945 of file chartdb.cpp.
| ChartBase * ChartDB::OpenChartFromDB | ( | int | index, |
| ChartInitFlag | init_flag | ||
| ) |
Definition at line 993 of file chartdb.cpp.
| ChartBase * ChartDB::OpenChartFromDB | ( | wxString | chart_path, |
| ChartInitFlag | init_flag | ||
| ) |
Definition at line 997 of file chartdb.cpp.
| ChartBase * ChartDB::OpenChartFromDBAndLock | ( | int | index, |
| ChartInitFlag | init_flag, | ||
| bool | lock = true |
||
| ) |
Definition at line 1008 of file chartdb.cpp.
| ChartBase * ChartDB::OpenChartFromDBAndLock | ( | wxString | chart_path, |
| ChartInitFlag | init_flag | ||
| ) |
Definition at line 1016 of file chartdb.cpp.
| ChartBase * ChartDB::OpenChartFromStack | ( | ChartStack * | pStack, |
| int | StackEntry, | ||
| ChartInitFlag | iflag = FULL_INIT |
||
| ) |
Definition at line 1003 of file chartdb.cpp.
| ChartBase * ChartDB::OpenStackChartConditional | ( | ChartStack * | ps, |
| int | start_index, | ||
| bool | bLargest, | ||
| ChartTypeEnum | New_Type, | ||
| ChartFamilyEnum | New_Family_Fallback | ||
| ) |
Definition at line 1507 of file chartdb.cpp.
| void ChartDB::PurgeCache | ( | ) |
Definition at line 279 of file chartdb.cpp.
| void ChartDB::PurgeCachePlugins | ( | ) |
Definition at line 294 of file chartdb.cpp.
| void ChartDB::PurgeCacheUnusedCharts | ( | double | factor | ) |
Definition at line 333 of file chartdb.cpp.
|
inline |
| void ChartDB::UnLockAllCacheCharts | ( | ) |
Definition at line 978 of file chartdb.cpp.
| void ChartDB::UnLockCacheChart | ( | int | index | ) |
Definition at line 963 of file chartdb.cpp.