FOSSredder 0.5.0
Loading...
Searching...
No Matches
Annual Class Reference

#include <Annual.h>

Public Member Functions

 Annual ()
 Annual (const Annual &)=delete
 Annual (Annual &&)=delete
Annual & operator= (const Annual &)=delete
Annual & operator= (Annual &&)=delete
void rename (EntityName value)
 Renames the annual aggregate with normalized entity text.
void rename (std::string value)
 Renames the annual aggregate with raw text.
void setYear (Year value)
 Sets the annual year from a value object.
void setYear (int value)
 Sets the annual year from raw input.
void apply (std::string nameValue, int yearValue, std::vector< std::string > analysisIdsValue)
 Applies the complete annual definition in one normalized domain step.
void setAnalysisIds (std::vector< std::string > value)
 Replaces the linked analysis ids with normalized values.
void addAnalysisId (std::string value)
 Adds an analysis id when it is not already present.
void insertAnalysisId (std::string value, std::size_t position)
 Inserts an analysis id at a requested position.
void removeAnalysisId (const std::string &value)
 Removes an analysis id from the annual aggregate.
void clearAnalysisIds ()
 Clears all linked analysis ids.
bool containsAnalysisId (const std::string &value) const
 Checks whether an analysis id exists.
std::size_t indexOfAnalysisId (const std::string &value) const
 Returns the index of an analysis id.
void moveAnalysisId (const std::string &value, std::size_t newPosition)
 Moves an analysis id to a new position.
std::size_t analysisCount () const noexcept
 Returns the number of linked analysis ids.
bool hasYear () const noexcept
 Checks whether the annual year is valid.
bool isEmpty () const noexcept
 Checks whether the annual aggregate is empty.
const std::string & id () const noexcept
const std::string & name () const noexcept
const int & year () const noexcept
const std::vector< std::string > & analysisIds () const noexcept
const std::string & createdAt () const noexcept
const std::string & updatedAt () const noexcept
void setId (std::string value)
void setCreatedAt (std::string value)
void setUpdatedAt (std::string value)

Detailed Description

Definition at line 20 of file Annual.h.

Constructor & Destructor Documentation

◆ Annual() [1/3]

core::domain::Annual::Annual ( )
default

◆ Annual() [2/3]

core::domain::Annual::Annual ( const Annual & )
delete

◆ Annual() [3/3]

core::domain::Annual::Annual ( Annual && )
delete

Member Function Documentation

◆ addAnalysisId()

void core::domain::Annual::addAnalysisId ( std::string value)

Adds an analysis id when it is not already present.

Parameters
valueAnalysis id to add.

Definition at line 43 of file Annual.cpp.

◆ analysisCount()

std::size_t core::domain::Annual::analysisCount ( ) const
nodiscardnoexcept

Returns the number of linked analysis ids.

Returns
Analysis relation count.

Definition at line 105 of file Annual.cpp.

◆ analysisIds()

const std::vector< std::string > & core::domain::Annual::analysisIds ( ) const
nodiscardnoexcept

Definition at line 120 of file Annual.cpp.

◆ apply()

void core::domain::Annual::apply ( std::string nameValue,
int yearValue,
std::vector< std::string > analysisIdsValue )

Applies the complete annual definition in one normalized domain step.

Parameters
nameValueRaw annual name text.
yearValueRaw year value.
analysisIdsValueAnalysis id list to store.

Definition at line 32 of file Annual.cpp.

◆ clearAnalysisIds()

void core::domain::Annual::clearAnalysisIds ( )

Clears all linked analysis ids.

Definition at line 69 of file Annual.cpp.

◆ containsAnalysisId()

bool core::domain::Annual::containsAnalysisId ( const std::string & value) const
nodiscard

Checks whether an analysis id exists.

Parameters
valueAnalysis id to search for.
Returns
true when the analysis id exists.

Definition at line 73 of file Annual.cpp.

◆ createdAt()

const std::string & core::domain::Annual::createdAt ( ) const
nodiscardnoexcept

