Skip to content

Commit a200f9c

Browse files
committed
Added a new command line option -iloop that can be used in conjunction with the -smc option to constrain the interfaces that are processed by interface loops to only those specified after the new -iloop option.
1 parent 1679f1c commit a200f9c

326 files changed

Lines changed: 662 additions & 594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CodeGen/CodeGen.dbl

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ proc
11361136
begin
11371137
Console.WriteLine("ERROR: SMC export file contains no structures.")
11381138
ok = false
1139-
exitCode = 1
1139+
;exitCode = 1
11401140
end
11411141
else
11421142
begin
@@ -1327,7 +1327,7 @@ proc
13271327
begin
13281328
if (taskSet.MethodCatalog == ^null) then
13291329
begin
1330-
Console.WriteLine("ERROR: The -interface may not be used without the -smc option!")
1330+
Console.WriteLine("ERROR: The -interface option may not be used without the -smc option!")
13311331
ok = false
13321332
exitCode = 1
13331333
end
@@ -1355,6 +1355,48 @@ proc
13551355
end
13561356
end
13571357

1358+
;;-------------------------------------------------------------------------
1359+
;;Are we being asked to constrain interface loops to a subset of interfaces?
1360+
1361+
if (ok && CommandLineParser.Parse("iloop",ClValues))
1362+
begin
1363+
if (taskSet.MethodCatalog == ^null) then
1364+
begin
1365+
Console.WriteLine("ERROR: The -iloop option may not be used without the -smc option!")
1366+
ok = false
1367+
exitCode = 1
1368+
end
1369+
else if (CommandLineParser.Parse("interface")) then
1370+
begin
1371+
Console.WriteLine("ERROR: The -iloop option may not be used with the -interface option!")
1372+
ok = false
1373+
exitCode = 1
1374+
end
1375+
else if (!ClValues.Count) then
1376+
begin
1377+
Console.WriteLine("ERROR: No interface name(s) specified after the -iloop option!")
1378+
ok = false
1379+
exitCode = 1
1380+
end
1381+
else
1382+
begin
1383+
data candidateInterface, string
1384+
foreach candidateInterface in ClValues
1385+
begin
1386+
if (taskSet.MethodCatalog.Interfaces.FirstOrDefault(lambda(iface) {iface.Name.Equals(ClValues[0])}) != ^null) then
1387+
begin
1388+
task.InterfaceLoopInterfaces.Add(candidateInterface)
1389+
end
1390+
else
1391+
begin
1392+
Console.WriteLine("ERROR: Interface {0} was not found in the method catalog export file!",ClValues[0])
1393+
ok = false
1394+
exitCode = 1
1395+
end
1396+
end
1397+
end
1398+
end
1399+
13581400
;;-------------------------------------------------------------------------
13591401
;;Do we have any button processing settings?
13601402

CodeGenEngine/CodeGenTask.dbl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ namespace CodeGen.Engine
216216
;;; </summary>
217217
public readwrite property Interface, String, String.Empty
218218

219+
;;; <summary>
220+
;;; The names of interfaces to be used in an interface loop instead of all interfaces.
221+
;;; </summary>
222+
public readwrite property InterfaceLoopInterfaces, @ObservableCollection<string>, new ObservableCollection<string>()
223+
219224
;;; <summary>
220225
;;; Multiple Structures. Specifies that the structures specified via the Structures
221226
;;; property should all be available to templates being processed at the same time.

CodeGenEngine/LoopExpander.dbl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,14 +1397,22 @@ namespace CodeGen.Engine
13971397
if (taskSet.MethodCatalog.Interfaces.Count == 0)
13981398
throw new ApplicationException(String.Format("The <{0}> loop at line {1} in template {2} can't be processed because the SMC data contains no interface definitions!", node.OpenToken.Value, node.OpenToken.StartLineNumber, context.CurrentTemplateBaseName))
13991399

1400-
loop.MaxIndex = taskSet.MethodCatalog.Interfaces.Count - 1
1400+
loop.MaxIndex = task.InterfaceLoopInterfaces.Count > 0 ? task.InterfaceLoopInterfaces.Count-1 : taskSet.MethodCatalog.Interfaces.Count - 1
14011401

14021402
context.CurrentTask.DebugLog(String.Format(" - {0,-30} -> {1} interfaces", string.Format("<{0}>", loop.OpenToken.Value), loop.MaxIndex + 1))
14031403

14041404
data ix, int
1405-
for ix from 0 thru taskSet.MethodCatalog.Interfaces.Count - 1
1405+
for ix from 0 thru loop.MaxIndex
14061406
begin
1407-
loop.CurrentInterface = taskSet.MethodCatalog.Interfaces[ix]
1407+
if (task.InterfaceLoopInterfaces.Count > 0) then
1408+
begin
1409+
loop.CurrentInterface = taskSet.MethodCatalog.Interfaces.FirstOrDefault(lambda(iface) {iface.Name.Equals(task.InterfaceLoopInterfaces[ix])})
1410+
end
1411+
else
1412+
begin
1413+
loop.CurrentInterface = taskSet.MethodCatalog.Interfaces[ix]
1414+
end
1415+
14081416
loop.CurrentIndex = ix
14091417

