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

#include <CLogicsConnectionPoint.hpp>

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

Public Types

enum class  EIOType { Input , Output , Without }
 
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

 CLogicsConnectionPoint ()
 
 CLogicsConnectionPoint (AbstractCanvasItem::TId id, EIOType ioType, AbstractCanvasItem::TId componentId, const std::string &name)
 
 ~CLogicsConnectionPoint () override=default
 
 CLogicsConnectionPoint (const CLogicsConnectionPoint &other)=delete
 
 CLogicsConnectionPoint (CLogicsConnectionPoint &&other)=delete
 
CLogicsConnectionPointoperator= (const CLogicsConnectionPoint &other)=delete
 
CLogicsConnectionPointoperator= (CLogicsConnectionPoint &&other)=delete
 
uint32_t getIntermediateMemory () const
 
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::vector< std::shared_ptr< AbstractCanvasItem > > getLinkedItems () override
 
void updateLinkedItems () override
 
void resetLinkedItems () override
 
void setIOType (EIOType ioType)
 
void setIntermediateMemory (uint32_t intermediateMemory)
 
void setLinkedComponentId (AbstractCanvasItem::TId id)
 
void setLinkedConnection (const std::shared_ptr< CLogicsConnection > &linkedConnection)
 
bool isConnected () const
 
EIOType getIOType () const
 
AbstractCanvasItem::TId getBlockComponentId () const
 
std::shared_ptr< CLogicsConnectiongetLinkedConnection () const
 
std::shared_ptr< CLogicsConnectionPointgetOppositeConnectedConnectionPoint () const
 
virtual std::string maxText () const
 
const iv::logic::eLogicsElementTypegetElementType () const
 
const std::string & getElementName () const
 
virtual std::string getMainText () const
 
virtual std::string getDescriptiveText () 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 EIOType enumLogicsConnectionPointIOType (const std::string &strType)
 
static std::string strLogicsConnectionPointIOType (EIOType type)
 
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.}
 

Private Member Functions

void prvResetLinkedItems ()
 

Private Attributes

uint32_t m_intermediateMemory
 
EIOType m_ioType
 
AbstractCanvasItem::TId m_blockComponentId
 
std::weak_ptr< CLogicsConnectionm_linkedConnectionRef
 
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

A CLogicsConnectionPoint object holds:

  • the id of the component it belongs to.
  • a reference to the connection it is connected to (or nullptr if not connected).
  • the connection point name's the parameter's description that it references

Member Typedef Documentation

◆ TId

uint32_t AbstractCanvasItem::TId
inherited

◆ TIndex

uint32_t AbstractCanvasItem::TIndex
inherited

◆ TMapDrawingModePartsDrawingMode

◆ TMapIndexPartType

◆ TMapPartTypeDrawingMode

◆ TPairIndexPartType

◆ TPosition2d

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

◆ TTupleDrawingMode

Member Enumeration Documentation

◆ EIOType

Enumerator
Input 
Output 
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

◆ CLogicsConnectionPoint() [1/4]

CLogicsConnectionPoint::CLogicsConnectionPoint ( )

◆ CLogicsConnectionPoint() [2/4]

CLogicsConnectionPoint::CLogicsConnectionPoint ( AbstractCanvasItem::TId id,
EIOType ioType,
AbstractCanvasItem::TId componentId,
const std::string & name )

◆ ~CLogicsConnectionPoint()

CLogicsConnectionPoint::~CLogicsConnectionPoint ( )
overridedefault

◆ CLogicsConnectionPoint() [3/4]

CLogicsConnectionPoint::CLogicsConnectionPoint ( const CLogicsConnectionPoint & other)
delete

◆ CLogicsConnectionPoint() [4/4]

CLogicsConnectionPoint::CLogicsConnectionPoint ( CLogicsConnectionPoint && other)
delete

Member Function Documentation

◆ 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

◆ enumLogicsConnectionPointIOType()

CLogicsConnectionPoint::EIOType CLogicsConnectionPoint::enumLogicsConnectionPointIOType ( const std::string & strType)
static

◆ enumLogicsElementType()

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

◆ getBlockComponentId()

AbstractCanvasItem::TId CLogicsConnectionPoint::getBlockComponentId ( ) const
nodiscard