Definition at line 121 of file Annual.cpp.

◆ hasYear()

bool core::domain::Annual::hasYear ( ) const
nodiscardnoexcept

Checks whether the annual year is valid.

Returns
true when the year passes value-object validation.

Definition at line 109 of file Annual.cpp.

◆ id()

const std::string & core::domain::Annual::id ( ) const
nodiscardnoexcept

Definition at line 117 of file Annual.cpp.

◆ indexOfAnalysisId()

std::size_t core::domain::Annual::indexOfAnalysisId ( const std::string & value) const
nodiscard

Returns the index of an analysis id.

Parameters
valueAnalysis id to search for.
Returns
Matching index or the list size when not found.

Definition at line 77 of file Annual.cpp.

◆ insertAnalysisId()

void core::domain::Annual::insertAnalysisId ( std::string value,
std::size_t position )

Inserts an analysis id at a requested position.

Parameters
valueAnalysis id to insert.
positionTarget insertion position.

Definition at line 51 of file Annual.cpp.

◆ isEmpty()

bool core::domain::Annual::isEmpty ( ) const
nodiscardnoexcept

Checks whether the annual aggregate is empty.

Returns
true when name, year and analysis ids are empty.

Definition at line 113 of file Annual.cpp.

◆ moveAnalysisId()

void core::domain::Annual::moveAnalysisId ( const std::string & value,
std::size_t newPosition )

Moves an analysis id to a new position.

Parameters
valueAnalysis id to move.
newPositionNew insertion position.

Definition at line 86 of file Annual.cpp.

◆ name()

const std::string & core::domain::Annual::name ( ) const
nodiscardnoexcept

Definition at line 118 of file Annual.cpp.

◆ operator=() [1/2]

Annual & core::domain::Annual::operator= ( Annual && )
delete

◆ operator=() [2/2]

Annual & core::domain::Annual::operator= ( const Annual & )
delete

◆ removeAnalysisId()

void core::domain::Annual::removeAnalysisId ( const std::string & value)

Removes an analysis id from the annual aggregate.

Parameters
valueAnalysis id to remove.

Definition at line 64 of file Annual.cpp.

◆ rename() [1/2]

void core::domain::Annual::rename ( EntityName value)

Renames the annual aggregate with normalized entity text.

Parameters
valueNormalized entity name wrapper.

Definition at line 16 of file Annual.cpp.

◆ rename() [2/2]

void core::domain::Annual::rename ( std::string value)

Renames the annual aggregate with raw text.

Parameters
valueRaw entity name text.

Definition at line 20 of file Annual.cpp.

◆ setAnalysisIds()

void core::domain::Annual::setAnalysisIds ( std::vector< std::string > value)

Replaces the linked analysis ids with normalized values.

Parameters
valueAnalysis id list to store.

Definition at line 38 of file Annual.cpp.

◆ setCreatedAt()

void core::domain::Annual::setCreatedAt ( std::string value)

Definition at line 124 of file Annual.cpp.

◆ setId()

void core::domain::Annual::setId ( std::string value)

Definition at line 123 of file Annual.cpp.

◆ setUpdatedAt()

void core::domain::Annual::setUpdatedAt ( std::string value)

Definition at line 125 of file Annual.cpp.

◆ setYear() [1/2]

void core::domain::Annual::setYear ( int value)

Sets the annual year from raw input.

Parameters
valueRaw year value.

Definition at line 28 of file Annual.cpp.

◆ setYear() [2/2]

void core::domain::Annual::setYear ( Year value)

Sets the annual year from a value object.

Parameters
valueNormalized year wrapper.

Definition at line 24 of file Annual.cpp.

◆ updatedAt()

const std::string & core::domain::Annual::updatedAt ( ) const
nodiscardnoexcept

Definition at line 122 of file Annual.cpp.

◆ year()

const int & core::domain::Annual::year ( ) const
nodiscardnoexcept

Definition at line 119 of file Annual.cpp.


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