Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CLogicsComponentConstant Class Referencefinal

#include <CLogicsComponentConstant.hpp>

Inheritance diagram for CLogicsComponentConstant:
[legend]
Collaboration diagram for CLogicsComponentConstant:
[legend]

Public Types

enum class  ECPPosition {
  Bottom , Left , Right , Top ,
  Without
}
 
typedef std::map< AbstractCanvasItem::TId, std::shared_ptr< CLogicsConnectionPoint > > TMapIdConnPoint
 
enum class  EPartType {
  MainShape , MainText , SubText1 , SubText2 ,
  SubText3
}
 
typedef std::pair< TIndex, EPartTypeTPairIndexPartType
 
typedef std::map< TIndex, EPartTypeTMapIndexPartType
 
typedef std::map< TPairIndexPartType, AbstractCanvasItem::TTupleDrawingModeTMapPartTypeDrawingMode
 
typedef std::map< AbstractCanvasItem::TTupleDrawingMode, TMapPartTypeDrawingModeTMapDrawingModePartsDrawingMode
 
enum class  EMarkMode { None , Selected }
 
enum class  EStandOutMode { Highlighted , Warning , None }
 
typedef uint32_t TId
 
typedef std::pair< double, double > TPosition2d
 
typedef uint32_t TIndex
 
typedef std::tuple< EMarkMode, EStandOutModeTTupleDrawingMode
 

Public Member Functions

 CLogicsComponentConstant (const iv::types::logic::ComponentType &componentType)
 
 CLogicsComponentConstant (AbstractCanvasItem::TId id, const iv::types::logic::ComponentType &componentType, const std::string &name)
 
 CLogicsComponentConstant ()=delete
 
 ~CLogicsComponentConstant () override=default
 
 CLogicsComponentConstant (const CLogicsComponentConstant &other)=delete
 
 CLogicsComponentConstant (CLogicsComponentConstant &&other)=delete
 
CLogicsComponentConstantoperator= (const CLogicsComponentConstant &other)=delete
 
CLogicsComponentConstantoperator= (CLogicsComponentConstant &&other)=delete
 
iv::file::xml::node read (const iv::file::xml::node &node) override
 
iv::file::xml::node save (iv::file::xml::node &node) const override
 
std::string maxText () const override
 
std::string getDescriptiveText () const override
 
void setConstantLogicState (iv::logic::eConstantLogicState state)
 
iv::logic::eConstantLogicState getConstantLogicState () const
 
uint32_t constantLogicStateToConstantFirmwareValues ()
 
std::string constantLogicStateToConstantFirmwareString ()
 
void setConnectionPointPosition (ECPPosition cPPosition)
 
ECPPosition getConnectionPointPosition () const
 
std::vector< std::shared_ptr< AbstractCanvasItem > > getLinkedItems () override
 
void updateLinkedItems () override
 
void resetLinkedItems () override
 
void addConnectionPointInput (const std::shared_ptr< CLogicsConnectionPoint > &connectionPoint)
 
void addConnectionPointOutput (const std::shared_ptr< CLogicsConnectionPoint > &connectionPoint)
 
size_t numberOfInputs () const
 
size_t numberOfOutputs () const
 
bool isAllConnected () const
 
const iv::types::logic::componentFinalTypegetComponentFinalType () const
 
const iv::logic::eGeneralTypegetComponentGeneralType () const
 
const iv::types::logic::componentTypegetComponentType () const
 
const iv::types::logic::ComponentTypegetComponentTypeTuple () const
 
std::shared_ptr< CLogicsConnectionPointgetConnectionPoint (iv::logic::eDBBlockParamType pointType, iv::types::logic::paramNumber paramNum)
 
std::shared_ptr< CLogicsConnectionPointgetFirstInputConnectionPoint () const
 
std::shared_ptr< CLogicsConnectionPointgetInputConnectionPoint (uint32_t index)
 
std::shared_ptr< CLogicsConnectionPointgetFirstOutputConnectionPoint () const
 
std::shared_ptr< CLogicsConnectionPointgetOutputConnectionPoint (uint32_t index)
 
