OpenCPN Partial API docs
|
Standard, mostly strings utilities. More...
Functions | |
bool | endswith (const std::string &str, const std::string &suffix) |
bool | startswith (const std::string &str, const std::string &prefix) |
std::vector< std::string > | split (const char *token_string, const std::string &delimiter) |
std::vector< std::string > | split (const std::string &string, const std::string &delimiter) |
bool | exists (const std::string &name) |
void | mkdir (const std::string path) |
std::string | ltrim (std::string s) |
std::string | rtrim (std::string s) |
std::string | trim (std::string s) |
std::string | join (std::vector< std::string > v, char c) |
std::string | tolower (const std::string &input) |
bool | replace (std::string &str, const std::string &from, const std::string &to) |
void | copy_file (const std::string &src_path, const std::string &dest_path) |
bool | N0183CheckSumOk (const std::string &sentence) |
Check if checksum in a NMEA0183 sentence is correct. | |
std::string | printable (const std::string str) |
Return copy of str with non-printable chars replaced by hex like "<0D>". | |
std::string | get_basename (const char *path) |
bool | store_metadata (const char *path) |
Store metadata in metadata cache, return success/fail. | |
std::string | lookup_metadata (const char *name=0) |
Get metadata path for a given name defaulting to ocpn-plugins.xml) | |
bool | store_tarball (const char *path, const char *basename) |
Store a tarball in tarball cache, return success/fail. | |
std::string | lookup_tarball (const char *basename) |
Get path to tarball in cache for given filename. | |
unsigned | cache_file_count () |
Return number of files in cache. | |
unsigned long | cache_size () |
Return total size of files in cache in kbytes. | |
void | cache_clear () |
Remove all files in cache: | |
Standard, mostly strings utilities.
void ocpn::cache_clear | ( | ) |
Remove all files in cache:
Definition at line 163 of file plugin_cache.cpp.
unsigned ocpn::cache_file_count | ( | ) |
Return number of files in cache.
Definition at line 115 of file plugin_cache.cpp.
unsigned long ocpn::cache_size | ( | ) |
Return total size of files in cache in kbytes.
Definition at line 132 of file plugin_cache.cpp.
void ocpn::copy_file | ( | const std::string & | src_path, |
const std::string & | dest_path | ||
) |
Definition at line 140 of file ocpn_utils.cpp.
bool ocpn::endswith | ( | const std::string & | str, |
const std::string & | suffix | ||
) |
Definition at line 45 of file ocpn_utils.cpp.
bool ocpn::exists | ( | const std::string & | name | ) |
Definition at line 75 of file ocpn_utils.cpp.
std::string ocpn::get_basename | ( | const char * | path | ) |
Definition at line 68 of file plugin_cache.cpp.
std::string ocpn::join | ( | std::vector< std::string > | v, |
char | c | ||
) |
Definition at line 116 of file ocpn_utils.cpp.
std::string ocpn::lookup_metadata | ( | const char * | name = 0 | ) |
Get metadata path for a given name defaulting to ocpn-plugins.xml)
Definition at line 93 of file plugin_cache.cpp.
std::string ocpn::lookup_tarball | ( | const char * | basename | ) |
Get path to tarball in cache for given filename.
Definition at line 109 of file plugin_cache.cpp.
std::string ocpn::ltrim | ( | std::string | s | ) |
Definition at line 93 of file ocpn_utils.cpp.
void ocpn::mkdir | ( | const std::string | path | ) |
Definition at line 83 of file ocpn_utils.cpp.
bool ocpn::N0183CheckSumOk | ( | const std::string & | sentence | ) |
Check if checksum in a NMEA0183 sentence is correct.
sentence | complete NMEA01832 message |
Definition at line 150 of file ocpn_utils.cpp.
std::string ocpn::printable | ( | const std::string | str | ) |
Return copy of str with non-printable chars replaced by hex like "<0D>".
Definition at line 167 of file ocpn_utils.cpp.
bool ocpn::replace | ( | std::string & | str, |
const std::string & | from, | ||
const std::string & | to | ||
) |
Definition at line 133 of file ocpn_utils.cpp.
std::string ocpn::rtrim | ( | std::string | s | ) |
Definition at line 101 of file ocpn_utils.cpp.
std::vector< std::string > ocpn::split | ( | const char * | token_string, |
const std::string & | delimiter | ||
) |
Definition at line 55 of file ocpn_utils.cpp.
std::vector< std::string > ocpn::split | ( | const std::string & | string, |
const std::string & | delimiter | ||
) |
Definition at line 70 of file ocpn_utils.cpp.
bool ocpn::startswith | ( | const std::string & | str, |
const std::string & | prefix | ||
) |
Definition at line 50 of file ocpn_utils.cpp.
bool ocpn::store_metadata | ( | const char * | path | ) |
Store metadata in metadata cache, return success/fail.
Definition at line 84 of file plugin_cache.cpp.
bool ocpn::store_tarball | ( | const char * | path, |
const char * | basename | ||
) |
Store a tarball in tarball cache, return success/fail.
Definition at line 101 of file plugin_cache.cpp.
std::string ocpn::tolower | ( | const std::string & | input | ) |
Definition at line 127 of file ocpn_utils.cpp.
std::string ocpn::trim | ( | std::string | s | ) |
Definition at line 110 of file ocpn_utils.cpp.