comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: singleton usage
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: singleton usage [message #47609 is a reply to message #47604] Tue, 21 February 2006 06:47 Go to previous messageGo to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
vcarlos wrote:
> Hi Antonio,
>
> I saw the system variable singleton implementation, but what I am in
> doubt is about the usage of the pattern itself. Since everytime I need
> a reference to the singleton object in my objects I need to call a
> myObject = Singleton() statement, or initialize an attribute in every
> object needing a reference to the singleton. But what if I just create
> a read only system variable and use it over my whole program? (this
> variable would be an instance of my "singleton" class)
>
> Thanks
>
> Vinicius
>

Ok sorry, I don't understand you in the first email.
Yes, I think you can do it, but this is a convention that you use in
your program. Then you need to document very well that variable XXX is a
"reference" to a singleton object in your whole application.


--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Graphics Objects & Heap Variables
Next Topic: Adding a GEOTIFF header to a (large) TIF file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:04:41 PDT 2025

Total time taken to generate the page: 0.16091 seconds