org.jmodelica.modelica.compiler.ScalarAsArray Class Reference

Dummy array for representing a scalar expression in algorithms handling Arrays. More...

Inheritance diagram for org.jmodelica.modelica.compiler.ScalarAsArray:

org.jmodelica.modelica.compiler.Array org.jmodelica.modelica.compiler.BaseNode

List of all members.

Public Member Functions

void flushCache ()
 low-level
void flushCollectionCache ()
 internal
ScalarAsArray clone () throws CloneNotSupportedException
 internal
ScalarAsArray copy ()
 internal
ScalarAsArray fullCopy ()
 low-level
 ScalarAsArray (FExp exp)
 Constructs a ScalarAsArray containing exp.
 ScalarAsArray (FExp exp, Indices ind)
 Constructs a ScalarAsArray containing exp, pretending to have ind indices.
FExp get (Index i)
 Returns the single element wrapped by this Array.
void set (Index i, FExp exp)
 Sets the single element wrapped by this Array to exp.
 ScalarAsArray ()
 method FlatModelica.ast:1
 ScalarAsArray (List< FExp > p0)
 method FlatModelica.ast:8
boolean mayHaveRewrite ()
 internal method FlatModelica.ast:20
void setFExpList (List< FExp > list)
 Setter for FExpList high-level method FlatModelica.ast:5.
int getNumFExp ()
FExp getFExp (int i)
 Getter for child in list FExpList high-level method FlatModelica.ast:19.
void addFExp (FExp node)
 Add element to list FExpList high-level method FlatModelica.ast:27.
void addFExpNoTransform (FExp node)
 low-level method FlatModelica.ast:34
void setFExp (FExp node, int i)
 Setter for child in list FExpList high-level method FlatModelica.ast:42.
List< FExpgetFExps ()
 Getter for FExp list.
List< FExpgetFExpsNoTransform ()
 low-level method FlatModelica.ast:56
List< FExpgetFExpList ()
 Getter for list FExpList high-level method FlatModelica.ast:63.
List< FExpgetFExpListNoTransform ()
 low-level method FlatModelica.ast:72
ASTNode rewriteTo ()
 internal

Protected Member Functions

void fillSubset (Array arr, Index i, Map< String, FExp > indexMap)
 method Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:993
FExp buildFArray (Iterator< FExp > it, ElementBuilder builder, int dim)
 Recursive method for building an FArray describing this Array.
int numChildren ()
 low-level method FlatModelica.ast:14


Detailed Description

Dummy array for representing a scalar expression in algorithms handling Arrays.

Iterator acts as if on a vector of length 1.

The get() and set() methods ignore the Index and always operate on the single element. This allows a ScalarAsArray to be used with an Array in an algorithm that expects two Array objects, as long as the Indices from a real Array is used to iterate.

Since the indices of a scalar makes no sense, the Iterator returned by indices().iterator() will have no elements.

The Iterator returned by iterator() will have one element. node FlatModelica.ast:617


Constructor & Destructor Documentation

org.jmodelica.modelica.compiler.ScalarAsArray.ScalarAsArray ( FExp  exp  ) 

Constructs a ScalarAsArray containing exp.

method ArrayHelpers /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:2861 Constructs a ScalarAsArray containing exp.

org.jmodelica.modelica.compiler.ScalarAsArray.ScalarAsArray ( FExp  exp,
Indices  ind 
)

Constructs a ScalarAsArray containing exp, pretending to have ind indices.

This makes indices().iterator() meaningful. method ArrayHelpers /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:2871 Constructs a ScalarAsArray containing exp, pretending to have ind indices.

This makes indices().iterator() meaningful.

org.jmodelica.modelica.compiler.ScalarAsArray.ScalarAsArray (  ) 

method FlatModelica.ast:1

org.jmodelica.modelica.compiler.ScalarAsArray.ScalarAsArray ( List< FExp p0  ) 

method FlatModelica.ast:8


Member Function Documentation

void org.jmodelica.modelica.compiler.ScalarAsArray.addFExp ( FExp  node  ) 

Add element to list FExpList high-level method FlatModelica.ast:27.

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.addFExpNoTransform ( FExp  node  ) 

low-level method FlatModelica.ast:34

Reimplemented from org.jmodelica.modelica.compiler.Array.

FExp org.jmodelica.modelica.compiler.ScalarAsArray.buildFArray ( Iterator< FExp it,
ElementBuilder  builder,
int  dim 
) [protected]

