Skip to content

Commit

Permalink
extend StatArray to also work with external data
Browse files Browse the repository at this point in the history
This makes StatRefArray obsolete.
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Aug 3, 2015
1 parent 3027167 commit 832c3be
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 612 deletions.
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -7766,7 +7766,7 @@ template memberVariableInitialize2(SimVar simVar, HashTableCrIListArray.HashTabl
if SimCodeUtil.isVarIndexListConsecutive(varToArrayIndexMapping,name) then
let arrayHeadIdx = listHead(SimCodeUtil.getVarIndexListByMapping(varToArrayIndexMapping,name,indexForUndefinedReferences))
<<
<%arrayName%> = StatRefArrayDim<%dims%><<%typeString%>, <%arrayextentDims(name, v.numArrayElement)%>>(&_pointerTo<%type%>Vars[<%arrayHeadIdx%>]);
<%arrayName%> = StatArrayDim<%dims%><<%typeString%>, <%arrayextentDims(name, v.numArrayElement)%>, true>(&_pointerTo<%type%>Vars[<%arrayHeadIdx%>]);
>>
else
let arrayIndices = SimCodeUtil.getVarIndexListByMapping(varToArrayIndexMapping,name,indexForUndefinedReferences) |> idx => '(<%idx%>)'; separator=""
Expand Down Expand Up @@ -8027,7 +8027,7 @@ template memberVariableDefine2(SimVar simVar, HashTableCrIListArray.HashTable va
else
if SimCodeUtil.isVarIndexListConsecutive(varToArrayIndexMapping,name) then
<<
StatRefArrayDim<%dims%><<%typeString%>, <%array_dimensions%>> <%arrayName%>;
StatArrayDim<%dims%><<%typeString%>, <%array_dimensions%>, true> <%arrayName%>;
>>
else
<<
Expand Down

0 comments on commit 832c3be

Please sign in to comment.