Fishnet 2.0.1
Framework for Graph-Based Analysis of GIS Vector Data
Loading...
Searching...
No Matches
fishnet::AbstractGISFile Class Referenceabstract

#include <GISFile.hpp>

Inheritance diagram for fishnet::AbstractGISFile:

Public Member Functions

const std::filesystem::path & getPath () const noexcept
 
 operator bool () const noexcept
 
bool exists () const noexcept
 Tests if the GISFile exists on the filesystem.
 
bool supports (const std::filesystem::path &path) const noexcept
 Checks if the supplied path is supported by the concrete GISFile implementation.
 
void changeFilename (const std::string &filename) noexcept
 Modifies the path of the GISFile by changing the filename (extension is preserved).
 
void appendToFilename (const std::string &suffix) noexcept
 Appends a suffix to the filename / stem of the GISFile (extension is preserved).
 
virtual constexpr GISFileType type () const noexcept=0
 Returns the type of GISFile.
 
virtual bool remove () const noexcept=0
 Removes the file from the filesystem.
 
virtual ~AbstractGISFile ()=default
 

Protected Member Functions

void supportsOrThrow (const std::filesystem::path &path) const
 

Protected Attributes

std::filesystem::path pathToFile
 

Friends

class AbstractVectorFile
 
class AbstractRasterFile
 

Detailed Description

Abstract class representing a GISFile, can only be inherited by predefined classes, namely AbstractVectorFile and AbstractRasterFile.

Constructor & Destructor Documentation

◆ ~AbstractGISFile()

virtual fishnet::AbstractGISFile::~AbstractGISFile ( )
virtualdefault

Member Function Documentation

◆ appendToFilename()

void fishnet::AbstractGISFile::appendToFilename ( const std::string &  suffix)
inlinenoexcept

Appends a suffix to the filename / stem of the GISFile (extension is preserved).

Parameters
suffixsuffix to append to the filename / stem

◆ changeFilename()

void fishnet::AbstractGISFile::changeFilename ( const std::string &  filename)
inlinenoexcept

Modifies the path of the GISFile by changing the filename (extension is preserved).

Parameters
filenamenew file stem of the GISFile

◆ exists()

bool fishnet::AbstractGISFile::exists ( ) const
inlinenoexcept

Tests if the GISFile exists on the filesystem.

Returns
true
false

◆ getPath()

const std::filesystem::path & fishnet::AbstractGISFile::getPath ( ) const
inlinenoexcept

◆ operator bool()

fishnet::AbstractGISFile::operator bool ( ) const
inlinenoexcept

◆ remove()

virtual bool fishnet::AbstractGISFile::remove ( ) const
pure virtualnoexcept

Removes the file from the filesystem.

Returns
true success
false error

Implemented in fishnet::GeoPackage, fishnet::GeoTiff, fishnet::AbstractVectorFile, and fishnet::Shapefile.

◆ supports()

bool fishnet::AbstractGISFile::supports ( const std::filesystem::path &  path) const
inlinenoexcept

Checks if the supplied path is supported by the concrete GISFile implementation.

Parameters
path
Returns
true
false

◆ supportsOrThrow()

void fishnet::AbstractGISFile::supportsOrThrow ( const std::filesystem::path &  path) const
inlineprotected

◆ type()

virtual constexpr GISFileType fishnet::AbstractGISFile::type ( ) const
constexprpure virtualnoexcept

Returns the type of GISFile.

Returns
constexpr GISFileType

Implemented in fishnet::GeoPackage, fishnet::GeoTiff, fishnet::AbstractVectorFile, and fishnet::Shapefile.

Friends And Related Symbol Documentation

◆ AbstractRasterFile

friend class AbstractRasterFile
friend

◆ AbstractVectorFile

friend class AbstractVectorFile
friend

Member Data Documentation

◆ pathToFile

std::filesystem::path fishnet::AbstractGISFile::pathToFile
protected

The documentation for this class was generated from the following file: