[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
OBJECTS engine
--------------------------------------------------------------------------------
# ####### ##########
##### ############### ### ######## ###
######### ############ #### # ########## #####
############# ######### ######## # ############ ####
################# ###### ############ # ############ #####
########## ########## ################### # ########### ######
########## ########### ###### ############# # ## ################
######### ############# ############################## ### ################
##################### ########################## ## #################
###### # # # # # ################# #####################
# ###########
##### ###### ## ####### ##### ######## #####
## ## ## ## ## ## ## ## ## ##
### ### ###### ## ##### ### ## #####
## ## ## ## ## ## ## ## ## ## ##
##### ###### ##### ####### ##### ## ######
OOPS Engine for Clipper 5
(C) F.Pulp.n, A.Linares 1993-4 .
FiveWin has its own OOP engine to create new compatible Clipper Classes.
You should use also this engine to create your own Classes in MsDos. To
extract OOPS engine from FiveWin and to use it from MsDos do the following:
LIB FiveWin * Objects;
LIB FiveWin * Data;
LIB FiveWin * Methods;
then do:
LIB OBJECTS + Objects + Data + Methods;
So you will get OBJECTS.LIB.
OBJECTS Syntax
--------------------------------------------------------------------------------
#include "Objects.ch"
CLASS <TMyClass> [ FROM <TParentClass> ]
DATA <DataName>
...
METHOD <MethodName>( [ <params,...> ] ) ;
[ CONSTRUCTOR | SETGET | VIRTUAL | BLOCK ]
ENDCLASS
<TMyClass> Is the name of the new Class we are going to create. It can
not exceed from ten characters.
<TParentClass> Is the name of the Class from which we want to inherit a
new Class.
<DataName> They are the name of the Data elements (instance variables)
we want to have for the Objects of this new Class.
<MethodName> Is the name of the Methods of the Objects.
<params,...> Is an optional list of elements to be passed as parameters
to the methods.
Clauses
--------------------------------------------------------------------------------
CONSTRUCTOR When we are going to initialize an Object and we want to
automatically return a reference to self.
SETGET They are for calculated Data. This means we will manipulate
this name of a method like a Data.
VIRTUAL Methods that do nothing. Very usefull for inheritances and
when you are starting creating and testing a Class.
BLOCK Extremely fast and easy to code, use this clause when you
want to declare 'inline' methods just from the definition
of the Class. We use a lot of them in FiveWin Classes. You
have to specify as first parameter 'Self'.
// jhs
INLINE The same functionality than the BLOCK clause, but it is
much more easy to use as it is not necessary to build the
codeblock -it is automatically builted- It is better xBase!
We plan in next versions of FiveWin to convert all our
BLOCK methods into INLINE clauses.
Methods codification
--------------------------------------------------------------------------------
METHOD <MethodName>( [<params,...>] ) CLASS <TMyClass>
-we have a local 'Self' ready to use here.
-use :: for accesing Self:Data
return
Just include ONE class by PRG.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson