Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Singleton Pattern
Message
From
16/12/2002 12:21:26
 
 
To
16/12/2002 10:54:13
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00733289
Message ID:
00733333
Views:
24
>Hi José.
>
>>How I can do a Singleton Pattern Class in VFP?
>
>One of the ways you can do this is to use a Class Factory instead of instantiating the class directly. With a class factory, you ask one class to create objects of other classes for you. Beside the run-time flexibility this provides (you can change the class being instantiated more easily), this can support singleton classes: the class factory object checks to see if it has already created a singleton object (it obviously will have to maintain a reference to the singleton object) and if so, return the reference to that object rather than creating a new one.
>
>Doug

LOL... I´m looking for how to make a Singleton behavior in my Abstract Factory class... it´s true, not a joke. I have program my Abstract Factory and it support Singleton Classes already, but I need Singleton behavior for my Factory it self.

Thanks.
José Luis.

Quidquid latine dictum sit, altum sonatur

Previous
Reply
Map
View

Click here to load this message in the networking platform