FAUST compiler  0.9.9.6b8
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
cutSchema Class Reference

Terminate a cable (cut box) More...

#include <cutSchema.h>

Inheritance diagram for cutSchema:
Inheritance graph
[legend]
Collaboration diagram for cutSchema:
Collaboration graph
[legend]

Public Member Functions

virtual void place (double x, double y, int orientation)
 The input point is placed in the middle. More...
 
virtual void draw (device &dev)
 A cut is represented by a small black dot. More...
 
virtual point inputPoint (unsigned int i) const
 By definition a Cut has only one input point. More...
 
virtual point outputPoint (unsigned int i) const
 By definition a Cut has no output point. More...
 
virtual void collectTraits (collector &c)
 
- Public Member Functions inherited from schema
 schema (unsigned int inputs, unsigned int outputs, double width, double height)
 
virtual ~schema ()
 
double width () const
 
double height () const
 
unsigned int inputs () const
 
unsigned int outputs () const
 
void beginPlace (double x, double y, int orientation)
 
void endPlace ()
 
bool placed () const
 
double x () const
 
double y () const
 
int orientation () const
 

Private Member Functions

 cutSchema ()
 A Cut is represented by a small black dot. More...
 

Private Attributes

point fPoint
 

Friends

schemamakeCutSchema ()
 Creates a new Cut schema. More...
 

Detailed Description

Terminate a cable (cut box)

Definition at line 32 of file cutSchema.h.

Constructor & Destructor Documentation

cutSchema::cutSchema ( )
private

A Cut is represented by a small black dot.

It has 1 input and no outputs. It has a 0 width and a 1 wire height. The constructor is private in order to enforce the usage of makeCutSchema.

Definition at line 45 of file cutSchema.cpp.

46  : schema (1, 0, 0, dWire/100.0), fPoint(0,0)
47 {}
const double dWire
distance between two wires
Definition: schema.h:33
point fPoint
Definition: cutSchema.h:34
schema(unsigned int inputs, unsigned int outputs, double width, double height)
Definition: schema.h:113

Member Function Documentation

void cutSchema::collectTraits ( collector c)
virtual

Implements schema.

Definition at line 69 of file cutSchema.cpp.

70 {}
void cutSchema::draw ( device dev)
virtual

A cut is represented by a small black dot.

Implements schema.

Definition at line 64 of file cutSchema.cpp.

65 {
66  //dev.rond(fPoint.x, fPoint.y, dWire/8.0);
67 }
point cutSchema::inputPoint ( unsigned int  i) const
virtual

By definition a Cut has only one input point.

Implements schema.

Definition at line 75 of file cutSchema.cpp.

References fPoint.

76 {
77  assert(i==0);
78  return fPoint;
79 }
point fPoint
Definition: cutSchema.h:34
point cutSchema::outputPoint ( unsigned int  i) const
virtual

By definition a Cut has no output point.

Implements schema.

Definition at line 84 of file cutSchema.cpp.

85 {
86  assert(false);
87  return point(-1,-1);
88 }
Definition: schema.h:40
void cutSchema::place ( double  x,
double  y,
int  orientation 
)
virtual

The input point is placed in the middle.

Implements schema.

Definition at line 53 of file cutSchema.cpp.

References schema::beginPlace(), schema::endPlace(), fPoint, and schema::height().

54 {
55  beginPlace(ox, oy, orientation);
56  fPoint = point(ox, oy + height()*0.5); //, -1);
57  endPlace();
58 }
void endPlace()
Definition: schema.h:134
void beginPlace(double x, double y, int orientation)
Definition: schema.h:132
point fPoint
Definition: cutSchema.h:34
int orientation() const
Definition: schema.h:140
Definition: schema.h:40
double height() const
Definition: schema.h:127

Here is the call graph for this function:

Friends And Related Function Documentation

schema* makeCutSchema ( )
friend

Creates a new Cut schema.

Definition at line 33 of file cutSchema.cpp.

34 {
35  return new cutSchema();
36 }
cutSchema()
A Cut is represented by a small black dot.
Definition: cutSchema.cpp:45

Member Data Documentation

point cutSchema::fPoint
private

Definition at line 34 of file cutSchema.h.

Referenced by inputPoint(), and place().


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