Files
harbour-core/harbour/doc/en/objfunc.txt
Viktor Szakats 3de4f48f71 2009-03-25 16:19 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* bin/hb-func.sh
  * bin/hb-mkdyn.bat
  * bin/hb-mkdyn.sh
  * bin/postinst.bat
  * bin/postinst.cmd
  * bin/postinst.sh
  * contrib/examples/hbdoc/examples/core_es/array.txt
  * contrib/examples/hbdoc/examples/core_es/binnum.txt
  * contrib/examples/hbdoc/examples/core_es/browse.txt
  * contrib/examples/hbdoc/examples/core_es/clipper.txt
  * contrib/examples/hbdoc/examples/core_es/cmdline.txt
  * contrib/examples/hbdoc/examples/core_es/codebloc.txt
  * contrib/examples/hbdoc/examples/core_es/command.txt
  * contrib/examples/hbdoc/examples/core_es/compiler.txt
  * contrib/examples/hbdoc/examples/core_es/datetime.txt
  * contrib/examples/hbdoc/examples/core_es/dbdelim.txt
  * contrib/examples/hbdoc/examples/core_es/dbsdf.txt
  * contrib/examples/hbdoc/examples/core_es/dbstrux.txt
  * contrib/examples/hbdoc/examples/core_es/dir.txt
  * contrib/examples/hbdoc/examples/core_es/dirstruc.txt
  * contrib/examples/hbdoc/examples/core_es/diskspac.txt
  * contrib/examples/hbdoc/examples/core_es/error.txt
  * contrib/examples/hbdoc/examples/core_es/eval.txt
  * contrib/examples/hbdoc/examples/core_es/file.txt
  * contrib/examples/hbdoc/examples/core_es/garbage.txt
  * contrib/examples/hbdoc/examples/core_es/harbext.txt
  * contrib/examples/hbdoc/examples/core_es/hb_apiln.txt
  * contrib/examples/hbdoc/examples/core_es/hb_set.txt
  * contrib/examples/hbdoc/examples/core_es/hb_vm.txt
  * contrib/examples/hbdoc/examples/core_es/howtobsd.txt
  * contrib/examples/hbdoc/examples/core_es/hvm.txt
  * contrib/examples/hbdoc/examples/core_es/idle.txt
  * contrib/examples/hbdoc/examples/core_es/input.txt
  * contrib/examples/hbdoc/examples/core_es/lang.txt
  * contrib/examples/hbdoc/examples/core_es/license.txt
  * contrib/examples/hbdoc/examples/core_es/macro.txt
  * contrib/examples/hbdoc/examples/core_es/math.txt
  * contrib/examples/hbdoc/examples/core_es/memo.txt
  * contrib/examples/hbdoc/examples/core_es/memvar2.txt
  * contrib/examples/hbdoc/examples/core_es/misc.txt
  * contrib/examples/hbdoc/examples/core_es/nation.txt
  * contrib/examples/hbdoc/examples/core_es/objfunc.txt
  * contrib/examples/hbdoc/examples/core_es/pcode.txt
  * contrib/examples/hbdoc/examples/core_es/pragma.txt
  * contrib/examples/hbdoc/examples/core_es/rdd.txt
  * contrib/examples/hbdoc/examples/core_es/readme.txt
  * contrib/examples/hbdoc/examples/core_es/sayget.txt
  * contrib/examples/hbdoc/examples/core_es/setmode.txt
  * contrib/examples/hbdoc/examples/core_es/statics.txt
  * contrib/examples/hbdoc/examples/core_es/strotype.txt
  * contrib/examples/hbdoc/examples/core_es/subcodes.txt
  * contrib/examples/hbdoc/examples/core_es/tbrowse.txt
  * contrib/examples/hbdoc/examples/core_es/tclass.txt
  * contrib/examples/hbdoc/examples/core_es/tgetlist.txt
  * contrib/examples/hbdoc/examples/core_es/tlabel.txt
  * contrib/examples/hbdoc/examples/core_es/tracing.txt
  * contrib/examples/hbdoc/examples/core_es/treport.txt
  * contrib/examples/hbdoc/examples/core_es/var.txt
  * contrib/examples/hbdoc/examples/core_es/vm.txt
  * contrib/examples/pp/hbppcore.c
  * contrib/gtwvg/gtwvg.c
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgcuig.c
  * contrib/gtwvg/wvggui.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgwin.c
  * contrib/hbct/datetime.c
  * contrib/hbct/pack.c
  * contrib/hbct/video.c
  * contrib/hbfbird/firebird.c
  * contrib/hbfbird/tfirebrd.prg
  * contrib/hbfimage/readme.txt
  * contrib/hbgd/doc/hbgd.txt
  * contrib/hbmisc/dates2.c
  * contrib/hbmisc/doc/en/dates2.txt
  * contrib/hbmisc/doc/en/ht_class.txt
  * contrib/hbmisc/doc/en/ht_conv.txt
  * contrib/hbmisc/doc/en/ht_dbf.txt
  * contrib/hbmisc/doc/en/ht_doc.txt
  * contrib/hbmisc/doc/en/ht_str.txt
  * contrib/hbmysql/mysql.c
  * contrib/hbnf/fttext.c
  * contrib/hbodbc/odbc.c
  * contrib/hbpgsql/postgres.c
  * contrib/hbpgsql/tpostgre.prg
  * contrib/hbsqlit3/hbsqlit3.c
  * contrib/hbsqlit3/hbsqlit3.ch
  * contrib/hbsqlit3/tests/blob.prg
  * contrib/hbsqlit3/tests/metadata.prg
  * contrib/hbsqlit3/tests/pack.prg
  * contrib/hbsqlit3/tests/sqlite3_test.prg
  * contrib/hbtip/utils.c
  * contrib/hbwin/win_prn1.c
  * contrib/hbwin/win_tprn.prg
  * contrib/rddads/doc/en/adsfuncs.txt
  * doc/class_tp.txt
  * doc/en/array.txt
  * doc/en/binnum.txt
  * doc/en/browse.txt
  * doc/en/command.txt
  * doc/en/datetime.txt
  * doc/en/dbdelim.txt
  * doc/en/dbsdf.txt
  * doc/en/dbstrux.txt
  * doc/en/dir.txt
  * doc/en/diskspac.txt
  * doc/en/error.txt
  * doc/en/eval.txt
  * doc/en/file.txt
  * doc/en/hb_api.txt
  * doc/en/hb_apier.txt
  * doc/en/hb_apifs.txt
  * doc/en/hb_apigt.txt
  * doc/en/hb_apiit.txt
  * doc/en/hb_apiln.txt
  * doc/en/hb_apird.txt
  * doc/en/hb_compa.txt
  * doc/en/hb_date.txt
  * doc/en/hb_macro.txt
  * doc/en/hb_set.txt
  * doc/en/hb_vm.txt
  * doc/en/hvm.txt
  * doc/en/input.txt
  * doc/en/lang.txt
  * doc/en/math.txt
  * doc/en/memo.txt
  * doc/en/menu.txt
  * doc/en/misc.txt
  * doc/en/nation.txt
  * doc/en/objfunc.txt
  * doc/en/rdd.txt
  * doc/en/rdddb.txt
  * doc/en/rddmisc.txt
  * doc/en/rddord.txt
  * doc/en/set.txt
  * doc/en/setmode.txt
  * doc/en/string.txt
  * doc/en/tclass.txt
  * doc/en/terminal.txt
  * doc/en/tgetlist.txt
  * doc/en/tlabel.txt
  * doc/en/treport.txt
  * doc/en/var.txt
  * doc/hdr_tpl.txt
  * harbour-wce-spec
  * harbour-win-spec
  * harbour.spec
  * include/hbapigt.h
  * include/hbclass.ch
  * include/hboo.ch
  * make_gnu.bat
  * make_gnu.sh
  * mpkg_deb.sh
  * mpkg_rpm.sh
  * mpkg_rpm_from_svn.sh
  * mpkg_rpm_wce.sh
  * mpkg_rpm_win.sh
  * mpkg_tgz.sh
  * mpkg_win.bat
  * mpkg_win.nsi
  * source/common/hbdate.c
  * source/common/hbstr.c
  * source/common/hbver.c
  * source/compiler/cmdcheck.c
  * source/compiler/hbmain.c
  * source/debug/dbgtwin.prg
  * source/debug/debugger.prg
  * source/lang/msgpt.c
  * source/lang/msgptiso.c
  * source/rtl/accept.c
  * source/rtl/alert.prg
  * source/rtl/console.c
  * source/rtl/dates.c
  * source/rtl/dateshb.c
  * source/rtl/errorapi.c
  * source/rtl/filesys.c
  * source/rtl/gete.c
  * source/rtl/getsys.prg
  * source/rtl/getsys53.prg
  * source/rtl/gtapi.c
  * source/rtl/gtcrs/hb-charmap.def
  * source/rtl/gtdos/gtdos.c
  * source/rtl/gtos2/gtos2.c
  * source/rtl/gtwin/gtwin.c
  * source/rtl/gtwvt/gtwvt.c
  * source/rtl/gx.c
  * source/rtl/idle.c
  * source/rtl/inkey.c
  * source/rtl/mouseapi.c
  * source/rtl/natmsg.c
  * source/rtl/natmsgu.c
  * source/rtl/net.c
  * source/rtl/objfunc.prg
  * source/rtl/round.c
  * source/rtl/setpos.c
  * source/rtl/tclass.prg
  * source/rtl/tgetlist.prg
  * source/rtl/tobject.prg
  * source/rtl/transfrm.c
  * source/rtl/valtype.c
  * source/rtl/xsavescr.c
  * source/vm/arrays.c
  * source/vm/classes.c
  * source/vm/eval.c
  * source/vm/extend.c
  * source/vm/extrap.c
  * source/vm/fm.c
  * source/vm/hvm.c
  * source/vm/itemapi.c
  * source/vm/memvars.c
  * source/vm/proc.c
  * tests/bnchmark/bnch_win.bat
  * tests/langmsg.prg
  * tests/rto_tb.prg
  * utils/hbmk2/hbmk2.prg
  * utils/hbtest/make_c5x.bat
    * Changed reference:
      doc/license.txt -> COPYING.
      One step to allow the reorganization of doc dir.