TMapIdConnPoint getInputRefs ()
 
const TMapIdConnPointgetInputRefsConst () const
 
TMapIdConnPoint getOutputRefs ()
 
const TMapIdConnPointgetOutputRefsConst () const
 
std::set< std::shared_ptr< CLogicsConnectionPoint > > getConnectionPoints () const
 
const iv::logic::eLogicsElementTypegetElementType () const
 
const std::string & getElementName () const
 
virtual std::string getMainText () const
 
virtual std::optional< iv::types::SizegetDefaultSize () const
 
void addListenerClick (std::unique_ptr< IListenerCanvasItemClick > listener)
 
void addListenerMove (std::unique_ptr< IListenerCanvasItemMove > listener)
 
void addListenerEnter (std::unique_ptr< IListenerCanvasItemEnter > listener)
 
void addListenerLeave (std::unique_ptr< IListenerCanvasItemLeave > listener)
 
void runListenersClick (CEventCanvasButton *evtCanvasButton)
 
void runListenersMove (CEventCanvasButton *evtCanvasButton)
 
void runListenersEnter ()
 
void runListenersLeave ()
 
void setCanvasItem (ICanvasItem *canvasItem)
 
void setCurrentMarkMode (EMarkMode markMode)
 
void setCurrentStandoutMode (EStandOutMode standoutMode)
 
void setGlobalPosition2d (const TPosition2d &position2d)
 
void setId (TId id)
 
void setRedrawFlag (bool redraw)
 
ICanvasItemgetCanvasItem ()
 
const ICanvasItemgetCanvasItem () const
 
const AbstractCanvasItem::TTupleDrawingModegetCurrentDrawingMode () const
 
const TPosition2dgetGlobalPosition2d () const
 
TId getId () const
 
bool getRedrawFlag () const
 

Static Public Member Functions

static iv::logic::eConstantLogicState enumConstantLogicState (std::string_view strState)
 
static std::string strConstantLogicState (iv::logic::eConstantLogicState state)
 
static std::string strGuiOthers (iv::logic::eOthers otherBlock, bool shortName=false)
 
static iv::logic::eGeneralType enumGeneralType (const std::string &strType)
 
static std::string strGeneralType (iv::logic::eGeneralType generalType)
 
static iv::types::logic::ComponentType readLogicsComponentTypeTuple (const iv::file::xml::node &node)
 
static bool hasExecutionOrder (const iv::types::logic::ComponentType &componentTypeTuple)
 
static bool isExecBlock (const iv::types::logic::ComponentType &componentTypeTuple)
 
static bool isLibraryBlock (const iv::types::logic::ComponentType &componentTypeTuple)
 
static iv::logic::eLogicsElementType enumLogicsElementType (const std::string &strType)
 
static std::string strLogicsElementType (iv::logic::eLogicsElementType type)
 
static iv::logic::eLogicsElementType readLogicsElementType (const iv::file::xml::node &node)
 

Static Public Attributes

static constexpr std::string_view kPrvKeySectionLogicsElementData = "LogicsElementData"
 
static const TId kInvalidCanvasItemId = 0
 
static const TId kStartingCanvasItemId = 1
 
static const TPosition2d kZeroPosition = {0., 0.}
 

Protected Member Functions

virtual std::optional< uint32_t > getIndexOfConnectionForParam (iv::logic::eDBBlockParamType type, iv::types::logic::paramNumber number) const
 

Private Attributes

iv::logic::eConstantLogicState m_constantLogicState
 
ECPPosition m_cPPosition
 
iv::types::logic::ComponentType m_componentTypeTuple
 
TMapIdConnPoint m_inputRefs
 
TMapIdConnPoint m_outputRefs
 
iv::logic::eLogicsElementType m_logicsElementType
 
std::string m_name
 
TId m_id
 
TPosition2d m_globalPosition2d
 
TTupleDrawingMode m_currentDrawingMode
 
bool m_redrawFlag
 
ICanvasItemm_canvasItem
 
std::vector< std::unique_ptr< IListenerCanvasItemClick > > m_listenersItemClick
 
