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

Functions

std::string trimCopy (std::string value)
 Trims leading and trailing whitespace from text.
std::string canonicalAliasValue (std::string value)
 Canonicalizes an alias string for comparison.
void normalizeAlias (Alias &alias)
 Normalizes a single alias in place.
void normalizeAliases (std::vector< Alias > &aliases)
 Normalizes and deduplicates a list of aliases.
bool containsAliasValue (const std::vector< Alias > &aliases, const std::string &value)
 Checks whether an alias list already contains a value.
void removeAliasValue (std::vector< Alias > &aliases, const std::string &value)
 Removes aliases with a given value.
void normalizeAliasUsage (Alias &alias)
 Normalizes alias usage metadata in place.
void recordAliasHit (std::vector< Alias > &aliases, const std::string &value, const std::string &timestamp={})
 Records or updates a hit for an alias value.

Function Documentation

◆ canonicalAliasValue()

std::string core::domain::policies::alias::canonicalAliasValue ( std::string value)

Canonicalizes an alias string for comparison.

Parameters
valueRaw alias text.
Returns
Canonical alias text.

Definition at line 20 of file AliasPolicy.cpp.

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

◆ containsAliasValue()

bool core::domain::policies::alias::containsAliasValue ( const std::vector< Alias > & aliases,
const std::string & value )

Checks whether an alias list already contains a value.

Parameters
aliasesAlias list to inspect.
valueAlias text to search for.
Returns
true when a matching alias exists.

Definition at line 47 of file AliasPolicy.cpp.

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

◆ normalizeAlias()

void core::domain::policies::alias::normalizeAlias ( Alias & alias)

Normalizes a single alias in place.

Parameters
aliasAlias instance to normalize.

Definition at line 22 of file AliasPolicy.cpp.

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

◆ normalizeAliases()

void core::domain::policies::alias::normalizeAliases ( std::vector< Alias > & aliases)

Normalizes and deduplicates a list of aliases.

Parameters
aliasesAlias list to normalize in place.

Definition at line 36 of file AliasPolicy.cpp.

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

◆ normalizeAliasUsage()

void core::domain::policies::alias::normalizeAliasUsage ( Alias & alias)

Normalizes alias usage metadata in place.

Parameters
aliasAlias to normalize.

Definition at line 57 of file AliasPolicy.cpp.

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

◆ recordAliasHit()

void core::domain::policies::alias::recordAliasHit ( std::vector< Alias > & aliases,
const std::string & value,
const std::string & timestamp = {} )

Records or updates a hit for an alias value.

Parameters
aliasesAlias collection to mutate.
valueAlias text that was hit.
timestampOptional timestamp override.

Definition at line 66 of file AliasPolicy.cpp.

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

◆ removeAliasValue()

void core::domain::policies::alias::removeAliasValue ( std::vector< Alias > & aliases,
const std::string & value )

Removes aliases with a given value.

Parameters
aliasesAlias list to mutate.
valueAlias text to remove.

Definition at line 52 of file AliasPolicy.cpp.

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

◆ trimCopy()

std::string core::domain::policies::alias::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 AliasPolicy.cpp.

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