当前位置:网站首页>Method keywords deprecated, externalprocname, final, forcegenerate

Method keywords deprecated, externalprocname, final, forcegenerate

2022-07-06 19:48:00 User 7741497

Chapter 61 Method keyword - Deprecated

Specify that this method is not recommended . This keyword is ignored by the class compiler , It just provides a human readable indicator , Indicates that the method has been deprecated .

usage

To specify that this method is not recommended , Please use the following syntax :

Method name(formal_spec) As returnclass [ Deprecated ]  
{    //implementation }

otherwise , Omit this keyword or put the word Not Put in front of the keyword .

Chapter 62 Method keyword - ExternalProcName

When this method is used as a stored procedure in an external database , Specify its name . Applicable only if the method is projected as a stored procedure .

To override the default name of a method when it is used as a stored procedure in an external database , Please use the following syntax :

ClassMethod name(formal_spec) As returnclass [ SqlProc, ExternalProcName = MyProcedure ] 
{    //implementation }

among MyProcedure Is a string without quotation marks .

Detailed explanation

When this method is used as a stored procedure in an external database , This keyword allows you to define the name of this method .

Default

If you omit this keyword , The method name will be used as the stored procedure name

Chapter 63 Method keyword - Final

Specify whether this method is the final method ( Cannot override in subclasses ).

usage

To specify that the method is final , Please use the following syntax :

Method name(formal_spec) As returnclass [ Final ] 
{    //implementation }

otherwise , Omit this keyword or put the word Not Put in front of the keyword .

Detailed explanation

Marked as final Class members of cannot be overridden in subclasses .

Default

If you omit this keyword , Then this method is not final .

Chapter 64 Method keyword - ForceGenerate

Specify whether the method should be compiled in each subclass . Applicable only if the method is a method generator .

usage

To specify that methods should be compiled in each subclass ( Method generator ), Please use the following syntax :

Method name(formal_spec) As returnclass [ CodeMode = ObjectGenerator, ForceGenerate ] 
{    //implementation }

otherwise , Omit this keyword or put the word Not Put in front of the keyword .

Detailed explanation

In the case of a method generator method , Specify that the method should be compiled in each subclass . When you need to ensure that each subclass has its own method version , This keyword is very useful . If the generated code looks the same as the code generated by the superclass , IRIS Methods in subclasses will not be recompiled . This logic does not consider whether the included files of the two classes are the same . If the method uses macros defined in the include file , And if subclasses use different include files , IRIS The method will not be recompiled in subclasses . under these circumstances , Please specify ForceGenerate.

Default

If you omit this keyword , The method will not be compiled in each subclass .

原网站

版权声明
本文为[User 7741497]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207061146429678.html