Limo
A simple mod manager
Loading...
Searching...
No Matches
EditAutoTagAction Class Reference

Contains data relevent for the action of editing an auto tag. More...

#include <editautotagaction.h>

Public Types

enum class  ActionType { add , remove , rename , change_evaluator }
 Represents the type of action performed. More...
 

Public Member Functions

 EditAutoTagAction (const std::string &name, ActionType type)
 Constructor for an add or remove action.
 
 EditAutoTagAction (const std::string &name, const std::string &new_name)
 Constructor for a rename action.
 
 EditAutoTagAction (const std::string &name, const std::string &expression, const std::vector< TagCondition > &conditions)
 Constructor for a change_evaluator action.
 
std::string getName () const
 Getter for the target tags name.
 
std::string getNewName () const
 Getter for the new name.
 
ActionType getType () const
 Getter for the ActionType to be performed.
 
std::string getExpression () const
 Getter for the expression of the updated evaluator.
 
std::vector< TagConditiongetConditions () const
 Getter for the conditions of the updated evaluator.
 

Private Attributes

std::string name_
 The target tags name.
 
std::string new_name_
 The target tags new name, if ActionType == rename.
 
ActionType type_
 The type of action to be performed.
 
std::string expression_
 Expression used to generate a new evaluator.
 
std::vector< TagConditionconditions_
 Conditions used to generate a new evaluator.
 

Detailed Description

Contains data relevent for the action of editing an auto tag.

Member Enumeration Documentation

◆ ActionType

enum class EditAutoTagAction::ActionType
strong

Represents the type of action performed.

Enumerator
add 

Add a new tag.

remove 

Remove an existing tag.

rename 

Rename a tag.

change_evaluator 

Create a new evaluator.

Constructor & Destructor Documentation

◆ EditAutoTagAction() [1/3]

EditAutoTagAction::EditAutoTagAction ( const std::string & name,
ActionType type )

Constructor for an add or remove action.

Parameters
nameName of the tag to be added/ removed.
typeAction type.

◆ EditAutoTagAction() [2/3]

EditAutoTagAction::EditAutoTagAction ( const std::string & name,
const std::string & new_name )

Constructor for a rename action.

Parameters
nameName of the tag to be renamed.
new_nameNew name for the tag.

◆ EditAutoTagAction() [3/3]

EditAutoTagAction::EditAutoTagAction ( const std::string & name,
const std::string & expression,
const std::vector< TagCondition > & conditions )

Constructor for a change_evaluator action.

Parameters
nameName of the tag the evaluator of which is to be updated.
expressionNew evaluator expression.
conditionsNew evaluator conditions.

Member Function Documentation

◆ getConditions()

std::vector< TagCondition > EditAutoTagAction::getConditions ( ) const

Getter for the conditions of the updated evaluator.

Returns
The conditions.

◆ getExpression()

std::string EditAutoTagAction::getExpression ( ) const

Getter for the expression of the updated evaluator.

Returns
The expression.

◆ getName()

std::string EditAutoTagAction::getName ( ) const

Getter for the target tags name.

Returns
The name.

◆ getNewName()

std::string EditAutoTagAction::getNewName ( ) const

Getter for the new name.

Returns
The new name.

◆ getType()

EditAutoTagAction::ActionType EditAutoTagAction::getType ( ) const

Getter for the ActionType to be performed.

Returns
The ActionType.

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