Re: Singleton
- From: "Chris Rolliston" <spam@xxxxxxxxx>
- Date: 18 Jan 2008 17:54:47 -0700
I wouldn't implement it that way but it is possible:
interface
type
ESingletonCreate = class(Exception)
end;
Singleton = class
private
class var FSomeData: TStrings;
public
class property SomeData: TStrings read FSomeData;
constructor Create;
end;
implementation
By the by, do you have any objection to the main part of my original
suggestion, which was to define an interface for the singleton and so
hide the singleton class wholesale in the implementation section of the
unit?
.
- Follow-Ups:
- Re: Singleton
- From: Jens Mühlenhoff
- Re: Singleton
- References:
- Singleton
- From: Alan T
- Re: Singleton
- From: Chris Rolliston
- Re: Singleton
- From: Chris Morgan
- Re: Singleton
- From: Craig Stuntz [TeamB]
- Re: Singleton
- From: Chris Rolliston
- Re: Singleton
- From: Jens Mühlenhoff
- Re: Singleton
- From: Chris Rolliston
- Re: Singleton
- From: Jens Mühlenhoff
- Singleton
- Prev by Date: Re: Singleton
- Next by Date: Re: Garbage Collection
- Previous by thread: Re: Singleton
- Next by thread: Re: Singleton
- Index(es):
Relevant Pages
|