Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
ModeReferenceInterface Class Reference

#include <ModeReferenceInterface.h>

Public Member Functions

 ModeReferenceInterface ()=default
 
virtual ~ModeReferenceInterface ()=default
 
bool addModeReference (int row)
 
bool areAllModeReferencesValid ()
 
std::vector< std::string > getComponentModes () const
 
int getModeReferenceCount () const
 
int getModeReferencePriority (int modeReferenceIndex) const
 
std::vector< std::pair< unsigned int, std::string > > getModeReferences () const
 
std::vector< std::string > getModeReferencesString () const
 
std::string getModeReferenceValue (int modeReferenceIndex) const
 
bool modeReferencePriorityIsValid (int modeReferenceIndex) const
 
bool modeReferenceValueIsValid (int modeReferenceIndex) const
 
bool removeModeReference (int modeReferenceIndex)
 
void setComponentModes (QSharedPointer< QList< QSharedPointer< Mode > > > newModes)
 
void setContainingElementIsRemap (bool isRemap)
 
void setContainingElementModeReferences (std::vector< std::pair< unsigned int, std::string > > const &modeReferences)
 
bool setModeReferencePriority (int modeReferenceIndex, unsigned int newPriority)
 
void setModeReferences (std::vector< std::pair< unsigned int, std::string > > const &modeReferences)
 
bool setModeReferenceValue (int modeReferenceIndex, std::string const &newValue)
 

Detailed Description

Definition at line 23 of file ModeReferenceInterface.h.

Constructor & Destructor Documentation

◆ ModeReferenceInterface()

ModeReferenceInterface::ModeReferenceInterface ( )
default

◆ ~ModeReferenceInterface()

virtual ModeReferenceInterface::~ModeReferenceInterface ( )
virtualdefault

Member Function Documentation

◆ addModeReference()

bool ModeReferenceInterface::addModeReference ( int row)

Add a new mode reference.

@return True, if the operation was successful, otherwise false.

◆ areAllModeReferencesValid()

bool ModeReferenceInterface::areAllModeReferencesValid ( )

Checks if all mode references are errorless.

@return Boolean true if componentModes_ is not empty and every item is errorless, overwise false

◆ getComponentModes()

std::vector< std::string > ModeReferenceInterface::getComponentModes ( ) const

Get the available component modes.

@return The available component modes.

◆ getModeReferenceCount()

int ModeReferenceInterface::getModeReferenceCount ( ) const

Get the number of mode references.

@return The number of mode references within the containing element.

◆ getModeReferencePriority()

int ModeReferenceInterface::getModeReferencePriority ( int modeReferenceIndex) const

Get the mode reference priority for a selected mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference whose priority to get.
Returns
The mode reference priority.

◆ getModeReferences()

std::vector< std::pair< unsigned int, std::string > > ModeReferenceInterface::getModeReferences ( ) const

Get all currently set mode references for the current element.

@return The currently set mode references.

◆ getModeReferencesString()

std::vector< std::string > ModeReferenceInterface::getModeReferencesString ( ) const

Get all mode references of the current element as a vector of strings.

@return Vector containing the mode references.

◆ getModeReferenceValue()

std::string ModeReferenceInterface::getModeReferenceValue ( int modeReferenceIndex) const

Get the mode reference value for a selected mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference whose reference value to get.
Returns
The mode reference value.

◆ modeReferencePriorityIsValid()

bool ModeReferenceInterface::modeReferencePriorityIsValid ( int modeReferenceIndex) const

Validate the priority value of given mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference to validate.
Returns
True, if the mode reference priority is valid, otherwise false.

◆ modeReferenceValueIsValid()

bool ModeReferenceInterface::modeReferenceValueIsValid ( int modeReferenceIndex) const

Validate the reference value of given mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference to validate.
Returns
True, if the mode reference value is valid, otherwise false.

◆ removeModeReference()

bool ModeReferenceInterface::removeModeReference ( int modeReferenceIndex)

Remove a selected mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference to be removed.
Returns
True, if the operation was successful, otherwise false.

◆ setComponentModes()

void ModeReferenceInterface::setComponentModes ( QSharedPointer< QList< QSharedPointer< Mode > > > newModes)

Set the available component modes.

Parameters
[in]newModesThe modes to set.

◆ setContainingElementIsRemap()

void ModeReferenceInterface::setContainingElementIsRemap ( bool isRemap)

Set to indicate that the current element is a memory remap.

Parameters
[in]isRemapFlag to set, if element is remap.

◆ setContainingElementModeReferences()

void ModeReferenceInterface::setContainingElementModeReferences ( std::vector< std::pair< unsigned int, std::string > > const & modeReferences)

Set mode references in the containing element, eg. mode references of all remaps within a memory map. Should set all mode references except for the mode refs of access policy/remap currently being edited.

Parameters
[in]modeRefsThe mode references to set.

◆ setModeReferencePriority()

bool ModeReferenceInterface::setModeReferencePriority ( int modeReferenceIndex,
unsigned int newPriority )

Set the mode reference priority for a selected mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference whose reference priority to set.
[in]newPriorityThe new priority value to set.
Returns
True, if the operation was successful, otherwise false.

◆ setModeReferences()

void ModeReferenceInterface::setModeReferences ( std::vector< std::pair< unsigned int, std::string > > const & modeReferences)

Set the available mode references.

Parameters
[in]modeReferencesThe mode references to set.

◆ setModeReferenceValue()

bool ModeReferenceInterface::setModeReferenceValue ( int modeReferenceIndex,
std::string const & newValue )

Set the mode reference value for a selected mode reference.

Parameters
[in]modeReferenceIndexThe index of the mode reference whose reference value to set.
[in]newValueThe new reference to set.
Returns
True, if the operation was successful, otherwise false.

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