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

place two schemi in parallel More...

#include <parSchema.h>

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

Public Member Functions

 parSchema (schema *s1, schema *s2)
 
virtual void place (double ox, double oy, int orientation)
 
virtual void draw (device &dev)
 
virtual point inputPoint (unsigned int i) const
 
virtual point outputPoint (unsigned int i) const
 
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 Attributes

schemafSchema1
 
schemafSchema2
 
unsigned int fInputFrontier
 
unsigned int fOutputFrontier
 

Detailed Description

place two schemi in parallel

Definition at line 33 of file parSchema.h.

Constructor & Destructor Documentation

parSchema::parSchema ( schema s1,
schema s2 
)

Definition at line 36 of file parSchema.cpp.

References schema::width().

37  : schema( s1->inputs()+s2->inputs(),
38  s1->outputs()+s2->outputs(),
39  s1->width(),
40  s1->height() + s2->height() ),
41  fSchema1(s1),
42  fSchema2(s2),
43  fInputFrontier(s1->inputs()),
45 {
46  assert (s1->width() == s2->width());
47 }
unsigned int outputs() const
Definition: schema.h:129
schema * fSchema2
Definition: parSchema.h:36
unsigned int fOutputFrontier
Definition: parSchema.h:38
unsigned int fInputFrontier
Definition: parSchema.h:37
schema * fSchema1
Definition: parSchema.h:35
unsigned int inputs() const
Definition: schema.h:128
double width() const
Definition: schema.h:126
schema(unsigned int inputs, unsigned int outputs, double width, double height)
Definition: schema.h:113
double height() const
Definition: schema.h:127

Here is the call graph for this function:

Member Function Documentation

void parSchema::collectTraits ( collector c)
virtual

Implements schema.

Definition at line 85 of file parSchema.cpp.

References schema::collectTraits(), fSchema1, and fSchema2.

86 {
89 }
schema * fSchema2
Definition: parSchema.h:36
virtual void collectTraits(collector &c)=0
schema * fSchema1
Definition: parSchema.h:35

Here is the call graph for this function:

void parSchema::draw ( device dev)
virtual

Implements schema.

Definition at line 79 of file parSchema.cpp.

References schema::draw(), fSchema1, and fSchema2.

80 {
81  fSchema1->draw(dev);
82  fSchema2->draw(dev);
83 }
virtual void draw(device &dev)=0
schema * fSchema2
Definition: parSchema.h:36
schema * fSchema1
Definition: parSchema.h:35

Here is the call graph for this function:

point parSchema::inputPoint ( unsigned int  i) const
virtual

Implements schema.

Definition at line 65 of file parSchema.cpp.

References fInputFrontier, fSchema1, fSchema2, and schema::inputPoint().

66 {
67  return (i < fInputFrontier)
68  ? fSchema1->inputPoint(i)
70 }
virtual point inputPoint(unsigned int i) const =0
schema * fSchema2
Definition: parSchema.h:36
unsigned int fInputFrontier
Definition: parSchema.h:37
schema * fSchema1
Definition: parSchema.h:35

Here is the call graph for this function:

point parSchema::outputPoint ( unsigned int  i) const
virtual

Implements schema.

Definition at line 72 of file parSchema.cpp.

References fOutputFrontier, fSchema1, fSchema2, and schema::outputPoint().

73 {
74  return (i < fOutputFrontier)
75  ? fSchema1->outputPoint(i)
77 }
schema * fSchema2
Definition: parSchema.h:36
unsigned int fOutputFrontier
Definition: parSchema.h:38
schema * fSchema1
Definition: parSchema.h:35
virtual point outputPoint(unsigned int i) const =0

Here is the call graph for this function:

void parSchema::place ( double  ox,
double  oy,
int  orientation 
)
virtual

Implements schema.

Definition at line 50 of file parSchema.cpp.

References schema::beginPlace(), schema::endPlace(), fSchema1, fSchema2, schema::height(), kLeftRight, schema::orientation(), and schema::place().

51 {
52  beginPlace(ox, oy, orientation);
53 
54  if (orientation == kLeftRight) {
55  fSchema1->place(ox, oy, orientation);
57  } else {
58  fSchema2->place(ox, oy, orientation);
60  }
61 
62  endPlace();
63 }
void endPlace()
Definition: schema.h:134
void beginPlace(double x, double y, int orientation)
Definition: schema.h:132
schema * fSchema2
Definition: parSchema.h:36
schema * fSchema1
Definition: parSchema.h:35
int orientation() const
Definition: schema.h:140
virtual void place(double x, double y, int orientation)=0
double height() const
Definition: schema.h:127

Here is the call graph for this function:

Member Data Documentation

unsigned int parSchema::fInputFrontier
private

Definition at line 37 of file parSchema.h.

Referenced by inputPoint().

unsigned int parSchema::fOutputFrontier
private

Definition at line 38 of file parSchema.h.

Referenced by outputPoint().

schema* parSchema::fSchema1
private

Definition at line 35 of file parSchema.h.

Referenced by collectTraits(), draw(), inputPoint(), outputPoint(), and place().

schema* parSchema::fSchema2
private

Definition at line 36 of file parSchema.h.

Referenced by collectTraits(), draw(), inputPoint(), outputPoint(), and place().


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