std::vector< std::unique_ptr< IListenerCanvasItemMove > > m_listenersItemMove
 
std::vector< std::unique_ptr< IListenerCanvasItemEnter > > m_listenersItemEnter
 
std::vector< std::unique_ptr< IListenerCanvasItemLeave > > m_listenersItemLeave
 

Detailed Description

class CLogicsComponentConstant

Constants in the logic diagram will have one of the three possible state: 1, 0, or NC (Not Connected).

Member Typedef Documentation

◆ TId

uint32_t AbstractCanvasItem::TId
inherited

◆ TIndex

uint32_t AbstractCanvasItem::TIndex
inherited

◆ TMapDrawingModePartsDrawingMode

◆ TMapIdConnPoint

◆ TMapIndexPartType

◆ TMapPartTypeDrawingMode

◆ TPairIndexPartType

◆ TPosition2d

std::pair<double, double> AbstractCanvasItem::TPosition2d
inherited

◆ TTupleDrawingMode

Member Enumeration Documentation

◆ ECPPosition

enum class CLogicsComponentOthers::ECPPosition
stronginherited
Enumerator
Bottom 
Left 
Right 
Top 
Without 

◆ EMarkMode

enum class AbstractCanvasItem::EMarkMode
stronginherited

Enumeration defining the different modes to mark a logic element or a part of a logic element.

Enumerator
None 
Selected 

◆ EPartType

enum class AbstractLogicsElement::EPartType
stronginherited

Enumeration defining the types of parts a logic element can be made of.

Enumerator
MainShape 
MainText 
SubText1 
SubText2 
SubText3 

◆ EStandOutMode

enum class AbstractCanvasItem::EStandOutMode
stronginherited

Enumeration defining the different modes to stand out a logic element or a part of a logic element.

Enumerator
Highlighted 
Warning 
None 

Constructor & Destructor Documentation

◆ CLogicsComponentConstant() [1/5]

CLogicsComponentConstant::CLogicsComponentConstant ( const iv::types::logic::ComponentType & componentType)
explicit

◆ CLogicsComponentConstant() [2/5]

CLogicsComponentConstant::CLogicsComponentConstant ( AbstractCanvasItem::TId id,
const iv::types::logic::ComponentType & componentType,
const std::string & name )

◆ CLogicsComponentConstant() [3/5]

CLogicsComponentConstant::CLogicsComponentConstant ( )
delete

◆ ~CLogicsComponentConstant()

CLogicsComponentConstant::~CLogicsComponentConstant ( )
overridedefault

◆ CLogicsComponentConstant() [4/5]

CLogicsComponentConstant::CLogicsComponentConstant ( const CLogicsComponentConstant & other)
delete

◆ CLogicsComponentConstant() [5/5]

CLogicsComponentConstant::CLogicsComponentConstant ( CLogicsComponentConstant && other)
delete

Member Function Documentation

◆ addConnectionPointInput()

void CLogicsComponent::addConnectionPointInput ( const std::shared_ptr< CLogicsConnectionPoint > & connectionPoint)
inherited

◆ addConnectionPointOutput()

void CLogicsComponent::addConnectionPointOutput ( const std::shared_ptr< CLogicsConnectionPoint > & connectionPoint)
inherited

◆ addListenerClick()

void AbstractCanvasItem::addListenerClick ( std::unique_ptr< IListenerCanvasItemClick > listener)
inherited

◆ addListenerEnter()

void AbstractCanvasItem::addListenerEnter ( std::unique_ptr< IListenerCanvasItemEnter > listener)
inherited

◆ addListenerLeave()

void AbstractCanvasItem::addListenerLeave ( std::unique_ptr< IListenerCanvasItemLeave > listener)
inherited

◆ addListenerMove()

void AbstractCanvasItem::addListenerMove ( std::unique_ptr< IListenerCanvasItemMove > listener)
inherited

◆ constantLogicStateToConstantFirmwareString()

std::string CLogicsComponentConstant::constantLogicStateToConstantFirmwareString ( )
nodiscard

◆ constantLogicStateToConstantFirmwareValues()

