Skip to content

Commit

Permalink
- added a new function
Browse files Browse the repository at this point in the history
- use dummyInfo constant rather than construct it on the fly

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4984 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Feb 18, 2010
1 parent 6455574 commit 1e58316
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions Compiler/Absyn.mo
Expand Up @@ -668,12 +668,9 @@ end Variability;

public
uniontype Direction "Direction"
record INPUT end INPUT;

record OUTPUT end OUTPUT;

record BIDIR end BIDIR;

record INPUT "direction is input" end INPUT;
record OUTPUT "direction is output" end OUTPUT;
record BIDIR "direction is not specified, neither input nor output" end BIDIR;
end Direction;

public
Expand Down Expand Up @@ -2693,6 +2690,21 @@ algorithm
end matchcontinue;
end joinPathsOpt;

public function selectPathsOpt "function: selectPathsOpt
This function selects the second path when the first one
is NONE otherwise it will select the first one."
input Option<Path> inPath1;
input Path inPath2;
output Path outPath;
algorithm
outPath := matchcontinue (inPath1,inPath2)
local
Path p;
case (NONE(), p) then p;
case (SOME(p),_) then p;
end matchcontinue;
end selectPathsOpt;

public function optPathAppend "
Author BZ, 2009-01
Appends a path to optional 'base'-path.
Expand Down Expand Up @@ -3160,7 +3172,7 @@ end setClassFilename;
public function emptyClassInfo ""
output Info info;
algorithm
info := INFO("",false,0,0,0,0,TIMESTAMP(0.0,0.0));
info := dummyInfo; //INFO("",false,0,0,0,0,TIMESTAMP(0.0,0.0));
end emptyClassInfo;

public function setClassName "function setClassFilename
Expand Down

0 comments on commit 1e58316

Please sign in to comment.