FOSSredder 0.5.0
Loading...
Searching...
No Matches
core::domain::ExportFormat Class Reference

#include <ExportFormat.h>

Public Member Functions

const std::string & value () const noexcept
 ExportFormat ()=default
 ExportFormat (std::string value)
 Creates a normalized export format from raw input.
bool empty () const noexcept
 Checks whether the stored value is empty.

Static Public Member Functions

static constexpr std::size_t maxLength () noexcept
 Returns the maximum supported export format length.
static std::string normalize (std::string value)
 Trims leading and trailing whitespace from an export format.
static bool isValid (const std::string &value)
 Checks whether a raw export format is valid.

Detailed Description

Definition at line 16 of file ExportFormat.h.

Constructor & Destructor Documentation

◆ ExportFormat() [1/2]

core::domain::ExportFormat::ExportFormat ( )
default
Here is the call graph for this function:

◆ ExportFormat() [2/2]

core::domain::ExportFormat::ExportFormat ( std::string value)
explicit

Creates a normalized export format from raw input.

Parameters
valueRaw export format text.

Definition at line 20 of file ExportFormat.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

bool core::domain::ExportFormat::empty ( ) const
noexcept

Checks whether the stored value is empty.

Returns
true when no normalized export format is stored.

Definition at line 47 of file ExportFormat.cpp.

Here is the caller graph for this function:

◆ isValid()

bool core::domain::ExportFormat::isValid ( const std::string & value)
static

Checks whether a raw export format is valid.

Parameters
valueRaw export format text.
Returns
true when the normalized text is non-empty and within the length limit.

Definition at line 42 of file ExportFormat.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxLength()

std::size_t core::domain::ExportFormat::maxLength ( )
staticconstexprnoexcept

Returns the maximum supported export format length.

Returns
Maximum accepted character count.

Definition at line 25 of file ExportFormat.cpp.

Here is the caller graph for this function:

◆ normalize()

std::string core::domain::ExportFormat::normalize ( std::string value)
static

Trims leading and trailing whitespace from an export format.

Parameters
valueRaw export format text.
Returns
Trimmed export format text or an empty string.

Definition at line 29 of file ExportFormat.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value()

const std::string & core::domain::ExportFormat::value ( ) const
noexcept

Definition at line 23 of file ExportFormat.cpp.

Here is the caller graph for this function:

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