uint32_t CLogicsComponentConstant::constantLogicStateToConstantFirmwareValues ( )
nodiscard

◆ enumConstantLogicState()

iv::logic::eConstantLogicState CLogicsComponentConstant::enumConstantLogicState ( std::string_view strState)
static

◆ enumGeneralType()

iv::logic::eGeneralType CLogicsComponent::enumGeneralType ( const std::string & strType)
staticinherited

◆ enumLogicsElementType()

iv::logic::eLogicsElementType AbstractLogicsElement::enumLogicsElementType ( const std::string & strType)
staticinherited

◆ getCanvasItem() [1/2]

ICanvasItem * AbstractCanvasItem::getCanvasItem ( )
inherited

◆ getCanvasItem() [2/2]

const ICanvasItem * AbstractCanvasItem::getCanvasItem ( ) const
nodiscardinherited

◆ getComponentFinalType()

const iv::types::logic::componentFinalType & CLogicsComponent::getComponentFinalType ( ) const
nodiscardinherited

◆ getComponentGeneralType()

const iv::logic::eGeneralType & CLogicsComponent::getComponentGeneralType ( ) const
nodiscardinherited

◆ getComponentType()

const iv::types::logic::componentType & CLogicsComponent::getComponentType ( ) const
nodiscardinherited

◆ getComponentTypeTuple()

const iv::types::logic::ComponentType & CLogicsComponent::getComponentTypeTuple ( ) const
nodiscardinherited

◆ getConnectionPoint()

std::shared_ptr< CLogicsConnectionPoint > CLogicsComponent::getConnectionPoint ( iv::logic::eDBBlockParamType pointType,
iv::types::logic::paramNumber paramNum )
nodiscardinherited

◆ getConnectionPointPosition()

CLogicsComponentOthers::ECPPosition CLogicsComponentOthers::getConnectionPointPosition ( ) const
nodiscardinherited

◆ getConnectionPoints()

std::set< std::shared_ptr< CLogicsConnectionPoint > > CLogicsComponent::getConnectionPoints ( ) const
nodiscardinherited

◆ getConstantLogicState()

iv::logic::eConstantLogicState CLogicsComponentConstant::getConstantLogicState ( ) const
nodiscard

◆ getCurrentDrawingMode()

const AbstractCanvasItem::TTupleDrawingMode & AbstractCanvasItem::getCurrentDrawingMode ( ) const
nodiscardinherited

◆ getDefaultSize()

std::optional< iv::types::Size > AbstractLogicsElement::getDefaultSize ( ) const
virtualinherited

◆ getDescriptiveText()

std::string CLogicsComponentConstant::getDescriptiveText ( ) const
nodiscardoverridevirtual

Reimplemented from AbstractLogicsElement.

◆ getElementName()

const std::string & AbstractLogicsElement::getElementName ( ) const
nodiscardinherited

◆ getElementType()

const iv::logic::eLogicsElementType & AbstractLogicsElement::getElementType ( ) const
nodiscardinherited

◆ getFirstInputConnectionPoint()

std::shared_ptr< CLogicsConnectionPoint > CLogicsComponent::getFirstInputConnectionPoint ( ) const
nodiscardinherited

◆ getFirstOutputConnectionPoint()

std::shared_ptr< CLogicsConnectionPoint > CLogicsComponent::getFirstOutputConnectionPoint ( ) const
nodiscardinherited

◆ getGlobalPosition2d()

const AbstractCanvasItem::TPosition2d & AbstractCanvasItem::getGlobalPosition2d ( ) const
nodiscardinherited

◆ getId()

AbstractCanvasItem::TId AbstractCanvasItem::getId ( ) const
nodiscardinherited

◆ getIndexOfConnectionForParam()

std::optional< uint32_t > CLogicsComponent::getIndexOfConnectionForParam ( iv::logic::eDBBlockParamType type,
iv::types::logic::paramNumber number ) const
protectedvirtualinherited

Reimplemented in CLogicsComponentExec.

◆ getInputConnectionPoint()

