|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
Manages and tracks associations between budget items and their tags. More...
#include <BudgetTagManager.hpp>
Public Member Functions | |
| BudgetTagManager ()=default | |
| BudgetTagManager (BudgetItemTags associations) | |
| Full initialisation constructor for associating and tracking budget items and their tags. | |
| BudgetItemTags | associated (const budgeting::BudgetItemTypes &type) const |
| Retrieves the tag associations for budget items of a specified type. | |
| const BudgetItemTags & | associations () const noexcept |
| Retrieves the current associations between budget items and their tags. | |
| void | changeAssociation (const BudgetItemTags::ItemTags &itemTags) |
| Updates the association between a budget item and its descriptive tags. | |
| bool | hasAssociation (const budgeting::BudgetItemIdentifier &id) const noexcept |
| Checks whether a specific budget item has any associated tags. | |
| bool | isAssociated (const Tag &check) const noexcept |
| Determines if a given tag is currently associated with any budget item. | |
| const Tags & | possible () const noexcept |
| Retrieves the complete set of possible tags for the budget items. | |
| void | remove (const Tags &forRemoval) |
| Removes the specified tags from the global set of possible tags. | |
| void | removeAssociation (const budgeting::BudgetItemIdentifier &id) |
| Removes the association for a specific budget item identifier and its tags. | |
| void | renameAssociation (const budgeting::BudgetItemIdentifier &original, const budgeting::BudgetSource &changed) |
| Renames an existing association between a budget item and its tags. | |
Manages and tracks associations between budget items and their tags.
It provides an interface to manage and query tags associated with budget items. It also identifies the set of possible tags across all budget items based on the provided data. The primary purpose is to facilitate the organisation of budget items with their tags and enable querying operations such as retrieving tag associations based on specific attributes.
|
default |
|
explicit |
Full initialisation constructor for associating and tracking budget items and their tags.
It initialises the internal structures for managing budget items and their tag associations. It also determines all possible tags based on the provided associations.
| associations | A collection of budget items and their associated tags. This provides the foundation for managing and querying tag associations. |
|
nodiscard |
Retrieves the tag associations for budget items of a specified type.
| type | The type of budget items to filter the tag associations by. This specifies the category of items for which the tags need to be retrieved. |
|
nodiscardnoexcept |
Retrieves the current associations between budget items and their tags.
| void drn::tagging::BudgetTagManager::changeAssociation | ( | const BudgetItemTags::ItemTags & | itemTags | ) |
Updates the association between a budget item and its descriptive tags.
| itemTags | A collection containing the budget item’s identifier and its updated set of descriptive tags. |
|
nodiscardnoexcept |
Checks whether a specific budget item has any associated tags.
Example use case includes verifying the existence of an association before performing operations such as renaming or updating a tag.
| id | The identifier of the budget item whose association is to be checked. |
|
nodiscardnoexcept |
Determines if a given tag is currently associated with any budget item.
| check | The tag to verify for current associations. |
|
nodiscardnoexcept |
Retrieves the complete set of possible tags for the budget items.
| void drn::tagging::BudgetTagManager::remove | ( | const Tags & | forRemoval | ) |
Removes the specified tags from the global set of possible tags.
| forRemoval | The tags to be removed from the global set. |
| void drn::tagging::BudgetTagManager::removeAssociation | ( | const budgeting::BudgetItemIdentifier & | id | ) |
Removes the association for a specific budget item identifier and its tags.
| Error | If the specified budget item does not have an existing association. This ensures that only valid identifiers with active associations can be processed. |
| id | The unique identifier of the budget item whose association is being removed. |
| void drn::tagging::BudgetTagManager::renameAssociation | ( | const budgeting::BudgetItemIdentifier & | original, |
| const budgeting::BudgetSource & | changed ) |
Renames an existing association between a budget item and its tags.
| Error | If the specified budget item does not have an existing association. |
| original | The identifier representing the budget item whose association will be renamed. |
| changed | The new source information to associate with the budget item. |