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) |
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) |
std::string | get_basename (const char *path) |
bool | store_metadata (const char *path) |
Store metadata in metadata cache, return success/fail. More... | |
std::string | lookup_metadata (const char *name=0) |
Get metadata path for a given name defaulting to ocpn-plugins.xml) More... | |
bool | store_tarball (const char *path, const char *basename) |
Store a tarball in tarball cache, return success/fail. More... | |
std::string | lookup_tarball (const char *basename) |
Get path to tarball in cache for given filename. More... | |
unsigned | cache_file_count () |
Return number of files in cache. More... | |
unsigned long | cache_size () |
Return total size of files in cache in kbytes. More... | |
void | cache_clear () |
Remove all files in cache: More... | |
Standard, mostly strings utilities.
void ocpn::cache_clear | ( | ) |
Remove all files in cache:
Definition at line 164 of file plugin_cache.cpp.
unsigned ocpn::cache_file_count | ( | ) |
Return number of files in cache.
Definition at line 116 of file plugin_cache.cpp.
unsigned long ocpn::cache_size | ( | ) |
Return total size of files in cache in kbytes.
Definition at line 133 of file plugin_cache.cpp.
void ocpn::copy_file | ( | const std::string & | src_path, |
const std::string & | dest_path | ||
) |
Definition at line 133 of file ocpn_utils.cpp.
bool ocpn::endswith | ( | const std::string & | str, |
const std::string & | suffix | ||
) |
Definition at line 43 of file ocpn_utils.cpp.
bool ocpn::exists | ( | const std::string & | name | ) |
Definition at line 68 of file ocpn_utils.cpp.
std::string ocpn::get_basename | ( | const char * | path | ) |
Definition at line 69 of file plugin_cache.cpp.
std::string ocpn::join | ( | std::vector< std::string > | v, |
char | c | ||
) |
Definition at line 109 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 94 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 110 of file plugin_cache.cpp.
std::string ocpn::ltrim | ( | std::string | s | ) |
Definition at line 86 of file ocpn_utils.cpp.
void ocpn::mkdir | ( | const std::string | path | ) |
Definition at line 76 of file ocpn_utils.cpp.
bool ocpn::replace | ( | std::string & | str, |
const std::string & | from, | ||
const std::string & | to | ||
) |
Definition at line 126 of file ocpn_utils.cpp.
std::string ocpn::rtrim | ( | std::string | s | ) |
Definition at line 94 of file ocpn_utils.cpp.
std::vector< std::string > ocpn::split | ( | const char * | token_string, |
const std::string & | delimiter | ||
) |
Definition at line 53 of file ocpn_utils.cpp.
bool ocpn::startswith | ( | const std::string & | str, |
const std::string & | prefix | ||
) |
Definition at line 48 of file ocpn_utils.cpp.
bool ocpn::store_metadata | ( | const char * | path | ) |
Store metadata in metadata cache, return success/fail.
Definition at line 85 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 102 of file plugin_cache.cpp.
std::string ocpn::tolower | ( | const std::string & | input | ) |
Definition at line 120 of file ocpn_utils.cpp.
std::string ocpn::trim | ( | std::string | s | ) |
Definition at line 103 of file ocpn_utils.cpp.