Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Changes to the OMC-Java interface (Java code)
- Replaced the ANTLR grammar for parsing the CORBA communication + Max heap size reduced by 66% (down to 1GB from 3GB on 64-bit platforms) + Time to parse reduced to 33-50% of the original time taken (depending on typed or untyped parsing) + Added proper typed parsing also for list,tuple and Option - Added the TypeSpec.java class to represent complex types fully - Added missing JreSocketFactory - Parsing an AST with type information is no longer done in two phases - Updated the templated to generate jar files to reflect the changes above - MSL 3.1 can now be parsed fully, with full type information + Typecasting needs to be done for tuples due to Java weaknesses, but no longer using ModelicaAny.cast - standard (T)myTuple.get(0) should work. + The string is possibly too large for 32-bit OpenModelica to handle. However, it is no longer manipulated within OpenModelica, so it might accept it. Needs to be tested. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4772 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
- Loading branch information
Showing
48 changed files
with
852 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
c_runtime/java_interface/src/org/openmodelica/ComplexTypeSpec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.openmodelica; | ||
|
||
/** | ||
* Similar to OpenModelica TCOMPLEX | ||
*/ | ||
public class ComplexTypeSpec<T extends ModelicaObject> extends TypeSpec<T> { | ||
private final TypeSpec<? extends ModelicaObject>[] spec; | ||
public ComplexTypeSpec(Class<T> c,TypeSpec<? extends ModelicaObject>[] spec) { | ||
super(c); | ||
this.spec = spec; | ||
} | ||
public TypeSpec<? extends ModelicaObject>[] getSubClassType() { | ||
return spec; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.