std::shared_ptr< CLogicsConnectionPoint > CLogicsComponent::getInputConnectionPoint ( uint32_t index)
nodiscardinherited

◆ getInputRefs()

CLogicsComponent::TMapIdConnPoint CLogicsComponent::getInputRefs ( )
inherited

◆ getInputRefsConst()

const CLogicsComponent::TMapIdConnPoint & CLogicsComponent::getInputRefsConst ( ) const
nodiscardinherited

◆ getLinkedItems()

std::vector< std::shared_ptr< AbstractCanvasItem > > CLogicsComponent::getLinkedItems ( )
overridevirtualinherited

Reimplemented from AbstractLogicsElement.

◆ getMainText()

std::string AbstractLogicsElement::getMainText ( ) const
nodiscardvirtualinherited

◆ getOutputConnectionPoint()

std::shared_ptr< CLogicsConnectionPoint > CLogicsComponent::getOutputConnectionPoint ( uint32_t index)
nodiscardinherited

◆ getOutputRefs()

CLogicsComponent::TMapIdConnPoint CLogicsComponent::getOutputRefs ( )
inherited

◆ getOutputRefsConst()

const CLogicsComponent::TMapIdConnPoint & CLogicsComponent::getOutputRefsConst ( ) const
nodiscardinherited

◆ getRedrawFlag()

bool AbstractCanvasItem::getRedrawFlag ( ) const
nodiscardinherited

◆ hasExecutionOrder()

bool CLogicsComponent::hasExecutionOrder ( const iv::types::logic::ComponentType & componentTypeTuple)
staticinherited

◆ isAllConnected()

bool CLogicsComponent::isAllConnected ( ) const
nodiscardinherited

◆ isExecBlock()

bool CLogicsComponent::isExecBlock ( const iv::types::logic::ComponentType & componentTypeTuple)
staticinherited

◆ isLibraryBlock()

bool CLogicsComponent::isLibraryBlock ( const iv::types::logic::ComponentType & componentTypeTuple)
staticinherited

◆ maxText()

std::string CLogicsComponentConstant::maxText ( ) const
nodiscardoverridevirtual

Reimplemented from AbstractLogicsElement.

◆ numberOfInputs()

size_t CLogicsComponent::numberOfInputs ( ) const
nodiscardinherited

◆ numberOfOutputs()

size_t CLogicsComponent::numberOfOutputs ( ) const
nodiscardinherited

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ read()

iv::file::xml::node CLogicsComponentConstant::read ( const iv::file::xml::node & node)
overridevirtual

Reimplemented from CLogicsComponent.

◆ readLogicsComponentTypeTuple()

iv::types::logic::ComponentType CLogicsComponent::readLogicsComponentTypeTuple ( const iv::file::xml::node & node)
staticinherited

◆ readLogicsElementType()

iv::logic::eLogicsElementType AbstractLogicsElement::readLogicsElementType ( const iv::file::xml::node & node)
staticinherited

◆ resetLinkedItems()

void CLogicsComponent::resetLinkedItems ( )
overridevirtualinherited

Reimplemented from AbstractLogicsElement.

◆ runListenersClick()

void AbstractCanvasItem::runListenersClick ( CEventCanvasButton * evtCanvasButton)
inherited

◆ runListenersEnter()

void AbstractCanvasItem::runListenersEnter ( )
inherited

◆ runListenersLeave()

void AbstractCanvasItem::runListenersLeave ( )
inherited

◆ runListenersMove()

void AbstractCanvasItem::runListenersMove ( CEventCanvasButton * evtCanvasButton)
inherited

◆ save()

iv::file::xml::node CLogicsComponentConstant::save ( iv::file::xml::node & node) const
overridevirtual

Reimplemented from CLogicsComponent.

◆ setCanvasItem()

void AbstractCanvasItem::setCanvasItem ( ICanvasItem * canvasItem)
inherited

◆ setConnectionPointPosition()

void CLogicsComponentOthers::setConnectionPointPosition ( ECPPosition cPPosition)
inherited

◆ setConstantLogicState()

void CLogicsComponentConstant::setConstantLogicState ( iv::logic::eConstantLogicState state)

