Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is a 'warper program'?
Message
From
29/11/1999 11:31:38
 
 
To
28/11/1999 21:27:36
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00295884
Message ID:
00296385
Views:
25
Hi David,

>Let's hear *your* definition of a wrapper -- with examples, including one that deals with "existing code".

Say you have a prg with two function in it. This would be a wrapper for that PRG:
define class MyWrapper as Custom
name = MyWrapper

procedure Init
    set procedure to MyPrg.Prg
endproc

procedure Func1
    return Funct1InMyPrg
endproc

procedure Func2
    return Func2InMyPrg
endproc
enddefine
There, that wraps a new object interface to existing code with out changing the exisitng code at all. The old code shouldn't be changed, then your not wrapping, your modifing, and most of the times it can't be, either, its not accesible, or it needs to backward compatible.

Another exapmle would be a wrapper to an ActiveX (a subclass, or third object that controls it externally) , where you can't play with other code, and there are too many Gory Details to do everything over each time you need it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform