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

Home » Public Forums » archive » global singleton object ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
global singleton object ? [message #26918] Tue, 02 October 2001 08:51 Go to previous message
R.G.S. is currently offline  R.G.S.
Messages: 46
Registered: September 2000
Member
Greetings,

partly inspired by the recent threads on global variables,
I have a question regarding a global object.


I have an IDL process that will run independently on several
different computers. So, I need a method of deciding what
computer and operating system I'm on, and defining various
filepaths etc. So I have written an object with methods such
as "->getfilepath". This method determines the computer name, and
returns the appropriate info. There are several methods, for different
read and write paths, and different data sets. The actual information is
hardcoded into the object definition.

So, I currently create the object and kill the object deep in each
basic read/write function, but I would much rather have one instance
of the object (i.e. the singleton object) that can be seen everywhere.
(I've used this approach many times in labview, and it is really handy).
I actually thought that objects were supposed to be of that scope, but
I guess I got confused with the Labview nonreentrant vis.

So, is there a way to easily define the object, or do I simply create it
upon startup of my IDL and define it to a system variable?


Cheers,
bobject
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Declaration of variables in IDL
Next Topic: Re: Using IDL with Java

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

Current Time: Wed Oct 08 16:49:57 PDT 2025

Total time taken to generate the page: 0.00423 seconds