Harbour Reference Guide

 

__objAddInline()

Add an INLINE to an already existing class

Syntax

__objAddInline( <oObject>, <cInlineName>, <bInline> ) --> oObject

Arguments

<oObject> is the object to work on.

<cInlineName> is the symbol name of the new INLINE to add.

<bInline> is a code block to associate with the INLINE method.

Returns

__objAddInline() return a reference to <oObject>.

Description

__objAddInline() is a low level class support function that add a new INLINE method to an object. <oObject> is unchanged if a symbol with the name <cInlineName> already exist in <oObject>.
Examples
      // create a new THappy class and add a Smile INLINE method
      oHappy  := TClass():New( "THappy" )
      bInline := { | nType | { ":)", ";)", "*SMILE*" }[ nType ] }
      __objAddInline( oHappy, "Smile", bInline )
      ? oHappy:Smile( 1 )       // :)
      ? oHappy:Smile( 2 )       // ;)
      ? oHappy:Smile( 3 )       // *SMILE*
Status

Ready

Compliance

__objAddInline() is a Harbour extension.

Files

Library is rtl

See Also

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/06/26