Skip to content

Commit 610adcd

Browse files
[axlstar] Utilise 'view()' au lieu de 'operator()' pour le retour des éléments simples d'occurence multiple.
L'opérateur 'operator()' est obsolète pour la classe 'CaseOptionMultiSimple'.
1 parent 289f0d9 commit 610adcd

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was generated by a tool.
4-
// Runtime Version:6.0.28
4+
// Runtime Version:6.0.35
55
//
66
// Changes to this file may cause incorrect behavior and will be lost if
77
// the code is regenerated.
@@ -23,8 +23,11 @@ public virtual string TransformText() {
2323
Action<OptionHandler, String, String> getterSection = (OptionHandler _xml, String beginLineSpace, String redirectionPrefix) => {
2424
foreach(var simple in _xml.Simple) {
2525
string return_type = simple.type.QualifiedName();
26-
if (simple.IsSingle == false) {
26+
string call_type = "()";
27+
// Use view() for array type because 'operator()' is deprecated for these types.
28+
if (!simple.IsSingle) {
2729
return_type = return_type.ToArrayType();
30+
call_type = ".view()";
2831
}
2932
this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace));
3033
this.Write(this.ToStringHelper.ToStringWithCulture( return_type ));
@@ -37,13 +40,14 @@ public virtual string TransformText() {
3740
this.Write(" return ");
3841
this.Write(this.ToStringHelper.ToStringWithCulture( redirectionPrefix ));
3942
this.Write(this.ToStringHelper.ToStringWithCulture( simple.Name.ToFuncName() ));
40-
this.Write("() ;\n");
43+
this.Write(this.ToStringHelper.ToStringWithCulture( call_type ));
44+
this.Write(";\n");
4145
this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace));
4246
this.Write("}\n");
4347
}
4448
foreach(var enumerator in _xml.Enumeration) {
4549
string return_type = enumerator.type;
46-
if (enumerator.IsSingle == true) {
50+
if (enumerator.IsSingle) {
4751
this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace));
4852
this.Write(this.ToStringHelper.ToStringWithCulture( return_type ));
4953
this.Write(" ");
@@ -64,7 +68,7 @@ public virtual string TransformText() {
6468
this.Write(this.ToStringHelper.ToStringWithCulture( return_type.ToArrayType() ));
6569
this.Write(" ");
6670
this.Write(this.ToStringHelper.ToStringWithCulture( enumerator.Name.ToFuncName() ));
67-
this.Write("() const\n");
71+
this.Write(" const\n");
6872
this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace));
6973
this.Write("{\n");
7074
this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace));
@@ -225,10 +229,11 @@ public virtual string TransformText() {
225229
this.Write(" = false;\n\t}\n");
226230
}
227231
};
228-
this.Write("/*---------------------------------------------------------------------------*/\n/" +
229-
"*---------------------------------------------------------------------------*/\n/" +
230-
"/ #WARNING#: This file has been generated automatically. Do not edit.\n// Arcane " +
231-
"version ");
232+
this.Write(@"/*---------------------------------------------------------------------------*/
233+
/*---------------------------------------------------------------------------*/
234+
// #WARNING#: This file has been generated automatically. Do not edit.
235+
// Generated from 'CaseOptionsT.tt' (version 2024.11.17)
236+
// Arcane version ");
232237
this.Write(this.ToStringHelper.ToStringWithCulture( Version ));
233238
this.Write(" : ");
234239
this.Write(this.ToStringHelper.ToStringWithCulture( DateTime.Now ));

axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.tt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,27 @@
77
<# Action<OptionHandler, String, String> getterSection = (OptionHandler _xml, String beginLineSpace, String redirectionPrefix) => { #>
88
<# foreach(var simple in _xml.Simple) {
99
string return_type = simple.type.QualifiedName();
10-
if (simple.IsSingle == false) {
10+
string call_type = "()";
11+
// Use view() for array type because 'operator()' is deprecated for these types.
12+
if (!simple.IsSingle) {
1113
return_type = return_type.ToArrayType();
14+
call_type = ".view()";
1215
}#>
1316
<#=beginLineSpace#><#= return_type #> <#= simple.Name.ToFuncName() #>() const
1417
<#=beginLineSpace#>{
15-
<#=beginLineSpace#> return <#= redirectionPrefix #><#= simple.Name.ToFuncName() #>() ;
18+
<#=beginLineSpace#> return <#= redirectionPrefix #><#= simple.Name.ToFuncName() #><#= call_type #>;
1619
<#=beginLineSpace#>}
1720
<# } #>
1821
<# foreach(var enumerator in _xml.Enumeration) {
1922
string return_type = enumerator.type;
20-
if (enumerator.IsSingle == true) { #>
23+
if (enumerator.IsSingle) { #>
2124
<#=beginLineSpace#><#= return_type #> <#= enumerator.Name.ToFuncName() #>() const
2225
<#=beginLineSpace#>{
2326
<#=beginLineSpace#> return <#= redirectionPrefix #><#= enumerator.Name.ToFuncName() #>();
2427
<#=beginLineSpace#>}
2528
<# }
2629
else{ #>
27-
<#=beginLineSpace#><#= return_type.ToArrayType() #> <#= enumerator.Name.ToFuncName() #>() const
30+
<#=beginLineSpace#><#= return_type.ToArrayType() #> <#= enumerator.Name.ToFuncName() #> const
2831
<#=beginLineSpace#>{
2932
<#=beginLineSpace#> return <#= redirectionPrefix #><#= enumerator.Name.ToFuncName() #>;
3033
<#=beginLineSpace#>}
@@ -88,6 +91,7 @@
8891
/*---------------------------------------------------------------------------*/
8992
/*---------------------------------------------------------------------------*/
9093
// #WARNING#: This file has been generated automatically. Do not edit.
94+
// Generated from 'CaseOptionsT.tt' (version 2024.11.17)
9195
// Arcane version <#= Version #> : <#= DateTime.Now #>
9296
/*---------------------------------------------------------------------------*/
9397
/*---------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)