◆ setCurrentMarkMode()

void AbstractCanvasItem::setCurrentMarkMode ( EMarkMode markMode)
inherited

◆ setCurrentStandoutMode()

void AbstractCanvasItem::setCurrentStandoutMode ( EStandOutMode standoutMode)
inherited

◆ setGlobalPosition2d()

void AbstractCanvasItem::setGlobalPosition2d ( const TPosition2d & position2d)
inherited

◆ setId()

void AbstractCanvasItem::setId ( TId id)
inherited

◆ setRedrawFlag()

void AbstractCanvasItem::setRedrawFlag ( bool redraw)
inherited

◆ strConstantLogicState()

std::string CLogicsComponentConstant::strConstantLogicState ( iv::logic::eConstantLogicState state)
static

◆ strGeneralType()

std::string CLogicsComponent::strGeneralType ( iv::logic::eGeneralType generalType)
staticinherited

◆ strGuiOthers()

std::string CLogicsComponentOthers::strGuiOthers ( iv::logic::eOthers otherBlock,
bool shortName = false )
staticinherited

◆ strLogicsElementType()

std::string AbstractLogicsElement::strLogicsElementType ( iv::logic::eLogicsElementType type)
staticinherited

◆ updateLinkedItems()

void CLogicsComponent::updateLinkedItems ( )
overridevirtualinherited

Reimplemented from AbstractLogicsElement.

Member Data Documentation

◆ kInvalidCanvasItemId

const TId AbstractCanvasItem::kInvalidCanvasItemId = 0
inlinestaticinherited

◆ kPrvKeySectionLogicsElementData

std::string_view AbstractLogicsElement::kPrvKeySectionLogicsElementData = "LogicsElementData"
inlinestaticconstexprinherited

◆ kStartingCanvasItemId

const TId AbstractCanvasItem::kStartingCanvasItemId = 1
inlinestaticinherited

◆ kZeroPosition

const TPosition2d AbstractCanvasItem::kZeroPosition = {0., 0.}
inlinestaticinherited

◆ m_canvasItem

ICanvasItem* AbstractCanvasItem::m_canvasItem
privateinherited

◆ m_componentTypeTuple

iv::types::logic::ComponentType CLogicsComponent::m_componentTypeTuple
privateinherited

◆ m_constantLogicState

iv::logic::eConstantLogicState CLogicsComponentConstant::m_constantLogicState
private

◆ m_cPPosition

ECPPosition CLogicsComponentOthers::m_cPPosition
privateinherited

◆ m_currentDrawingMode

TTupleDrawingMode AbstractCanvasItem::m_currentDrawingMode
privateinherited

◆ m_globalPosition2d

TPosition2d AbstractCanvasItem::m_globalPosition2d
privateinherited

◆ m_id

TId AbstractCanvasItem::m_id
privateinherited

◆ m_inputRefs

TMapIdConnPoint CLogicsComponent::m_inputRefs
privateinherited

◆ m_listenersItemClick

std::vector<std::unique_ptr<IListenerCanvasItemClick> > AbstractCanvasItem::m_listenersItemClick
privateinherited

◆ m_listenersItemEnter

std::vector<std::unique_ptr<IListenerCanvasItemEnter> > AbstractCanvasItem::m_listenersItemEnter
privateinherited

◆ m_listenersItemLeave

std::vector<std::unique_ptr<IListenerCanvasItemLeave> > AbstractCanvasItem::m_listenersItemLeave
privateinherited

◆ m_listenersItemMove

std::vector<std::unique_ptr<IListenerCanvasItemMove> > AbstractCanvasItem::m_listenersItemMove
privateinherited

◆ m_logicsElementType

iv::logic::eLogicsElementType AbstractLogicsElement::m_logicsElementType
privateinherited

◆ m_name

std::string AbstractLogicsElement::m_name
privateinherited

◆ m_outputRefs

TMapIdConnPoint CLogicsComponent::m_outputRefs
privateinherited

◆ m_redrawFlag

bool AbstractCanvasItem::m_redrawFlag
privateinherited

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