Recursive method for building an FArray describing this Array.

For use by methods creating specific types of FArrays.

This implementation only applies builder to the single expression of this ScalarAsArray.

See also:
buildLiteral(boolean)

buildScalarized(java.util.HashMap<String,FExp>) method ArrayHelpers /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:2887 Recursive method for building an FArray describing this Array. For use by methods creating specific types of FArrays.

This implementation only applies builder to the single expression of this ScalarAsArray.

See also:
buildLiteral(boolean)

buildScalarized(java.util.HashMap<String,FExp>)

Reimplemented from org.jmodelica.modelica.compiler.Array.

ScalarAsArray org.jmodelica.modelica.compiler.ScalarAsArray.clone (  )  throws CloneNotSupportedException

internal

Reimplemented from org.jmodelica.modelica.compiler.Array.

ScalarAsArray org.jmodelica.modelica.compiler.ScalarAsArray.copy (  ) 

internal

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.fillSubset ( Array  arr,
Index  i,
Map< String, FExp indexMap 
) [protected]

method Arrays /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:993

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.flushCache (  ) 

low-level

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.flushCollectionCache (  ) 

internal

Reimplemented from org.jmodelica.modelica.compiler.Array.

ScalarAsArray org.jmodelica.modelica.compiler.ScalarAsArray.fullCopy (  ) 

low-level

Reimplemented from org.jmodelica.modelica.compiler.Array.

FExp org.jmodelica.modelica.compiler.ScalarAsArray.get ( Index  i  ) 

Returns the single element wrapped by this Array.

method ArrayHelpers /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:2894 Returns the single element wrapped by this Array.

Reimplemented from org.jmodelica.modelica.compiler.Array.

FExp org.jmodelica.modelica.compiler.ScalarAsArray.getFExp ( int  i  ) 

Getter for child in list FExpList high-level method FlatModelica.ast:19.

Reimplemented from org.jmodelica.modelica.compiler.Array.

List<FExp> org.jmodelica.modelica.compiler.ScalarAsArray.getFExpList (  ) 

Getter for list FExpList high-level method FlatModelica.ast:63.

Reimplemented from org.jmodelica.modelica.compiler.Array.

List<FExp> org.jmodelica.modelica.compiler.ScalarAsArray.getFExpListNoTransform (  ) 

low-level method FlatModelica.ast:72

Reimplemented from org.jmodelica.modelica.compiler.Array.

List<FExp> org.jmodelica.modelica.compiler.ScalarAsArray.getFExps (  ) 

Getter for FExp list.

high-level method FlatModelica.ast:50

Reimplemented from org.jmodelica.modelica.compiler.Array.

List<FExp> org.jmodelica.modelica.compiler.ScalarAsArray.getFExpsNoTransform (  ) 

low-level method FlatModelica.ast:56

Reimplemented from org.jmodelica.modelica.compiler.Array.

int org.jmodelica.modelica.compiler.ScalarAsArray.getNumFExp (  ) 

Returns:
number of children in FExpList high-level method FlatModelica.ast:12

Reimplemented from org.jmodelica.modelica.compiler.Array.

boolean org.jmodelica.modelica.compiler.ScalarAsArray.mayHaveRewrite (  ) 

internal method FlatModelica.ast:20

Reimplemented from org.jmodelica.modelica.compiler.Array.

int org.jmodelica.modelica.compiler.ScalarAsArray.numChildren (  )  [protected]

low-level method FlatModelica.ast:14

Reimplemented from org.jmodelica.modelica.compiler.Array.

ASTNode org.jmodelica.modelica.compiler.ScalarAsArray.rewriteTo (  ) 

internal

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.set ( Index  i,
FExp  exp 
)

Sets the single element wrapped by this Array to exp.

method ArrayHelpers /tmp/JModelica/Compiler/ModelicaFrontEnd/src/jastadd/Arrays.jrag:2901 Sets the single element wrapped by this Array to exp.

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.setFExp ( FExp  node,
int  i 
)

Setter for child in list FExpList high-level method FlatModelica.ast:42.

Reimplemented from org.jmodelica.modelica.compiler.Array.

void org.jmodelica.modelica.compiler.ScalarAsArray.setFExpList ( List< FExp list  ) 

Setter for FExpList high-level method FlatModelica.ast:5.

Reimplemented from org.jmodelica.modelica.compiler.Array.


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

Generated on Fri Oct 7 14:51:09 2011 for JModelica.org by  doxygen 1.5.8