FOSSredder 0.5.0
Loading...
Searching...
No Matches
core::domain::policies::statement Namespace Reference

Functions

std::string trimCopy (std::string value)
 Trims leading and trailing whitespace from text.
std::string normalizeId (std::string value)
 Normalizes a transaction identifier.
void normalizeIds (std::vector< std::string > &values)
 Normalizes and deduplicates transaction identifiers.
bool containsTransactionId (const std::vector< std::string > &transactionIds, const std::string &value)
 Checks whether a statement already contains a transaction id.
std::size_t indexOfTransactionId (const std::vector< std::string > &transactionIds, const std::string &value)
 Returns the index of a transaction id.
bool hasUniqueTransactionIds (const std::vector< std::string > &transactionIds)
 Checks whether a transaction id list contains duplicates.

Function Documentation

◆ containsTransactionId()

bool core::domain::policies::statement::containsTransactionId ( const std::vector< std::string > & transactionIds,
const std::string & value )

Checks whether a statement already contains a transaction id.

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

Definition at line 40 of file StatementPolicy.cpp.

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

◆ hasUniqueTransactionIds()

bool core::domain::policies::statement::hasUniqueTransactionIds ( const std::vector< std::string > & transactionIds)

Checks whether a transaction id list contains duplicates.

Parameters
transactionIdsTransaction id list to inspect.
Returns
true when all non-empty ids are unique.

Definition at line 54 of file StatementPolicy.cpp.

◆ indexOfTransactionId()

std::size_t core::domain::policies::statement::indexOfTransactionId ( const std::vector< std::string > & transactionIds,
const std::string & value )

Returns the index of a transaction id.

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

Definition at line 45 of file StatementPolicy.cpp.

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

◆ normalizeId()

std::string core::domain::policies::statement::normalizeId ( std::string value)

Normalizes a transaction identifier.

Parameters
valueRaw transaction id.
Returns
Normalized transaction id.

Definition at line 20 of file StatementPolicy.cpp.

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

◆ normalizeIds()

void core::domain::policies::statement::normalizeIds ( std::vector< std::string > & values)

Normalizes and deduplicates transaction identifiers.

Parameters
valuesTransaction id list to mutate.

Definition at line 24 of file StatementPolicy.cpp.

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

◆ trimCopy()

std::string core::domain::policies::statement::trimCopy ( std::string value)

Trims leading and trailing whitespace from text.

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

Definition at line 16 of file StatementPolicy.cpp.

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