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

#include <Statement.h>

Public Member Functions

 Statement ()
 Statement (const Statement &)=delete
Statement & operator= (const Statement &)=delete
 Statement (Statement &&)=delete
Statement & operator= (Statement &&)=delete
void rename (EntityName value)
 Renames the statement with normalized entity text.
void rename (std::string value)
 Renames the statement with raw text.
void addTransaction (std::string value)
 Adds a normalized transaction id when it is not already present.
void setTransactionIds (std::vector< std::string > value)
 Replaces the transaction id list with normalized values.
void insertTransaction (std::string value, std::size_t position)
 Inserts a transaction id at a requested position.
void removeTransaction (const std::string &value)
 Removes a transaction id from the statement.
std::size_t indexOfTransaction (const std::string &value) const
 Returns the index of a transaction id.
bool hasTransactionAt (std::size_t index) const noexcept
 Checks whether a transaction exists at a given index.
void moveTransaction (const std::string &value, std::size_t newPosition)
 Moves a transaction id to a new position.
bool containsTransaction (const std::string &value) const
 Checks whether a transaction id exists.
void clearTransactions ()
 Clears all linked transactions.
std::size_t transactionCount () const noexcept
 Returns the number of linked transactions.
bool empty () const noexcept
 Checks whether the statement is empty.
const std::string & id () const noexcept
const std::string & name () const noexcept
const std::vector< std::string > & transactionIds () 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 19 of file Statement.h.

Constructor & Destructor Documentation

◆ Statement() [1/3]

core::domain::Statement::Statement ( )
default
Here is the caller graph for this function:

◆ Statement() [2/3]

core::domain::Statement::Statement ( const Statement & )
delete
Here is the call graph for this function:

◆ Statement() [3/3]

core::domain::Statement::Statement ( Statement && )
delete
Here is the call graph for this function:

Member Function Documentation

◆ addTransaction()

void core::domain::Statement::addTransaction ( std::string value)

Adds a normalized transaction id when it is not already present.

Parameters
valueTransaction id to add.

Definition at line 24 of file Statement.cpp.

Here is the call graph for this function:

◆ clearTransactions()

void core::domain::Statement::clearTransactions ( )

Clears all linked transactions.

Definition at line 86 of file Statement.cpp.

◆ containsTransaction()

bool core::domain::Statement::containsTransaction ( const std::string & value) const
nodiscard

Checks whether a transaction id exists.

Parameters
valueTransaction id to search for.
Returns
true when the id exists.

Definition at line 82 of file Statement.cpp.

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

◆ createdAt()

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

Definition at line 101 of file Statement.cpp.

Here is the caller graph for this function:

◆ empty()

bool core::domain::Statement::empty ( ) const
nodiscardnoexcept

Checks whether the statement is empty.

Returns
true when no transactions are linked.

Definition at line 94 of file Statement.cpp.

Here is the caller graph for this function:

◆ hasTransactionAt()

bool core::domain::Statement::hasTransactionAt ( std::size_t index) const
nodiscardnoexcept

Checks whether a transaction exists at a given index.

Parameters
indexIndex to inspect.
Returns
true when the index is within bounds.

Definition at line 59 of file Statement.cpp.

◆ id()

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

Definition at line 98 of file Statement.cpp.

◆ indexOfTransaction()

std::size_t core::domain::Statement::indexOfTransaction ( const std::string & value) const
nodiscard

Returns the index of a transaction id.

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

Definition at line 55 of file Statement.cpp.

Here is the call graph for this function:

◆ insertTransaction()

void core::domain::Statement::insertTransaction ( std::string value,
std::size_t position )

Inserts a transaction id at a requested position.

Parameters
valueTransaction id to insert.
positionTarget insertion position.

Definition at line 37 of file Statement.cpp.

Here is the call graph for this function:

◆ moveTransaction()

void core::domain::Statement::moveTransaction ( const std::string & value,
std::size_t newPosition )

Moves a transaction id to a new position.

Parameters
valueTransaction id to move.
newPositionNew insertion position.

Definition at line 63 of file Statement.cpp.

Here is the call graph for this function:

◆ name()

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

Definition at line 99 of file Statement.cpp.

Here is the caller graph for this function:

◆ operator=() [1/2]

Statement & core::domain::Statement::operator= ( const Statement & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

Statement & core::domain::Statement::operator= ( Statement && )
delete
Here is the call graph for this function:

◆ removeTransaction()

void core::domain::Statement::removeTransaction ( const std::string & value)

Removes a transaction id from the statement.

Parameters
valueTransaction id to remove.

Definition at line 50 of file Statement.cpp.

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

◆ rename() [1/2]

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

Renames the statement with normalized entity text.

Parameters
valueNormalized entity name wrapper.

Definition at line 16 of file Statement.cpp.

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

◆ rename() [2/2]

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

Renames the statement with raw text.

Parameters
valueRaw entity name text.

Definition at line 20 of file Statement.cpp.

Here is the call graph for this function:

◆ setCreatedAt()

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

Definition at line 104 of file Statement.cpp.

Here is the caller graph for this function:

◆ setId()

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

Definition at line 103 of file Statement.cpp.

Here is the caller graph for this function:

◆ setTransactionIds()

void core::domain::Statement::setTransactionIds ( std::vector< std::string > value)

Replaces the transaction id list with normalized values.

Parameters
valueTransaction id list to store.

Definition at line 32 of file Statement.cpp.

Here is the call graph for this function:

◆ setUpdatedAt()

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

Definition at line 105 of file Statement.cpp.

Here is the caller graph for this function:

◆ transactionCount()

std::size_t core::domain::Statement::transactionCount ( ) const
nodiscardnoexcept

Returns the number of linked transactions.

Returns
Transaction count.

Definition at line 90 of file Statement.cpp.

◆ transactionIds()

const std::vector< std::string > & core::domain::Statement::transactionIds ( ) const
nodiscardnoexcept

Definition at line 100 of file Statement.cpp.

Here is the caller graph for this function:

◆ updatedAt()

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

Definition at line 102 of file Statement.cpp.

Here is the caller graph for this function:

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