Math2mat
Public Member Functions

m2m.backend.structure.Switch Class Reference

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

List of all members.

Public Member Functions

 Switch ()
void modifyNumType (BuildingBlock.NumType type)
String getXmlTagName ()
boolean insideFromXml (org.w3c.dom.Element el, Function newFunc)
void insideToXml (org.w3c.dom.Element el, Document dom, boolean shortRef)
void setSwitchVar (Variable var)
Variable getSwitchVar ()
void addCase (Vector< Variable > cond, Vector< Element > body)
void addCase (Case cas)
void setCases (Vector< Case > cases)
Vector< CasegetCases ()
Case getCaseAt (int ind)
int getSize ()
String toString (int level)
String toSchematic (int level, String prefix, String boxFormat, String color)

Detailed Description

Describe a conditional structure if/then/else

Author:
Trolliet Gregory
gregory.trolliet@hesge.ch
Version:
0.1

Definition at line 24 of file Switch.java.


Constructor & Destructor Documentation

m2m.backend.structure.Switch.Switch ( )

Constructor empty

Definition at line 38 of file Switch.java.


Member Function Documentation

void m2m.backend.structure.Switch.addCase ( Vector< Variable cond,
Vector< Element body 
)

Add a new case to the switch

Parameters:
condCondition
bodyInstructions

Definition at line 130 of file Switch.java.

void m2m.backend.structure.Switch.addCase ( Case  cas)

Add a new case to the switch

Parameters:
casNew case

Definition at line 141 of file Switch.java.

Case m2m.backend.structure.Switch.getCaseAt ( int  ind)

Get the case at the selected position

Parameters:
indPosition
Returns:
Case

Definition at line 166 of file Switch.java.

Vector<Case> m2m.backend.structure.Switch.getCases ( )

Get all the cases

Returns:
Cases

Definition at line 157 of file Switch.java.

int m2m.backend.structure.Switch.getSize ( )

Get the number of cases

Returns:
Number of cases

Definition at line 177 of file Switch.java.

Variable m2m.backend.structure.Switch.getSwitchVar ( )

Get the switch variable

Returns:
Switch variable

Definition at line 121 of file Switch.java.

String m2m.backend.structure.Switch.getXmlTagName ( ) [virtual]

Reimplemented from m2m.backend.structure.Function.

Definition at line 51 of file Switch.java.

boolean m2m.backend.structure.Switch.insideFromXml ( org.w3c.dom.Element  el,
Function  newFunc 
)

Reimplemented from m2m.backend.structure.Function.

Definition at line 56 of file Switch.java.

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

Reimplemented from m2m.backend.structure.Function.

Definition at line 92 of file Switch.java.

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

Reimplemented from m2m.backend.structure.Function.

Definition at line 44 of file Switch.java.

void m2m.backend.structure.Switch.setCases ( Vector< Case cases)

Set all the cases

Parameters:
casesCases

Definition at line 149 of file Switch.java.

void m2m.backend.structure.Switch.setSwitchVar ( Variable  var)

Set the switch variable

Parameters:
varSwitch variable

Definition at line 113 of file Switch.java.

String m2m.backend.structure.Switch.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.Function.

Definition at line 197 of file Switch.java.

String m2m.backend.structure.Switch.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.Function.

Definition at line 182 of file Switch.java.


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