OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
BidirBridgeFigure Class Reference

#include <BidirBridgeFigure.hh>

Inheritance diagram for BidirBridgeFigure:
Inheritance graph
Collaboration diagram for BidirBridgeFigure:
Collaboration graph

Public Member Functions

 BidirBridgeFigure ()
 
virtual ~BidirBridgeFigure ()
 
- Public Member Functions inherited from BridgeFigure
 BridgeFigure ()
 
virtual ~BridgeFigure ()
 
void setDirection (BridgeFigure::Direction direction)
 
Direction direction () const
 
- Public Member Functions inherited from ConnectionFigure
virtual ~ConnectionFigure ()
 
void setSource (Figure *figure)
 
void setTarget (Figure *figure)
 
Figuresource () const
 
Figuretarget () const
 
- Public Member Functions inherited from Figure
 Figure ()
 
virtual ~Figure ()
 
wxPoint location () const
 
void setLocation (wxPoint point)
 
void setX (int x)
 
void setY (int y)
 
void setPreferredX (int x)
 
bool xSet () const
 
void clearXSetFlag ()
 
virtual wxRect bounds () const
 
virtual wxRect virtualBounds () const
 
void setBounds (wxSize bounds)
 
void setWidth (int width)
 
void setHeight (int height)
 
virtual void addChild (Figure *child)
 
int childCount () const
 
Figurechild (int index) const
 
virtual void layout (wxDC *dc)
 
virtual void draw (wxDC *dc)
 
void highlight (const wxColour &colour)
 
void clearHighlight ()
 
void setOptions (MachineCanvasOptions *options)
 
MachineCanvasOptionsoptions ()
 

Protected Member Functions

virtual void drawSelf (wxDC *dc)
 
virtual void layoutChildren (wxDC *)
 
- Protected Member Functions inherited from ConnectionFigure
 ConnectionFigure ()
 
- Protected Member Functions inherited from Figure
void drawChildren (wxDC *dc)
 
virtual void layoutSelf (wxDC *)
 

Private Member Functions

BidirBridgeFigureoperator= (BidirBridgeFigure &old)
 Assignment not allowed. More...
 
 BidirBridgeFigure (BidirBridgeFigure &old)
 Copying not allowed. More...
 

Additional Inherited Members

- Public Types inherited from BridgeFigure
enum  Direction { DIR_RIGHT, DIR_LEFT, DIR_BIDIR }
 Direction of the bridge. More...
 
- Protected Attributes inherited from ConnectionFigure
Figuresource_
 Source of connection. More...
 
Figuretarget_
 Target of connection. More...
 
- Protected Attributes inherited from Figure
wxPoint location_
 Top-left location of the Figure's bounding rectangle. More...
 
wxSize size_
 wxSize of the Figure's bounding rectangle. More...
 
wxSize minSize_
 Figure's minimum size. More...
 
std::vector< Figure * > children_
 Figure's children. More...
 
bool xSet_
 Tells if x-coordinate has been fixed. More...
 
bool laidOut_
 Tells whether the Figure and its children have been laid out or not. More...
 
bool drawn_
 Tells whether the Figure and its children have been drawn or not. More...
 
wxColour highlight_
 Highlight colour. More...
 
bool highlighted_
 Tells if the figure is highlighted. More...
 
MachineCanvasOptionsoptions_
 Options which are used for customizing figures. More...
 

Detailed Description

Figure of a bidirectional bridge.

Definition at line 46 of file BidirBridgeFigure.hh.

Constructor & Destructor Documentation

◆ BidirBridgeFigure() [1/2]

BidirBridgeFigure::BidirBridgeFigure ( )

◆ ~BidirBridgeFigure()

BidirBridgeFigure::~BidirBridgeFigure ( )
virtual

The Destructor.

Definition at line 56 of file BidirBridgeFigure.cc.

56  {
57 }

◆ BidirBridgeFigure() [2/2]

BidirBridgeFigure::BidirBridgeFigure ( BidirBridgeFigure old)
private

Copying not allowed.

Member Function Documentation

◆ drawSelf()

void BidirBridgeFigure::drawSelf ( wxDC *  dc)
protectedvirtual

This figure is not visible on the canvas.

Empty implementation is defined to override BridgeFigure.

Reimplemented from BridgeFigure.

Definition at line 94 of file BidirBridgeFigure.cc.

94  {
95 }

◆ layoutChildren()

void BidirBridgeFigure::layoutChildren ( wxDC *  dc)
protectedvirtual

Lays out the two child bridges.

Parameters
dcDevice context.

Reimplemented from Figure.

Definition at line 65 of file BidirBridgeFigure.cc.

65  {
66 
67  assert(children_.size() == 2);
68 
69  dynamic_cast<BridgeFigure*>(
71 
72  children_[0]->setX(location_.x);
73  children_[0]->setY(location_.y);
74  children_[0]->setWidth(size_.GetWidth());
75  children_[0]->layout(dc);
76 
77  dynamic_cast<BridgeFigure*>(
79 
80  children_[1]->setX(location_.x);
81  children_[1]->setY(
83 
84  children_[1]->setWidth(size_.GetWidth());
85  children_[1]->layout(dc);
86 }

References assert, MachineCanvasLayoutConstraints::BRIDGE_HEIGHT, Figure::children_, BridgeFigure::DIR_LEFT, BridgeFigure::DIR_RIGHT, Figure::location_, BridgeFigure::setDirection(), and Figure::size_.

Here is the call graph for this function:

◆ operator=()

BidirBridgeFigure& BidirBridgeFigure::operator= ( BidirBridgeFigure old)
private

Assignment not allowed.


The documentation for this class was generated from the following files:
BridgeFigure::setDirection
void setDirection(BridgeFigure::Direction direction)
BridgeFigure::BridgeFigure
BridgeFigure()
Definition: BridgeFigure.cc:43
Figure::children_
std::vector< Figure * > children_
Figure's children.
Definition: Figure.hh:90
assert
#define assert(condition)
Definition: Application.hh:86
Figure::size_
wxSize size_
wxSize of the Figure's bounding rectangle.
Definition: Figure.hh:86
Figure::location_
wxPoint location_
Top-left location of the Figure's bounding rectangle.
Definition: Figure.hh:84
BridgeFigure
Definition: BridgeFigure.hh:46
BridgeFigure::DIR_RIGHT
@ DIR_RIGHT
Definition: BridgeFigure.hh:49
MachineCanvasLayoutConstraints::BRIDGE_WIDTH
static const int BRIDGE_WIDTH
Width of a bridge.
Definition: MachineCanvasLayoutConstraints.hh:77
Figure::minSize_
wxSize minSize_
Figure's minimum size.
Definition: Figure.hh:88
MachineCanvasLayoutConstraints::BRIDGE_HEIGHT
static const int BRIDGE_HEIGHT
Height of a bridge.
Definition: MachineCanvasLayoutConstraints.hh:79
BridgeFigure::DIR_LEFT
@ DIR_LEFT
Definition: BridgeFigure.hh:49