diff --git a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.cs b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.cs index 23e88908b6..8f76813a0a 100644 --- a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.cs +++ b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:6.0.28 +// Runtime Version:6.0.35 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -23,8 +23,11 @@ public virtual string TransformText() { Action getterSection = (OptionHandler _xml, String beginLineSpace, String redirectionPrefix) => { foreach(var simple in _xml.Simple) { string return_type = simple.type.QualifiedName(); - if (simple.IsSingle == false) { + string call_type = "()"; + // Use view() for array type because 'operator()' is deprecated for these types. + if (!simple.IsSingle) { return_type = return_type.ToArrayType(); + call_type = ".view()"; } this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace)); this.Write(this.ToStringHelper.ToStringWithCulture( return_type )); @@ -37,13 +40,14 @@ public virtual string TransformText() { this.Write(" return "); this.Write(this.ToStringHelper.ToStringWithCulture( redirectionPrefix )); this.Write(this.ToStringHelper.ToStringWithCulture( simple.Name.ToFuncName() )); - this.Write("() ;\n"); + this.Write(this.ToStringHelper.ToStringWithCulture( call_type )); + this.Write(";\n"); this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace)); this.Write("}\n"); } foreach(var enumerator in _xml.Enumeration) { string return_type = enumerator.type; - if (enumerator.IsSingle == true) { + if (enumerator.IsSingle) { this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace)); this.Write(this.ToStringHelper.ToStringWithCulture( return_type )); this.Write(" "); @@ -64,7 +68,7 @@ public virtual string TransformText() { this.Write(this.ToStringHelper.ToStringWithCulture( return_type.ToArrayType() )); this.Write(" "); this.Write(this.ToStringHelper.ToStringWithCulture( enumerator.Name.ToFuncName() )); - this.Write("() const\n"); + this.Write(" const\n"); this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace)); this.Write("{\n"); this.Write(this.ToStringHelper.ToStringWithCulture(beginLineSpace)); @@ -225,10 +229,11 @@ public virtual string TransformText() { this.Write(" = false;\n\t}\n"); } }; - this.Write("/*---------------------------------------------------------------------------*/\n/" + - "*---------------------------------------------------------------------------*/\n/" + - "/ #WARNING#: This file has been generated automatically. Do not edit.\n// Arcane " + - "version "); + this.Write(@"/*---------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ +// #WARNING#: This file has been generated automatically. Do not edit. +// Generated from 'CaseOptionsT.tt' (version 2024.11.17) +// Arcane version "); this.Write(this.ToStringHelper.ToStringWithCulture( Version )); this.Write(" : "); this.Write(this.ToStringHelper.ToStringWithCulture( DateTime.Now )); diff --git a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.tt b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.tt index d0db3b0671..980a32b198 100644 --- a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.tt +++ b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/CaseOptionsT.tt @@ -7,24 +7,27 @@ <# Action getterSection = (OptionHandler _xml, String beginLineSpace, String redirectionPrefix) => { #> <# foreach(var simple in _xml.Simple) { string return_type = simple.type.QualifiedName(); - if (simple.IsSingle == false) { + string call_type = "()"; + // Use view() for array type because 'operator()' is deprecated for these types. + if (!simple.IsSingle) { return_type = return_type.ToArrayType(); + call_type = ".view()"; }#> <#=beginLineSpace#><#= return_type #> <#= simple.Name.ToFuncName() #>() const <#=beginLineSpace#>{ -<#=beginLineSpace#> return <#= redirectionPrefix #><#= simple.Name.ToFuncName() #>() ; +<#=beginLineSpace#> return <#= redirectionPrefix #><#= simple.Name.ToFuncName() #><#= call_type #>; <#=beginLineSpace#>} <# } #> <# foreach(var enumerator in _xml.Enumeration) { string return_type = enumerator.type; - if (enumerator.IsSingle == true) { #> + if (enumerator.IsSingle) { #> <#=beginLineSpace#><#= return_type #> <#= enumerator.Name.ToFuncName() #>() const <#=beginLineSpace#>{ <#=beginLineSpace#> return <#= redirectionPrefix #><#= enumerator.Name.ToFuncName() #>(); <#=beginLineSpace#>} <# } else{ #> -<#=beginLineSpace#><#= return_type.ToArrayType() #> <#= enumerator.Name.ToFuncName() #>() const +<#=beginLineSpace#><#= return_type.ToArrayType() #> <#= enumerator.Name.ToFuncName() #> const <#=beginLineSpace#>{ <#=beginLineSpace#> return <#= redirectionPrefix #><#= enumerator.Name.ToFuncName() #>; <#=beginLineSpace#>} @@ -88,6 +91,7 @@ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ // #WARNING#: This file has been generated automatically. Do not edit. +// Generated from 'CaseOptionsT.tt' (version 2024.11.17) // Arcane version <#= Version #> : <#= DateTime.Now #> /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ diff --git a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.cs b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.cs index 4ab0dd199e..4b544b599a 100644 --- a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.cs +++ b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:6.0.28 +// Runtime Version:6.0.32 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -178,7 +178,7 @@ public virtual string TransformText() { this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.ToFuncName() )); this.Write("_, Args...>(m_"); this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.DashToUnderscore() )); - this.Write(", std::move(args)...);\n"); + this.Write(", std::forward(args)...);\n"); } else { if(problemStdArray) { @@ -188,7 +188,8 @@ public virtual string TransformText() { this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.ToFuncName() )); this.Write("_, Args...>(m_"); this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.DashToUnderscore() )); - this.Write(", std::move(args)...);\n // todo replace by static assert\t\n if(!exist_"); + this.Write(", std::forward(args)...);\n // todo replace by static assert\t\n if(!exi" + + "st_"); this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.DashToUnderscore() )); this.Write(")\n throw "); this.Write(this.ToStringHelper.ToStringWithCulture(SimpleTypeExtensions.Namespace())); @@ -201,7 +202,7 @@ public virtual string TransformText() { this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.DashToUnderscore() )); this.Write(" = OptionTools::requiredFixedArray<"); this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.ToFuncName() )); - this.Write("_, 1, Args...>(std::move(args)...)[0];\n"); + this.Write("_, 1, Args...>(std::forward(args)...)[0];\n"); } } } @@ -215,7 +216,7 @@ public virtual string TransformText() { this.Write(this.ToStringHelper.ToStringWithCulture( _option.Name.ToFuncName() )); this.Write("_, "); this.Write(this.ToStringHelper.ToStringWithCulture( _option.MinOccurs )); - this.Write(", -1, Args...>(std::move(args)...);\n"); + this.Write(", -1, Args...>(std::forward(args)...);\n"); } this.Write("\n"); }; diff --git a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.tt b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.tt index 9b65c633c6..34b6650f9b 100644 --- a/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.tt +++ b/axlstar/Arcane.Axl.T4/Arcane.Axl/T4.StrongOptions/StrongOptions_h.tt @@ -49,17 +49,17 @@ <# if (_option.IsSingle == true) { #> <# if (hasDefault) { #> m_<#= _option.Name.DashToUnderscore() #> = <#= _option_default #>; - OptionTools::optionalSimple<<#= _option.Name.ToFuncName() #>_, Args...>(m_<#= _option.Name.DashToUnderscore() #>, std::move(args)...); + OptionTools::optionalSimple<<#= _option.Name.ToFuncName() #>_, Args...>(m_<#= _option.Name.DashToUnderscore() #>, std::forward(args)...); <# } else { if(problemStdArray) { #> - static bool exist_<#= _option.Name.DashToUnderscore() #> = OptionTools::optionalSimple<<#= _option.Name.ToFuncName() #>_, Args...>(m_<#= _option.Name.DashToUnderscore() #>, std::move(args)...); + static bool exist_<#= _option.Name.DashToUnderscore() #> = OptionTools::optionalSimple<<#= _option.Name.ToFuncName() #>_, Args...>(m_<#= _option.Name.DashToUnderscore() #>, std::forward(args)...); // todo replace by static assert if(!exist_<#= _option.Name.DashToUnderscore() #>) throw <#=SimpleTypeExtensions.Namespace()#>::FatalErrorException(A_FUNCINFO, "missing required option <#= _option.Name.ToFuncName() #>"); <# } else { #> - m_<#= _option.Name.DashToUnderscore() #> = OptionTools::requiredFixedArray<<#= _option.Name.ToFuncName() #>_, 1, Args...>(std::move(args)...)[0]; + m_<#= _option.Name.DashToUnderscore() #> = OptionTools::requiredFixedArray<<#= _option.Name.ToFuncName() #>_, 1, Args...>(std::forward(args)...)[0]; <# } } } #> @@ -67,7 +67,7 @@ <# if (hasDefault) { #> //#warning "Default for multi options not used" <# } #> - m_<#= _option.Name.DashToUnderscore() #> = OptionTools::requiredVariableArray<<#= _option.Name.ToFuncName() #>_, <#= _option.MinOccurs #>, -1, Args...>(std::move(args)...); + m_<#= _option.Name.DashToUnderscore() #> = OptionTools::requiredVariableArray<<#= _option.Name.ToFuncName() #>_, <#= _option.MinOccurs #>, -1, Args...>(std::forward(args)...); <# } #> <# }; #>