FAUST compiler  0.9.9.6b8
Public Member Functions | Private Member Functions | Private Attributes | Friends
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]

List of all members.

Public Member Functions

virtual void place (double x, double y, int orientation)
 The input point is placed in the middle.
virtual void draw (device &dev)
 A cut is represented by a small black dot.
virtual point inputPoint (unsigned int i) const
 By definition a Cut has only one input point.
virtual point outputPoint (unsigned int i) const
 By definition a Cut has no output point.
virtual void collectTraits (collector &c)

Private Member Functions

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

Private Attributes

point fPoint

Friends

schemamakeCutSchema ()
 Creates a new Cut schema.

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.

    :   schema (1, 0, 0, dWire/100.0), fPoint(0,0)
{}

Member Function Documentation

void cutSchema::collectTraits ( collector c) [virtual]

Implements schema.

Definition at line 69 of file cutSchema.cpp.

{}
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.

{
    //dev.rond(fPoint.x, fPoint.y, dWire/8.0);
}
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.

{
    assert(i==0);
    return fPoint;
}
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.

{
    assert(false);
    return point(-1,-1);
}
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().

{
    beginPlace(ox, oy, orientation);
    fPoint = point(ox, oy + height()*0.5); //, -1);
    endPlace();
}

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.

{
    return new cutSchema();
}

Member Data Documentation

Definition at line 34 of file cutSchema.h.

Referenced by inputPoint(), and place().


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