Skip to content

Commit

Permalink
Java Interface
Browse files Browse the repository at this point in the history
- Added parse(Reader) to ModelicaOption
  + Fixed the Java testsuite
- Added testcase for getAstAsCorbaString(filename)
  + Uses TankPID.mo, and a very short Java function.
  + Could also use CORBA to get the string, but that requires a little bit more code.
    It's better to pass the string using filename anyway, since 32-bit architectures are limited to 16MB strings in OpenModelica.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4797 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jan 18, 2010
1 parent e961ada commit e4a2a8d
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -65,7 +65,11 @@ public void printToBuffer(StringBuffer buffer) {
buffer.append(")");
}

static <T extends ModelicaObject> ModelicaOption<T> parse(Reader r, TypeSpec<T> spec) throws IOException, ParseException {
public static ModelicaOption<?> parse(Reader r) throws IOException, ParseException {
return parse(r,SimpleTypeSpec.modelicaObject);
}

public static <T extends ModelicaObject> ModelicaOption<T> parse(Reader r, TypeSpec<T> spec) throws IOException, ParseException {
ModelicaAny.skipWhiteSpace(r);
char[] cbuf = new char[5];
r.read(cbuf, 0, 5);
Expand Down

0 comments on commit e4a2a8d

Please sign in to comment.