14101418
expander.Visit(node.Body)

Documentation/CodeGen.chm

-364 Bytes
Binary file not shown.

Documentation/CodeGen.hsm

3.63 KB
Binary file not shown.

docs/css/topics/style.css

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,36 +341,40 @@ a.hs9:hover {
341341
}
342342
.ps13 {
343343
padding-bottom: 0.2in;
344-
font-size: 11pt;
344+
padding-left: 73.36pt;
345345
}
346346
.ps14 {
347-
padding-bottom: 0.1in;
347+
padding-bottom: 0.2in;
348+
font-size: 11pt;
348349
}
349350
.ps15 {
351+
padding-bottom: 0.1in;
352+
}
353+
.ps16 {
350354
padding-top: 5pt;
351355
padding-bottom: 5pt;
352356
}
353-
.ps16 {
357+
.ps17 {
354358
padding-left: 36.6pt;
355359
}
356-
.ps17 {
360+
.ps18 {
357361
padding-left: 73.5pt;
358362
}
359-
.ps18 {
363+
.ps19 {
360364
padding-left: 110.25pt;
361365
}
362-
.ps19 {
366+
.ps20 {
363367
padding-left: 147pt;
364368
}
365-
.ps20 {
369+
.ps21 {
366370
padding-left: 0.5in;
367371
text-indent: -0.251968503937008in;
368372
font-size: 11pt;
369373
}
370-
.ps21 {
374+
.ps22 {
371375
font-size: 10pt;
372376
}
373-
.ps22 {
377+
.ps23 {
374378
font-size: 11pt;
375379
}
376380
.block0 {

docs/index.htm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<meta name="generator" content="HelpSmith 8.4 (Build 20.825)" />
1010
<link type="text/css" rel="stylesheet" href="css/index.css?e72569b7" />
11-
<link type="text/css" rel="stylesheet" href="css/indexu.css?4e990f33" />
11+
<link type="text/css" rel="stylesheet" href="css/indexu.css?fa37b6cd" />
1212
<script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
1313
<script type="text/javascript" src="js/core.min.js?e72569b7"></script>
14-
<script type="text/javascript" src="js/settings.js?4e990f33"></script>
14+
<script type="text/javascript" src="js/settings.js?fa37b6cd"></script>
1515
<script type="text/javascript" src="js/index.min.js?e72569b7"></script>
16-
<script type="text/javascript" src="js/topic-table.min.js?4e990f33" charset="UTF-8"></script>
16+
<script type="text/javascript" src="js/topic-table.min.js?fa37b6cd" charset="UTF-8"></script>
1717
<!-- Web Help IndexPage -->
1818

1919

docs/js/search-index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/navi.htm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
<link type="text/css" rel="stylesheet" href="css/ui/jquery-ui-1.9.2.custom.min.css" />
1010
<link type="text/css" rel="stylesheet" href="css/tree.css?e72569b7" />
1111
<link type="text/css" rel="stylesheet" href="css/navi.css?e72569b7" />
12-
<link type="text/css" rel="stylesheet" href="css/naviu.css?4e990f33" />
12+
<link type="text/css" rel="stylesheet" href="css/naviu.css?fa37b6cd" />
1313
<script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
1414
<script type="text/javascript" src="js/jquery-ui-1.9.2.custom.min.js"></script>
1515
<script type="text/javascript" src="js/jquery.cookie.js?e72569b7"></script>
1616
<script type="text/javascript" src="js/tree.min.js?e72569b7"></script>
17-
<script type="text/javascript" src="js/settings.js?4e990f33"></script>
17+
<script type="text/javascript" src="js/settings.js?fa37b6cd"></script>
1818
<script type="text/javascript" src="js/core.min.js?e72569b7"></script>
1919
<script type="text/javascript" src="js/search.min.js?e72569b7"></script>
2020
<script type="text/javascript" src="js/navi.min.js?e72569b7"></script>
21-
<script type="text/javascript" src="js/topic-table.min.js?4e990f33" charset="UTF-8"></script>
22-
<script type="text/javascript" src="js/search-index.min.js?4e990f33" charset="UTF-8"></script>
21+
<script type="text/javascript" src="js/topic-table.min.js?fa37b6cd" charset="UTF-8"></script>
22+
<script type="text/javascript" src="js/search-index.min.js?fa37b6cd" charset="UTF-8"></script>
2323
<!-- Web Help Layout -->
2424

2525

docs/topics/buttonloopexpansiontokens.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<link type="text/css" rel="stylesheet" href="../css/topics/style.css" />
3636
<script type="text/javascript" src="../js/jquery-3.5.1.min.js"></script>
3737
<script type="text/javascript" src="../js/nsa.js?e72569b7"></script>
38-
<script type="text/javascript" src="../js/settings.js?4e990f33"></script>
38+
<script type="text/javascript" src="../js/settings.js?fa37b6cd"></script>
3939
<script type="text/javascript" src="../js/core.min.js?e72569b7"></script>
4040
<script type="text/javascript" src="../js/topic.min.js?e72569b7"></script>
4141
<script type="text/javascript">

0 commit comments

Comments
 (0)