Math2mat
Public Member Functions | Protected Member Functions | Protected Attributes

m2m.backend.structure.Operation Class Reference

Inheritance diagram for m2m.backend.structure.Operation:
Inheritance graph
[legend]
Collaboration diagram for m2m.backend.structure.Operation:
Collaboration graph
[legend]

List of all members.

Public Member Functions

String getXmlTagName ()
boolean insideFromXml (org.w3c.dom.Element el, Function newFunc)
void insideToXml (org.w3c.dom.Element el, Document dom, boolean shortRef)
 Operation ()
Element findElement (String name)
void copyTo (Element e, Function newFunc)
 Operation (String opName)
 Operation (String opName, boolean gen)
BuildingBlock getFirstPipelined (NumType type)
void modifyNumType (BuildingBlock.NumType type)
BuildingBlock getFirst ()
void addInput (Element op)
void setInput (Vector< Element > op)
void setInputAt (int i, Element op)
Vector< ElementgetInput ()
int getNbInput ()
Element getInputAt (int i)
void addOutput (Element op)
void setOutput (Vector< Element > op)
void setOutputAt (int i, Element op)
Vector< ElementgetOutput ()
int getNbOutput ()
Element getOutputAt (int i)
void setBlock (BuildingBlock block)
BuildingBlock getBlock ()
void setOpName (String name)
String getOpName ()
String getOpSymbol ()
String toString (int level)
String toSchematic (int level, String prefix, String boxFormat, String color)
String toOctave (int level, String op)

Protected Member Functions

String toStringParam (int level)

Protected Attributes

Vector< Elementinput
Vector< Elementoutput
BuildingBlock block
String opName
boolean generic = false

Detailed Description

Describe an operation

Parameters:
<T>Type of element (Operation or SimpleVariable)
Author:
Trolliet Gregory
gregory.trolliet@hesge.ch
Version:
0.1

Definition at line 28 of file Operation.java.


Constructor & Destructor Documentation

m2m.backend.structure.Operation.Operation ( )

Construct an empty operation

Definition at line 120 of file Operation.java.

m2m.backend.structure.Operation.Operation ( String  opName)

Definition at line 179 of file Operation.java.

m2m.backend.structure.Operation.Operation ( String  opName,
boolean  gen 
)

Definition at line 185 of file Operation.java.


Member Function Documentation

void m2m.backend.structure.Operation.addInput ( Element  op)

Add an operand to the operand list

Parameters:
opOperand

Definition at line 237 of file Operation.java.

void m2m.backend.structure.Operation.addOutput ( Element  op)

Add an operand to the operand list

Parameters:
opOperand

Definition at line 293 of file Operation.java.

void m2m.backend.structure.Operation.copyTo ( Element  e,
Function  newFunc 
)
Element m2m.backend.structure.Operation.findElement ( String  name)

Reimplemented from m2m.backend.structure.Element.

Definition at line 127 of file Operation.java.

BuildingBlock m2m.backend.structure.Operation.getBlock ( )

Get the block

Returns:
Block

Definition at line 357 of file Operation.java.

BuildingBlock m2m.backend.structure.Operation.getFirst ( )

Get the first material block who correspond to the opName

Returns:
Pointer on the block

Definition at line 221 of file Operation.java.

BuildingBlock m2m.backend.structure.Operation.getFirstPipelined ( NumType  type)

Get the first pipelined material block if exist, or the first block who correspond to the opName

Returns:
Pointer on the block

Definition at line 197 of file Operation.java.

Vector<Element> m2m.backend.structure.Operation.getInput ( )

Get the operand list

Returns:
Operand list

Definition at line 262 of file Operation.java.

Element m2m.backend.structure.Operation.getInputAt ( int  i)

Get the operand to the wanted position

Parameters:
iPosition
Returns:
Operand

Definition at line 279 of file Operation.java.

int m2m.backend.structure.Operation.getNbInput ( )

Get the number of operand

Returns:
Number of operand

Definition at line 270 of file Operation.java.

int m2m.backend.structure.Operation.getNbOutput ( )

Get the number of operand

Returns:
Number of operand

Definition at line 326 of file Operation.java.

