Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CUnitsRestrictions Class Reference

#include <CUnitsRestrictions.hpp>

Inheritance diagram for CUnitsRestrictions:
[legend]

Public Types

typedef std::pair< iv::types::unitId, iv::types::channelOrderTUnitChannel
 

Public Member Functions

 CUnitsRestrictions ()=default
 
 CUnitsRestrictions (const CUnitsRestrictions &other)=delete
 
 CUnitsRestrictions (CUnitsRestrictions &&other)=delete
 
 ~CUnitsRestrictions ()=default
 
CUnitsRestrictions operator= (const CUnitsRestrictions &other)=delete
 
CUnitsRestrictions operator= (CUnitsRestrictions &&other)=delete
 
std::set< uint16_t > getUsedUnitChannels (uint16_t unitId) const
 

Static Public Member Functions

static std::set< uint16_t > getExistingUnits ()
 
static std::map< iv::types::unitId, iv::units::eUnitTypegetExistingUnitsWithUnitType ()
 
static std::set< uint16_t > getExistingUnitChannels (uint16_t unitId)
 
static std::map< iv::types::channelOrder, iv::types::channelIdgetExistingUnitChannelsWithChannelId (uint16_t unitId)
 
static bool canAddUnit (iv::types::unitId unitId, iv::units::eUnitType unitType, std::string &returnMsg)
 
static bool canAddChannels (std::string &returnMsg)
 
static bool canAddChannel (iv::types::unitId unitId, iv::types::channelOrder channelOrder, iv::channels::eChannelBaseType channelBaseType, std::string &returnMsg)
 
static bool canDeleteChannel (iv::types::unitId unitId, iv::types::channelOrder channelId, std::string &returnMsg)
 
static bool isARestrictedUnit (iv::units::eUnitType unitType)
 
static bool isARestrictedChannel (iv::units::eUnitType unitType, iv::types::channelOrder channelOrder)
 
static bool hasCanAFail (iv::units::eUnitType unitType)
 
static bool hasCanBFail (iv::units::eUnitType unitType)
 
static bool hasCanCFail (iv::units::eUnitType unitType)
 
static bool canAddTanks (std::string &returnMsg)
 
static bool isValidUnitChannel (const TUnitChannel &unitChannel)
 
static bool isChannelWATankChangeable (uint16_t unitId, uint16_t channelId)
 

Member Typedef Documentation

◆ TUnitChannel

Constructor & Destructor Documentation

◆ CUnitsRestrictions() [1/3]

CUnitsRestrictions::CUnitsRestrictions ( )
default

◆ CUnitsRestrictions() [2/3]

CUnitsRestrictions::CUnitsRestrictions ( const CUnitsRestrictions & other)
delete

◆ CUnitsRestrictions() [3/3]

CUnitsRestrictions::CUnitsRestrictions ( CUnitsRestrictions && other)
delete

◆ ~CUnitsRestrictions()

CUnitsRestrictions::~CUnitsRestrictions ( )
default

Member Function Documentation

◆ canAddChannel()

bool CUnitsRestrictions::canAddChannel ( iv::types::unitId unitId,
iv::types::channelOrder channelOrder,
iv::channels::eChannelBaseType channelBaseType,
std::string & returnMsg )
static

canAddChannel returns true if there is no problem in adding the channel to the model; false otherwise.

Parameters
[in]unitIdunitId of the channel to add.
[in]channelOrderm_channelId of the channel to add.
[in]channelBaseTypechannel base type of the channel to add.
[out]returnMsgmessage to return.

◆ canAddChannels()

bool CUnitsRestrictions::canAddChannels ( std::string & returnMsg)
static

canAddChannels returns true if there are units added and are not of type 'Undefined'; false otherwise.

◆ canAddTanks()

bool CUnitsRestrictions::canAddTanks ( std::string & returnMsg)
static

◆ canAddUnit()

bool CUnitsRestrictions::canAddUnit ( iv::types::unitId unitId,
iv::units::eUnitType unitType,
std::string & returnMsg )
static

canAddChannel returns true if there is no problem in adding the unit to the model; false otherwise.

Parameters
[in]unitIdunitId of the unit to add.
[in]unitTypeunitType of the unit to add.
[out]returnMsgmessage to return.

◆ canDeleteChannel()

bool CUnitsRestrictions::canDeleteChannel ( iv::types::unitId unitId,
iv::types::channelOrder channelId,
std::string & returnMsg )
static

canDeleteChannel returns true if the channel can be deleted; false otherwise.

Parameters
[in]unitIdunitId of the channel to delete.
[in]channelIdm_channelId of the channel to delete.
[out]returnMsgmessage to return.

◆ getExistingUnitChannels()

std::set< iv::types::channelOrder > CUnitsRestrictions::getExistingUnitChannels ( uint16_t unitId)
staticnodiscard

◆ getExistingUnitChannelsWithChannelId()

std::map< iv::types::channelOrder, iv::types::channelId > CUnitsRestrictions::getExistingUnitChannelsWithChannelId ( uint16_t unitId)
staticnodiscard

◆ getExistingUnits()

std::set< uint16_t > CUnitsRestrictions::getExistingUnits ( )
staticnodiscard

◆ getExistingUnitsWithUnitType()

std::map< iv::types::unitId, iv::units::eUnitType > CUnitsRestrictions::getExistingUnitsWithUnitType ( )
staticnodiscard

◆ getUsedUnitChannels()

std::set< uint16_t > CUnitsRestrictions::getUsedUnitChannels ( uint16_t unitId) const
nodiscard

◆ hasCanAFail()

bool CUnitsRestrictions::hasCanAFail ( iv::units::eUnitType unitType)
static

◆ hasCanBFail()

bool CUnitsRestrictions::hasCanBFail ( iv::units::eUnitType unitType)
static

◆ hasCanCFail()

bool CUnitsRestrictions::hasCanCFail ( iv::units::eUnitType unitType)
static

◆ isARestrictedChannel()

bool CUnitsRestrictions::isARestrictedChannel ( iv::units::eUnitType unitType,
iv::types::channelOrder channelOrder )
static

◆ isARestrictedUnit()

bool CUnitsRestrictions::isARestrictedUnit ( iv::units::eUnitType unitType)
static

◆ isChannelWATankChangeable()

bool CUnitsRestrictions::isChannelWATankChangeable ( uint16_t unitId,
uint16_t channelId )
staticnodiscard

◆ isValidUnitChannel()

bool CUnitsRestrictions::isValidUnitChannel ( const TUnitChannel & unitChannel)
staticnodiscard

◆ operator=() [1/2]

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

◆ operator=() [2/2]

CUnitsRestrictions CUnitsRestrictions::operator= ( CUnitsRestrictions && other)
delete

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