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

#include <EntityName.h>

Public Member Functions

const std::string & value () const noexcept
 EntityName ()=default
 EntityName (std::string value)
 Creates a normalized entity name 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 entity name length.
static std::string normalize (std::string value)
 Trims leading and trailing whitespace from a name.
static bool isValid (const std::string &value)
 Checks whether a raw name is valid.

Detailed Description

Definition at line 16 of file EntityName.h.

Constructor & Destructor Documentation

◆ EntityName() [1/2]

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

◆ EntityName() [2/2]

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

Creates a normalized entity name from raw input.

Parameters
valueRaw entity name text.

Definition at line 20 of file EntityName.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

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

Checks whether the stored value is empty.

Returns
true when no normalized name is stored.

Definition at line 47 of file EntityName.cpp.

Here is the caller graph for this function:

◆ isValid()

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

Checks whether a raw name is valid.

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

Definition at line 42 of file EntityName.cpp.

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

◆ maxLength()

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

Returns the maximum supported entity name length.

Returns
Maximum accepted character count.

Definition at line 25 of file EntityName.cpp.

Here is the caller graph for this function:

◆ normalize()

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

Trims leading and trailing whitespace from a name.

Parameters
valueRaw name text.
Returns
Trimmed name text or an empty string.

Definition at line 29 of file EntityName.cpp.

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

◆ value()

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

Definition at line 23 of file EntityName.cpp.

Here is the caller graph for this function:

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