Visual Computing Library
Loading...
Searching...
No Matches
vcl::FileFormat Class Reference

The FileFormat class represents a file format. More...

#include <vclib/io/file_format.h>

Public Member Functions

constexpr FileFormat (const char *extension, std::string description="")
 
constexpr FileFormat (const std::string &extension, std::string description="")
 
constexpr FileFormat (Range auto extensions, std::string description="")
 
const std::string & description () const
 
const std::vector< std::string > & extensions () const
 
bool matchExtension (std::string extension) const
 
auto operator<=> (const FileFormat &other) const
 A FileFormat is equal to another if at least one extension is equal. The description is not considered.
 
bool operator== (const FileFormat &other) const
 

Static Private Member Functions

static constexpr void clearExtension (std::string &extension)
 

Private Attributes

std::vector< std::string > mExtensions
 
std::string mDescription
 

Detailed Description

The FileFormat class represents a file format.

A format is defined by a list of extensions and a description.

Member Function Documentation

◆ operator<=>()

auto vcl::FileFormat::operator<=> ( const FileFormat other) const
inline

A FileFormat is equal to another if at least one extension is equal. The description is not considered.

Otherwise, the comparison is based on the first extension.

Note
This is a lexicographical comparison.
Parameters
other
Returns
a std::strong_ordering value indicating the comparison result

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