xHarbour Reference Documentation > Statement Reference xHarbour Developers Network  

CLASSMETHOD

Declares the symbolic name of a class method.

Syntax

CLASSMETHOD <MethodName> [ (<params,...>] ) ] ;
   [ INLINE <expression> ]

Arguments

<MethodName>
This is the symbolic name of a class method to declare. It must begin with a letter or underscore followed by digits, letters or underscores. A symbolic name can contain up to 63 characters.
(<params,...>)
A declaration of formal parameters enclosed in parentheses is required when the class method is declared as INLINE. If INLINE is not used, the method can be declared without parameters.
INLINE <expression>
This is the expression which is executed when an INLINE method is invoked. <expression> must be one line of code. The code cannot contain commands but only function and method calls.

Description

The CLASSMETHOD statement exists for compatibility reasons. It is not different from the METHOD statement since the self object visible in methods is the same for METHOD and CLASSMETHOD.

There is one exception: :initClass() declared as CLASSMETHOD receives the parameters passed to the class function (see HbObject()).

Info

See also:ACCESS, ASSIGN, CLASS, DATA, DELEGATE, EXPORTED:, HIDDEN:, INLINE METHOD, MESSAGE, METHOD (declaration), METHOD (implementation), PROTECTED:
Category: Class declaration , Declaration , xHarbour extensions
Header:hbclass.ch
Source:vm\classes.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe