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

Home » Public Forums » archive » Re: Call a method from a class
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: Call a method from a class [message #47563 is a reply to message #47555] Thu, 16 February 2006 04:43 Go to previous messageGo to previous message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
vcarlos wrote:
> Hi all,
>
> In some languages is possible to call methods from a Class, instead of
> a object. For instance, the class Messager could call a method
> reportError, message. This is useful when I just need a "instance" of
> that object and everybody takes advantage of that (I think that is
> similar to Singleton design pattern). Is there any way to the same in
> IDL? Or I should set up some kind of library procedures/functions and
> use through my program?
>
> Thanks a lot
>
> Vinicius
>

Take care betweem "call methods from a Class" and a "Singleton".

The Singleton is a design pattern and it means that only exists one
instance of an object in the whole application.

a= OBJ_NEW('Some_thing')

b= OBJ_NEW('Some_thing')

'a' and 'b' are the same reference.


"Call methods of a class" is known in other languages as "static
methods" or "class methods" and it means you don't need to create an
instance to invoque a methods, only put the name of the class and the
method.

d = Image.getData()


I hope this will be usefull for you,
bye :)


--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
Grup de Recerca Aplicada en Hidrometeorologia (GRAHI)
Universitat Polit�cnica de Catalunya
Barcelona - SPAIN
-----------------------------------------------------
http://www.grahi.upc.edu
-----------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: "Stopped on unknown instruction" and DLMs
Next Topic: Re: Leer archivos ASCII

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

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

Total time taken to generate the page: 0.00452 seconds