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

Interface for editing access policies. More...

#include <AccessPolicyInterface.h>

Public Member Functions

 AccessPolicyInterface (AccessPolicyInterface const &other)=delete
 No copying.
 
 AccessPolicyInterface (ModeReferenceInterface *modeRefInterface)
 
virtual ~AccessPolicyInterface ()=default
 
bool accessPolicyHasValidModeReferences (int accessPolicyIndex) const
 
void addAccessPolicy (int row)
 
std::vector< std::pair< unsigned int, std::string > > getAccesPolicyModeReferences (int accessPolicyIndex) const
 
AccessTypes::Access getAccess (int accessPolicyIndex) const
 
int getAccessPolicyCount () const
 
std::string getAccessString (int accessPolicyIndex) const
 
ModeReferenceInterfacegetModeReferenceInterface () const
 
std::vector< std::pair< unsigned int, std::string > > getModeReferencesInUse (int accessPolicyIndex) const
 
AccessPolicyInterfaceoperator= (AccessPolicyInterface const &other)=delete
 
bool removeAccessPolicy (int accessPolicyIndex)
 
bool setAccess (std::string const &newAccess, int accessPolicyIndex)
 
void setAccessPolicies (QSharedPointer< QList< QSharedPointer< AccessPolicy > > > accessPolicies)
 
bool setAccessPolicyModeReferences (int accessPolicyIndex, std::vector< std::pair< unsigned int, std::string > > const &newModeRefs)
 
void setComponentModes (QSharedPointer< QList< QSharedPointer< Mode > > > componentModes)
 

Detailed Description

Interface for editing access policies.

Definition at line 30 of file AccessPolicyInterface.h.

Constructor & Destructor Documentation

◆ AccessPolicyInterface() [1/2]

AccessPolicyInterface::AccessPolicyInterface ( ModeReferenceInterface * modeRefInterface)
explicit

The constructor.

Parameters
[in]modeRefInterfaceInterface for accessing mode references.

◆ ~AccessPolicyInterface()

virtual AccessPolicyInterface::~AccessPolicyInterface ( )
virtualdefault

◆ AccessPolicyInterface() [2/2]

AccessPolicyInterface::AccessPolicyInterface ( AccessPolicyInterface const & other)
delete

No copying.

Member Function Documentation

◆ accessPolicyHasValidModeReferences()

bool AccessPolicyInterface::accessPolicyHasValidModeReferences ( int accessPolicyIndex) const

Validates the mode references of selected access policy. Compares against all mode references in other access policies.

Parameters
[in]accessPolicyIndexThe index of the access policy whose mode references are validated.
Returns
True, if the mode references of selected accesspolicy are valid, otherwise false.

◆ addAccessPolicy()

void AccessPolicyInterface::addAccessPolicy ( int row)

Add a new access policy.

◆ getAccesPolicyModeReferences()

std::vector< std::pair< unsigned int, std::string > > AccessPolicyInterface::getAccesPolicyModeReferences ( int accessPolicyIndex) const

Get the mode references of given access policy.

Parameters
[in]accessPolicyIndexThe index of the access policy whose mode references to get.
Returns
The mode references of access policy given by index.

◆ getAccess()

AccessTypes::Access AccessPolicyInterface::getAccess ( int accessPolicyIndex) const

Get the access value of a given access policy.

Parameters
[in]accessPolicyIndexThe index of the access policy.
Returns
The access value.

◆ getAccessPolicyCount()

int AccessPolicyInterface::getAccessPolicyCount ( ) const

Get the access policy count.

@return The number of available access policies.

◆ getAccessString()

std::string AccessPolicyInterface::getAccessString ( int accessPolicyIndex) const

Get the access value as a string of a given access policy.

Parameters
[in]accessPolicyIndexThe index of the access policy.
Returns
The access value as a string.

◆ getModeReferenceInterface()

ModeReferenceInterface * AccessPolicyInterface::getModeReferenceInterface ( ) const

Get the mode reference interface.

@return The mode reference interface.

◆ getModeReferencesInUse()

std::vector< std::pair< unsigned int, std::string > > AccessPolicyInterface::getModeReferencesInUse ( int accessPolicyIndex) const

Get the mode references in use by other than selected access policy given by index.

Parameters
[in]accessPolicyIndexThe index of the access policy whose mode references are not to be included in the returned list.
Returns
All other mode references in use.

◆ operator=()

AccessPolicyInterface & AccessPolicyInterface::operator= ( AccessPolicyInterface const & other)
delete

◆ removeAccessPolicy()

bool AccessPolicyInterface::removeAccessPolicy ( int accessPolicyIndex)

Remove an access policy given by index.

Parameters
[in]accessPolicyIndexThe index of the access policy to remove.
Returns
True, if the removal was successful, otherwise false.

◆ setAccess()

bool AccessPolicyInterface::setAccess ( std::string const & newAccess,
int accessPolicyIndex )

Set the access value for a given accesspolicy.

Parameters
[in]newAccessThe new access value to set.
[in]accessPolicyIndexThe index of the access policy to set the access for.
Returns
True, if the access value was successfully set, otherwise false.

◆ setAccessPolicies()

void AccessPolicyInterface::setAccessPolicies ( QSharedPointer< QList< QSharedPointer< AccessPolicy > > > accessPolicies)

Set available access policies.

Parameters
[in]accessPoliciesAccess policies to set.

◆ setAccessPolicyModeReferences()

bool AccessPolicyInterface::setAccessPolicyModeReferences ( int accessPolicyIndex,
std::vector< std::pair< unsigned int, std::string > > const & newModeRefs )

Set mode references of an access policy.

Parameters
[in]accessPolicyIndexThe index of the access policy whose mode references to be set.
[in]newModeRefsThe modereferences to be set.
Returns
True, if the operation was successful, otherwise false.

◆ setComponentModes()

void AccessPolicyInterface::setComponentModes ( QSharedPointer< QList< QSharedPointer< Mode > > > componentModes)

Set the available component modes for the interface.

Parameters
[in]componentModesThe available component modes.

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