~ubuntu-branches/debian/sid/simpleitk/sid

« back to all changes in this revision

Viewing changes to ExpandTemplateGenerator/Components/InputParameters.in

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant
  • Date: 2017-11-02 08:49:18 UTC
  • Revision ID: package-import@ubuntu.com-20171102084918-7hs09ih668xq87ej
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
$(if inputs then
 
2
local count=1
 
3
for i = 1,#inputs do
 
4
  if  not (inputs[i].optional and no_optional) then
 
5
    if (number_of_inputs > 0 or count > 1) then
 
6
      OUT = OUT .. ", "
 
7
    end
 
8
    count = count + 1
 
9
    if not inputs[i].type and inputs[i].enum then
 
10
      OUT = OUT .. name .. '::' .. inputs[i].name .. 'Type'
 
11
    elseif inputs[i].dim_vec and (inputs[i].dim_vec == 1) then
 
12
      OUT = OUT..'const std::vector<'..inputs[i].type..'> &'
 
13
    elseif inputs[i].point_vec and (inputs[i].point_vec == 1) then
 
14
      OUT = OUT..'const std::vector< std::vector<'..inputs[i].type..'> > &'
 
15
    else
 
16
      OUT = OUT .. 'const ' .. inputs[i].type .. ' &'
 
17
    end
 
18
    OUT = OUT .. ' ' .. inputs[i].name:sub(1,1):lower() .. inputs[i].name:sub(2,-1)
 
19
  end
 
20
end
 
21
end)