2009-03-25 15:34:09 +00:00

757 lines
24 KiB
Plaintext

/*
* $Id$
*/
/*
* The following parts are Copyright of the individual authors.
* www - http://www.harbour-project.org
*
* Copyright 1999-2000 Chen Kedem <niki@actcom.co.il>
* Documentation for: __objHasData(), __objHasMethod(), __objGetMsgList(),
* __objGetMethodList(), __objGetValueList(),
* __ObjSetValueList(), __objAddMethod(),
* __objAddInline(), __objAddData(), __objModMethod(),
* __objModInline(), __objDelMethod(), __objDelInline(),
* __objDelData(), __objDerivedFrom()
*
* See COPYING for licensing terms.
*
*/
/* $DOC$
* $FUNCNAME$
* __objHasData()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Determine whether a symbol exist in object as DATA
* $SYNTAX$
* __objHasData( <oObject>, <cSymbol> ) --> lExist
* $ARGUMENTS$
* <oObject> is an object to scan.
*
* <cSymbol> is the name of the symbol to look for.
* $RETURNS$
* __objHasData() return .T. if the given <cSymbol> exist as DATA
* (instance variable) in object <oObject), .F. if it does not exist.
* $DESCRIPTION$
* __objHasData() is a low level class support function that let you
* find out if a symbol is an instance variable in a given object.
* $EXAMPLES$
* oB := TBrowseNew( 0, 0, 24, 79 )
* ? __objHasData( oB, "nLeft" ) // this should return .T.
* ? __objHasData( oB, "lBugFree" ) // hopefully this should be .F.
* ? __objHasData( oB, "Left" ) // .F. since this is a METHOD
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objHasData() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __ObjGetMethodList(),__objGetMsgList(),__objHasMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objHasMethod()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Determine whether a symbol exist in object as METHOD
* $SYNTAX$
* __objHasMethod( <oObject>, <cSymbol> ) --> lExist
* $ARGUMENTS$
* <oObject> is an object to scan.
*
* <cSymbol> is the name of the symbol to look for.
* $RETURNS$
* __objHasMethod() return .T. if the given <cSymbol> exist as METHOD
* (class function) in object <oObject), .F. if it does not exist.
* $DESCRIPTION$
* __objHasMethod() is a low level class support function that let you
* find out if a symbol is a class function in a given object.
* $EXAMPLES$
* oB := TBrowseNew( 0, 0, 24, 79 )
* ? __objHasMethod( oB, "nLeft" ) // .F. since this is a DATA
* ? __objHasMethod( oB, "FixBugs" ) // hopefully this should be .F.
* ? __objHasMethod( oB, "Left" ) // this should return .T.
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objHasMethod() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __ObjGetMethodList(),__objGetMsgList(),__objHasData()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objGetMsgList()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Return names of all DATA or METHOD for a given object
* $SYNTAX$
* __objGetMsgList( <oObject>, [<lData>], [nClassType] ) --> aNames
* $ARGUMENTS$
* <oObject> is an object to scan.
*
* <lData> is an optional logical value that specifies the information
* to return. A value of .T. instruct the function to return list of
* all DATA names, .F. return list of all METHOD names. Default value
* is .T.
*
* <nClassType> is on optional numeric code for selecting which class
* type to return. Default value is HB_MSGLISTALL, returning the whole
* list.
* $RETURNS$
* __objGetMsgList() return an array of character stings with all DATA
* names or all METHOD names for a given object. __objGetMsgList()
* would return an empty array {} if the given object does not contain
* the requested information.
* $DESCRIPTION$
* __objGetMsgList() is a low level class support function that let you
* find all instance variable or method names for a given object.
*
* If specified, the following table shoes the values for <nClassType>
* that allow you to distinguish between DATA and CLASSDATA:
*
* <table>
* hboo.ch Value Meaning
*
* HB_MSGLISTALL 0 All types
* HB_MSGLISTCLASS 1 CLASSDATA only
* HB_MSGLISTPURE 2 DATA only
* </table>
*
* DATA are instance variable usable within each object from a class,
* where each object has its own DATAs.
*
* CLASSDATA are shared by all objects from a Class, so the changed
* value within Object1 will be reflected when accessing the CLASSDATA
* from Object2.
* $EXAMPLES$
* // show information about TBrowse class
* oB := TBrowseNew( 0, 0, 24, 79 )
* aData := __objGetMsgList( oB, .T. )
* aClassData := __objGetMsgList( oB, .T., HB_MSGLISTCLASS )
* aMethod := __objGetMsgList( oB, .F. )
* FOR i = 1 to len ( aData )
* ? "DATA name:", aData[ i ]
* NEXT
* FOR i = 1 to len ( aClassData )
* ? "CLASSDATA name:", aClassData[ i ]
* NEXT
* FOR i = 1 to len ( aMethod )
* ? "METHOD name:", aMethod[ i ]
* NEXT
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objGetMsgList() is a Harbour extension.
* $FILES$
* Header file is hboo.ch
* Library is rtl
* $SEEALSO$
* __ObjGetMethodList(),__ObjGetValueList(),__objHasData(),__objHasMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objGetMethodList()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Return names of all METHOD for a given object
* $SYNTAX$
* __objGetMethodList( <oObject> ) --> aMethodNames
* $ARGUMENTS$
* <oObject> is an object to scan.
* $RETURNS$
* __objGetMethodList() return an array of character stings with all
* METHOD names for a given object. __objGetMethodList() would return
* an empty array {} if the given object does not contain any METHOD.
* $DESCRIPTION$
* __objGetMethodList() is a low level class support function that let
* you find all class functions names for a given object.
* It is equivalent to __objGetMsgList( oObject, .F. ).
* $EXAMPLES$
* // show information about TBrowse class
* oB := TBrowseNew( 0, 0, 24, 79 )
* aMethod := __objGetMethodList( oB )
* FOR i = 1 to len ( aMethod )
* ? "METHOD name:", aMethod[ i ]
* NEXT
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objGetMethodList() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objGetMsgList(),__ObjGetValueList(),__objHasData(),__objHasMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objGetValueList()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Return an array of DATA names and values for a given object
* $SYNTAX$
* __objGetValueList( <oObject>, [<aExcept>] ) --> aData
* $ARGUMENTS$
* <oObject> is an object to scan.
*
* <aExcept> is an optional array with DATA names you want to exclude
* from the scan.
* $RETURNS$
* __objGetValueList() return a 2D array that contain pairs of a DATA
* symbol name and the value of DATA. __objGetValueList() would return
* an empty array {} if the given object does not contain the requested
* information.
* $DESCRIPTION$
* __objGetValueList() is a low level class support function that
* return an array with DATA names and value, each array element is a
* pair of: aData[ i, HB_OO_DATA_SYMBOL ] contain the symbol name
* aData[ i, HB_OO_DATA_VALUE ] contain the value of DATA
* $EXAMPLES$
* // show information about TBrowse class
* oB := TBrowseNew( 0, 0, 24, 79 )
* aData := __objGetValueList( oB )
* FOR i = 1 to len ( aData )
* ? "DATA name:", aData[ i, HB_OO_DATA_SYMBOL ], ;
* " value=", aData[ i, HB_OO_DATA_VALUE ]
* NEXT
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objGetValueList() is a Harbour extension.
* $FILES$
* Header file is hboo.ch
* Library is rtl
* $SEEALSO$
* __objGetMethodList(),__objGetMsgList(),__objHasData(),__objHasMethod(),__ObjSetValueList()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __ObjSetValueList()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Set object with an array of DATA names and values
* $SYNTAX$
* __ObjSetValueList( <oObject>, <aData> ) --> oObject
* $ARGUMENTS$
* <oObject> is an object to set.
*
* <aData> is a 2D array with a pair of instance variables and values
* for setting those variable.
* $RETURNS$
* __ObjSetValueList() return a reference to <oObject>.
* $DESCRIPTION$
* __ObjSetValueList() is a low level class support function that let
* you set a group of instance variables with values. each array
* element in <aData> is a pair of:
* aData[ i, HB_OO_DATA_SYMBOL ] which contain the variable name to set
* aData[ i, HB_OO_DATA_VALUE ] contain the new variable value.
* $EXAMPLES$
* // set some TBrowse instance variable
* oB := TBrowse():New()
* aData := array( 4, 2 )
* aData[ 1, HB_OO_DATA_SYMBOL ] = "nTop"
* aData[ 1, HB_OO_DATA_VALUE ] = 1
* aData[ 2, HB_OO_DATA_SYMBOL ] = "nLeft"
* aData[ 2, HB_OO_DATA_VALUE ] = 10
* aData[ 3, HB_OO_DATA_SYMBOL ] = "nBottom"
* aData[ 3, HB_OO_DATA_VALUE ] = 20
* aData[ 4, HB_OO_DATA_SYMBOL ] = "nRight"
* aData[ 4, HB_OO_DATA_VALUE ] = 70
* __ObjSetValueList( oB, aData )
* ? oB:nTop // 1
* ? oB:nLeft // 10
* ? oB:nBottom // 20
* ? oB:nRight // 70
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __ObjSetValueList() is a Harbour extension.
* $FILES$
* Header file is hboo.ch
* Library is rtl
* $SEEALSO$
* __ObjGetValueList()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objAddMethod()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Add a METHOD to an already existing class
* $SYNTAX$
* __objAddMethod( <oObject>, <cMethodName>, <nFuncPtr> ) --> oObject
* $ARGUMENTS$
* <oObject> is the object to work on.
*
* <cMethodName> is the symbol name of the new METHOD to add.
*
* <nFuncPtr> is a pointer to a function to associate with the method.
* $RETURNS$
* __objAddMethod() return a reference to <oObject>.
* $DESCRIPTION$
* __objAddMethod() is a low level class support function that add a
* new METHOD to an object. <oObject> is unchanged if a symbol with the
* name <cMethodName> already exist in <oObject>.
*
* Note that <nFuncPtr> is a special pointer to a function that was
* created using the @ operator, see example below.
* $EXAMPLES$
* // create a new THappy class and add a Smile method
* oHappy := HBClass():New( "THappy" )
* __objAddMethod( oHappy, "Smile", @MySmile() )
* ? oHappy:Smile( 1 ) // :)
* ? oHappy:Smile( 2 ) // ;)
* ? oHappy:Smile( 3 ) // *SMILE*
*
* STATIC FUNCTION MySmile( nType )
* LOCAL cSmile
* DO CASE
* CASE nType == 1
* cSmile := ":)"
* CASE nType == 2
* cSmile := ";)"
* CASE nType == 3
* cSmile := "*SMILE*"
* ENDCASE
* RETURN cSmile
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objAddMethod() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddInline(),__objAddData(),__objDelMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod(),__objModMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objAddInline()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* 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 := HBClass():New( "THappy" )
* bInline := { | nType | { ":)", ";)", "*SMILE*" }[ nType ] }
* __objAddInline( oHappy, "Smile", bInline )
* ? oHappy:Smile( 1 ) // :)
* ? oHappy:Smile( 2 ) // ;)
* ? oHappy:Smile( 3 ) // *SMILE*
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objAddInline() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddData(),__objAddMethod(),__objDelInline(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod() ,__objModInline()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objAddData()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Add a DATA to an already existing class
* $SYNTAX$
* __objAddData( <oObject>, <cDataName> ) --> oObject
* $ARGUMENTS$
* <oObject> is the object to work on.
*
* <cDataName> is the symbol name of the new DATA to add.
* $RETURNS$
* __objAddData() return a reference to <oObject>.
* $DESCRIPTION$
* __objAddData() is a low level class support function that add a new
* DATA to an object. <oObject> is unchanged if a symbol with the name
* <cDataName> already exist in <oObject>.
* $EXAMPLES$
* // create a new THappy class and add a lHappy DATA
* oHappy := HBClass():New( "THappy" )
* __objAddData( oHappy, "lHappy" )
* oHappy:lHappy := .T.
* IF oHappy:lHappy
* ? "Happy, Happy, Joy, Joy !!!"
* ELSE
* ? ":(..."
* ENDIF
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objAddData() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddInline(),__objAddMethod(),__objDelData(),__objGetMsgList(),__ObjGetValueList(),__objHasData(),__ObjSetValueList()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objModMethod()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Modify (replace) a METHOD in an already existing class
* $SYNTAX$
* __objModMethod( <oObject>, <cMethodName>, <nFuncPtr> ) --> oObject
* $ARGUMENTS$
* <oObject> is the object to work on.
*
* <cMethodName> is the symbol name of the METHOD to modify.
*
* <nFuncPtr> is a pointer to a new function to associate with the
* method.
* $RETURNS$
* __objModMethod() return a reference to <oObject>.
* $DESCRIPTION$
* __objModMethod() is a low level class support function that modify
* a METHOD in an object and replace it with a new function. <oObject>
* is unchanged if a symbol with the name <cMethodName> does not exist
* in <oObject>. __objModMethod() is used in inheritance mechanism.
*
* Note that <nFuncPtr> is a special pointer to a function that was
* created using the @ operator, see example below.
* $EXAMPLES$
* // create a new THappy class and add a Smile method
* oHappy := HBClass():New( "THappy" )
* __objAddMethod( oHappy, "Smile", @MySmile() )
* ? oHappy:Smile( 1 ) // :)
* ? oHappy:Smile( 2 ) // ;)
* // replace Smile method with a new function
* __objAddMethod( oHappy, "Smile", @YourSmile() )
* ? oHappy:Smile( 1 ) // *SMILE*
* ? oHappy:Smile( 2 ) // *WINK*
*
* STATIC FUNCTION MySmile( nType )
* LOCAL cSmile
* DO CASE
* CASE nType == 1
* cSmile := ":)"
* CASE nType == 2
* cSmile := ";)"
* ENDCASE
* RETURN cSmile
*
* STATIC FUNCTION YourSmile( nType )
* LOCAL cSmile
* DO CASE
* CASE nType == 1
* cSmile := "*SMILE*"
* CASE nType == 2
* cSmile := "*WINK*"
* ENDCASE
* RETURN cSmile
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objModMethod() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddMethod(),__objDelMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objModInline()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* 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*
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objModInline() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddInline(),__objDelInline(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objDelMethod()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Delete a METHOD from class
* $SYNTAX$
* __objDelMethod( <oObject>, <cSymbol> ) --> oObject
* $ARGUMENTS$
* <oObject> is the object to work on.
*
* <cSymbol> is the symbol name of METHOD or INLINE method to be
* deleted (removed) from the object.
* $RETURNS$
* __objDelMethod() return a reference to <oObject>.
* $DESCRIPTION$
* __objDelMethod() is a low level class support function that delete
* (remove) a METHOD or an INLINE method from an object. <oObject> is
* unchanged if a symbol with the name <cSymbol> does not exist in
* <oObject>.
*
* __objDelInline() is exactly the same as __objDelMethod().
* $EXAMPLES$
* // create a new THappy class and add a Smile method
* oHappy := HBClass():New( "THappy" )
* __objAddMethod( oHappy, "Smile", @MySmile() )
* ? __objHasMethod( oHappy, "Smile" ) // .T.
* // remove Smile method
* __objDelMethod( oHappy, "Smile" )
* ? __objHasMethod( oHappy, "Smile" ) // .F.
*
* STATIC FUNCTION MySmile( nType )
* LOCAL cSmile
* DO CASE
* CASE nType == 1
* cSmile := ":)"
* CASE nType == 2
* cSmile := ";)"
* ENDCASE
* RETURN cSmile
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objDelMethod() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddInline(),__objAddMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod(),__objModInline(),__objModMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objDelInline()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Delete a METHOD INLINE from class
* $SYNTAX$
* __objDelInline( <oObject>, <cSymbol> ) --> oObject
* $ARGUMENTS$
* <oObject> is the object to work on.
*
* <cSymbol> is the symbol name of METHOD or INLINE method to be
* deleted (removed) from the object.
* $RETURNS$
* __objDelInMethod() return a reference to <oObject>.
* $DESCRIPTION$
* __objDelInMethod() is a low level class support function that delete
* (remove) a METHOD or an INLINE method from an object. <oObject> is
* unchanged if a symbol with the name <cSymbol> does not exist in
* <oObject>.
* $EXAMPLES$
* // create a new THappy class and add a Smile method
* oHappy := HBClass():New( "THappy" )
* __objAddMethod( oHappy, "Smile", @MySmile() )
* ? __objHasMethod( oHappy, "Smile" ) // .T.
* // remove Smile method
* __objDelInMethod( oHappy, "Smile" )
* ? __objHasMethod( oHappy, "Smile" ) // .F.
*
* STATIC FUNCTION MySmile( nType )
* LOCAL cSmile
* DO CASE
* CASE nType == 1
* cSmile := ":)"
* CASE nType == 2
* cSmile := ";)"
* ENDCASE
* RETURN cSmile
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objDelMethod() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddInline(),__objAddMethod(),__ObjGetMethodList(),__objGetMsgList(),__objHasMethod(),__objModInline(),__objModMethod()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objDelData()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Delete a DATA (instance variable) from class
* $SYNTAX$
* __objDelMethod( <oObject>, <cDataName> ) --> oObject
* $ARGUMENTS$
* <oObject> is the object to work on.
*
* <cDataName> is the symbol name of DATA to be deleted (removed) from
* the object.
* $RETURNS$
* __objDelData() return a reference to <oObject>.
* $DESCRIPTION$
* __objDelData() is a low level class support function that delete
* (remove) a DATA from an object. <oObject> is unchanged if a symbol
* with the name <cDataName> does not exist in <oObject>.
* $EXAMPLES$
* // create a new THappy class and add a lHappy DATA
* oHappy := HBClass():New( "THappy" )
* __objAddData( oHappy, "lHappy" )
* ? __objHasData( oHappy, "lHappy" ) // .T.
* // remove lHappy DATA
* __objDelData( oHappy, "lHappy" )
* ? __objHasData( oHappy, "lHappy" ) // .F.
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objDelData() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objAddData(),__objGetMsgList(),__ObjGetValueList(),__objHasData(),__ObjSetValueList()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* __objDerivedFrom()
* $CATEGORY$
* Object manipulation
* $ONELINER$
* Determine whether a class is derived from another class
* $SYNTAX$
* __objDerivedFrom( <oObject>, <xSuper> ) --> lIsParent
* $ARGUMENTS$
* <oObject> is the object to check.
*
* <xSuper> is the object that may be a parent. <xSuper> can be either
* an Object or a Character string with the class name.
* $RETURNS$
* __objDerivedFrom() return a logical TRUE (.T.) if <oObject> is
* derived from <xSuper>.
* $DESCRIPTION$
* __objDerivedFrom() is a low level class support function that check
* is one class is a super class of the other, or in other words, does
* class <oObject> a child or descendant of <xSuper>.
* $EXAMPLES$
* // Create three classes and check their relations
*
* #include "hbclass.ch"
* FUNCTION main()
* local oSuper, oObject, oDress
* oSuper := TMood():New()
* oObject := THappy():New()
* oDress := TShirt():New()
* ? __objDerivedFrom( oObject, oSuper ) // .T.
* ? __objDerivedFrom( oSuper, oObject ) // .F.
* ? __objDerivedFrom( oObject, oDress ) // .F.
* RETURN NIL
*
* CLASS TMood
* METHOD New() INLINE Self
* ENDCLASS
*
* CLASS THappy FROM TMood
* METHOD Smile() INLINE qout( "*smile*" )
* ENDCLASS
*
* CLASS TShirt
* DATA Color
* DATA Size
* METHOD New() INLINE Self
* ENDCLASS
* </fixed>
* $STATUS$
* R
* $COMPLIANCE$
* __objDerivedFrom() is a Harbour extension.
* $FILES$
* Library is rtl
* $SEEALSO$
* __objHasData(),__ObjHasMethod()
* $END$
*/