String m2m.backend.structure.Operation.getOpName ( )

Get the name of operation

Returns:
Name

Definition at line 373 of file Operation.java.

String m2m.backend.structure.Operation.getOpSymbol ( )
Vector<Element> m2m.backend.structure.Operation.getOutput ( )

Get the operand list

Returns:
Operand list

Definition at line 318 of file Operation.java.

Element m2m.backend.structure.Operation.getOutputAt ( int  i)

Get the operand to the wanted position

Parameters:
iPosition
Returns:
Operand

Definition at line 335 of file Operation.java.

String m2m.backend.structure.Operation.getXmlTagName ( ) [virtual]
boolean m2m.backend.structure.Operation.insideFromXml ( org.w3c.dom.Element  el,
Function  newFunc 
)

Reimplemented from m2m.backend.structure.Element.

Reimplemented in m2m.backend.structure.Multiplexer.

Definition at line 51 of file Operation.java.

void m2m.backend.structure.Operation.insideToXml ( org.w3c.dom.Element  el,
Document  dom,
boolean  shortRef 
)

Reimplemented in m2m.backend.structure.Multiplexer.

Definition at line 99 of file Operation.java.

void m2m.backend.structure.Operation.modifyNumType ( BuildingBlock.NumType  type)

Reimplemented from m2m.backend.structure.Element.

Definition at line 213 of file Operation.java.

void m2m.backend.structure.Operation.setBlock ( BuildingBlock  block)

Set the block to use

Parameters:
blockBlock to use

Definition at line 349 of file Operation.java.

void m2m.backend.structure.Operation.setInput ( Vector< Element op)

Set the operand list

Parameters:
opOperand list

Definition at line 245 of file Operation.java.

void m2m.backend.structure.Operation.setInputAt ( int  i,
Element  op 
)

Set the operand to the wanted position

Parameters:
iPosition
opOperand

Definition at line 254 of file Operation.java.

void m2m.backend.structure.Operation.setOpName ( String  name)

Set the name of the operation

Parameters:
nameName

Definition at line 365 of file Operation.java.

void m2m.backend.structure.Operation.setOutput ( Vector< Element op)

Set the operand list

Parameters:
opOperand list

Definition at line 301 of file Operation.java.

void m2m.backend.structure.Operation.setOutputAt ( int  i,
Element  op 
)

Set the operand to the wanted position

Parameters:
iPosition
opOperand

Definition at line 310 of file Operation.java.

String m2m.backend.structure.Operation.toOctave ( int  level,
String  op 
)

Generate the octave code corresponding to the operation, the operator is set by the parameter op.

Parameters:
levelTabulation level
opOperator
Returns:
String

If octave need to display the resultat of the operation

Definition at line 472 of file Operation.java.

String m2m.backend.structure.Operation.toSchematic ( int  level,
String  prefix,
String  boxFormat,
String  color 
)

Create the schematic file, use with graphviz to generate schematic

Parameters:
levelLevel of tab
prefixPrefix for the element name
boxFormatFormat of box (rectangle, triangle, ...)
colorColor of the block
Returns:
Generate string

Reimplemented from m2m.backend.structure.Element.

Reimplemented in m2m.backend.structure.Multiplexer.

Definition at line 424 of file Operation.java.

String m2m.backend.structure.Operation.toString ( int  level)

Convert the object to a string that contains all the parametres

Parameters:
levelIndent of the string
Returns:
String

Reimplemented from m2m.backend.structure.Element.

Reimplemented in m2m.backend.structure.Multiplexer.

Definition at line 386 of file Operation.java.

String m2m.backend.structure.Operation.toStringParam ( int  level) [protected]

Convert input and output to String

Parameters:
levelIndent of the string
Returns:
String

Definition at line 402 of file Operation.java.


Member Data Documentation

Define what material block use

Definition at line 38 of file Operation.java.

boolean m2m.backend.structure.Operation.generic = false [protected]

Definition at line 43 of file Operation.java.

Operand list

Definition at line 33 of file Operation.java.

Save the name of the operation (add, sub, mult, etc)

Definition at line 42 of file Operation.java.

Definition at line 34 of file Operation.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations