Skip to content

Commit

Permalink
- Added some new APIs to get equation and algorithm items.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11032 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Feb 3, 2012
1 parent 7bb82a7 commit 7b8adf8
Show file tree
Hide file tree
Showing 3 changed files with 655 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Dump.mo
Expand Up @@ -2854,7 +2854,7 @@ algorithm
end match;
end unparseEquationitemStrLst;

protected function unparseEquationitemStr "function: unparseEquationitemStr
public function unparseEquationitemStr "function: unparseEquationitemStr
Prettyprints an EquationItem to a string."
input Integer inInteger;
input Absyn.EquationItem inEquationItem;
Expand Down
60 changes: 60 additions & 0 deletions Compiler/FrontEnd/ModelicaBuiltin.mo
Expand Up @@ -1960,6 +1960,36 @@ external "builtin";
annotation(preferredView="text");
end getNthInitialAlgorithm;

function getAlgorithmItemsCount "Counts the number of Algorithm items in a class"
input TypeName class_;
output Integer count;
external "builtin";
annotation(preferredView="text");
end getAlgorithmItemsCount;

function getNthAlgorithmItem "Returns the Nth Algorithm Item"
input TypeName class_;
input Integer index;
output String result;
external "builtin";
annotation(preferredView="text");
end getNthAlgorithmItem;

function getInitialAlgorithmItemsCount "Counts the number of Initial Algorithm items in a class"
input TypeName class_;
output Integer count;
external "builtin";
annotation(preferredView="text");
end getInitialAlgorithmItemsCount;

function getNthInitialAlgorithmItem "Returns the Nth Initial Algorithm Item"
input TypeName class_;
input Integer index;
output String result;
external "builtin";
annotation(preferredView="text");
end getNthInitialAlgorithmItem;

function getEquationCount "Counts the number of Equation sections in a class"
input TypeName class_;
output Integer count;
Expand Down Expand Up @@ -1990,6 +2020,36 @@ external "builtin";
annotation(preferredView="text");
end getNthInitialEquation;

function getEquationItemsCount "Counts the number of Equation items in a class"
input TypeName class_;
output Integer count;
external "builtin";
annotation(preferredView="text");
end getEquationItemsCount;

function getNthEquationItem "Returns the Nth Equation Item"
input TypeName class_;
input Integer index;
output String result;
external "builtin";
annotation(preferredView="text");
end getNthEquationItem;

function getInitialEquationItemsCount "Counts the number of Initial Equation items in a class"
input TypeName class_;
output Integer count;
external "builtin";
annotation(preferredView="text");
end getInitialEquationItemsCount;

function getNthInitialEquationItem "Returns the Nth Initial Equation Item"
input TypeName class_;
input Integer index;
output String result;
external "builtin";
annotation(preferredView="text");
end getNthInitialEquationItem;

function getAnnotationCount "Counts the number of Annotation sections in a class"
input TypeName class_;
output Integer count;
Expand Down

0 comments on commit 7b8adf8

Please sign in to comment.