OpenCPN Partial API docs
Loading...
Searching...
No Matches
filters_on_disk.cpp File Reference

Implement filters_on_disk.h. More...

#include <fstream>
#include "model/filters_on_disk.h"
#include "std_filesystem.h"
#include "model/base_platform.h"

Go to the source code of this file.

Functions

std::vector< std::string > filters_on_disk::List (bool include_system=false)
 Return list of filters, possibly including also the system ones.
 
bool filters_on_disk::Exists (const std::string &name)
 Return true iff filter with given name exists, either system or user defined.
 
bool filters_on_disk::Remove (const std::string &name)
 Remove a filter, return ok if no errors.
 
bool filters_on_disk::Write (const NavmsgFilter &filter, const std::string &name)
 Write contents for given filter to disk.
 
NavmsgFilter filters_on_disk::Read (const std::string &name)
 Read filter with given name from disk.
 
bool filters_on_disk::IsSystemFilter (std::string &name)
 Return true iff name refers to a read-only system filter.
 

Variables

BasePlatformg_BasePlatform
 

Detailed Description

Implement filters_on_disk.h.

Definition in file filters_on_disk.cpp.

Function Documentation

◆ Exists()

bool filters_on_disk::Exists ( const std::string &  name)

Return true iff filter with given name exists, either system or user defined.

Definition at line 62 of file filters_on_disk.cpp.

◆ IsSystemFilter()

bool filters_on_disk::IsSystemFilter ( std::string &  name)

Return true iff name refers to a read-only system filter.

Definition at line 96 of file filters_on_disk.cpp.

◆ List()

std::vector< std::string > filters_on_disk::List ( bool  include_system)

Return list of filters, possibly including also the system ones.

Definition at line 50 of file filters_on_disk.cpp.

◆ Read()

NavmsgFilter filters_on_disk::Read ( const std::string &  name)

Read filter with given name from disk.

Definition at line 85 of file filters_on_disk.cpp.

◆ Remove()

bool filters_on_disk::Remove ( const std::string &  name)

Remove a filter, return ok if no errors.

Definition at line 68 of file filters_on_disk.cpp.

◆ Write()

bool filters_on_disk::Write ( const NavmsgFilter filter,
const std::string &  name 
)

Write contents for given filter to disk.

Definition at line 75 of file filters_on_disk.cpp.

Variable Documentation

◆ g_BasePlatform

BasePlatform* g_BasePlatform
extern

Definition at line 87 of file base_platform.cpp.