__objModInline()
Modify (replace) an INLINE method in an already existing class
- Syntax
-
- __objModInline( <oObject>, <cInlineName>, <bInline> ) --> oObject
- Arguments
-
- <oObject> is the object to work on.
- <cInlineName> is the symbol name of the INLINE method to modify.
- <bInline> is a new code block to associate with the INLINE method.
- Returns
-
- __objModInline() return a reference to <oObject>.
- Description
-
- __objModInline() is a low level class support function that modify an INLINE method in an object and replace it with a new code block. <oObject> is unchanged if a symbol with the name <cInlineName> does not exist in <oObject>. __objModInline() is used in inheritance mechanism.
Examples
// create a new THappy class and add a Smile INLINE method
oHappy := HBClass():New( "THappy" )
bMyInline := { | nType | { ":)", ";)" }[ nType ] }
bYourInline := { | nType | { "*SMILE*", "*WINK*" }[ nType ] }
__objAddInline( oHappy, "Smile", bMyInline )
? oHappy:Smile( 1 ) // :)
? oHappy:Smile( 2 ) // ;)
// replace Smile inline method with a new code block
__objModInline( oHappy, "Smile", bYourInline )
? oHappy:Smile( 1 ) // *SMILE*
? oHappy:Smile( 2 ) // *WINK*
- Status
- Ready
- Compliance
-
- __objModInline() is a Harbour extension.
- Files
-
- Library is rtl
- See Also