◆ getCanvasItem() [1/2]

ICanvasItem * AbstractCanvasItem::getCanvasItem ( )
inherited

◆ getCanvasItem() [2/2]

const ICanvasItem * AbstractCanvasItem::getCanvasItem ( ) const
nodiscardinherited

◆ getCurrentDrawingMode()

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

◆ getDefaultSize()

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

◆ getDescriptiveText()

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

◆ getElementName()

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

◆ getElementType()

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

◆ getGlobalPosition2d()

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

◆ getId()

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

◆ getIntermediateMemory()

uint32_t CLogicsConnectionPoint::getIntermediateMemory ( ) const

◆ getIOType()

CLogicsConnectionPoint::EIOType CLogicsConnectionPoint::getIOType ( ) const
nodiscard

◆ getLinkedConnection()

std::shared_ptr< CLogicsConnection > CLogicsConnectionPoint::getLinkedConnection ( ) const
nodiscard

◆ getLinkedItems()

std::vector< std::shared_ptr< AbstractCanvasItem > > CLogicsConnectionPoint::getLinkedItems ( )
overridevirtual

Reimplemented from AbstractLogicsElement.

◆ getMainText()

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

◆ getOppositeConnectedConnectionPoint()

std::shared_ptr< CLogicsConnectionPoint > CLogicsConnectionPoint::getOppositeConnectedConnectionPoint ( ) const
nodiscard

◆ getRedrawFlag()

bool AbstractCanvasItem::getRedrawFlag ( ) const
nodiscardinherited

◆ isConnected()

bool CLogicsConnectionPoint::isConnected ( ) const
nodiscard

◆ maxText()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ prvResetLinkedItems()

void CLogicsConnectionPoint::prvResetLinkedItems ( )
private

◆ read()

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

Reimplemented from AbstractLogicsElement.

◆ readLogicsElementType()

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

◆ resetLinkedItems()

void CLogicsConnectionPoint::resetLinkedItems ( )
overridevirtual

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 CLogicsConnectionPoint::save ( iv::file::xml::node & node) const
overridevirtual

Reimplemented from AbstractLogicsElement.

◆ setCanvasItem()

void AbstractCanvasItem::setCanvasItem ( ICanvasItem * canvasItem)
inherited

◆ 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

◆ setIntermediateMemory()

void CLogicsConnectionPoint::setIntermediateMemory ( uint32_t intermediateMemory)

◆ setIOType()

void CLogicsConnectionPoint::setIOType ( EIOType ioType)

◆ setLinkedComponentId()

void CLogicsConnectionPoint::setLinkedComponentId ( AbstractCanvasItem::TId id)

◆ setLinkedConnection()

void CLogicsConnectionPoint::setLinkedConnection ( const std::shared_ptr< CLogicsConnection > & linkedConnection)

◆ setRedrawFlag()

void AbstractCanvasItem::setRedrawFlag ( bool redraw)
inherited

◆ strLogicsConnectionPointIOType()

std::string CLogicsConnectionPoint::strLogicsConnectionPointIOType ( EIOType type)
static

◆ strLogicsElementType()

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

◆ updateLinkedItems()

void CLogicsConnectionPoint::updateLinkedItems ( )
overridevirtual

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_blockComponentId

AbstractCanvasItem::TId CLogicsConnectionPoint::m_blockComponentId
private

◆ m_canvasItem

ICanvasItem* AbstractCanvasItem::m_canvasItem
privateinherited

◆ m_currentDrawingMode

TTupleDrawingMode AbstractCanvasItem::m_currentDrawingMode
privateinherited

◆ m_globalPosition2d

TPosition2d AbstractCanvasItem::m_globalPosition2d
privateinherited

◆ m_id

TId AbstractCanvasItem::m_id
privateinherited

◆ m_intermediateMemory

uint32_t CLogicsConnectionPoint::m_intermediateMemory
private

◆ m_ioType

EIOType CLogicsConnectionPoint::m_ioType
private

◆ m_linkedConnectionRef

std::weak_ptr<CLogicsConnection> CLogicsConnectionPoint::m_linkedConnectionRef
private

◆ 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_redrawFlag

bool AbstractCanvasItem::m_redrawFlag
privateinherited

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