Discussion:
[omniORB] static function?
Ronald Andrae
2008-02-18 17:43:59 UTC
Permalink
Hi,

I want to declare static function in my IDL, but I haven't found any
information to do that.

In example:

interface Test {
static void hello();
};

Static cann't be found. How I can describe in the IDL that a function is
a static function?

Thanks for your help!
Stefan Naewe
2008-02-18 17:51:14 UTC
Permalink
Post by Ronald Andrae
Hi,
I want to declare static function in my IDL, but I haven't found any
information to do that.
interface Test {
static void hello();
};
Static cann't be found. How I can describe in the IDL that a function is
a static function?
You can't! IDL != C++

S.
--
----------------------------------------------------------------
Dipl.-Inform. Stefan Naewe ATLAS Elektronik GmbH
Dept.: NUS T4
phone: +49-(0)421-457-1378 Sebaldsbruecker Heerstr. 235
fax: +49-(0)421-457-3913 28305 Bremen
----------------------------------------------------------------
/dev/random says: Oxymoron: Whole Half.
Ronald Andrae
2008-02-18 18:01:48 UTC
Permalink
How is it possible to use static functions with corba?
Post by Stefan Naewe
Post by Ronald Andrae
Hi,
I want to declare static function in my IDL, but I haven't found any
information to do that.
interface Test {
static void hello();
};
Static cann't be found. How I can describe in the IDL that a function
is a static function?
You can't! IDL != C++
S.
Alberto Casado Martín
2008-02-18 18:11:23 UTC
Permalink
I think I can't understand you, Why do you need an IDL static method?,
An IDL is only a definition, not an implementation.

A static method is a language specific tecnique to implement class methods
(only for some languages like C++ or java...)


Regards

Alberto.
Post by Ronald Andrae
How is it possible to use static functions with corba?
Post by Stefan Naewe
Post by Ronald Andrae
Hi,
I want to declare static function in my IDL, but I haven't found any
information to do that.
interface Test {
static void hello();
};
Static cann't be found. How I can describe in the IDL that a function
is a static function?
You can't! IDL != C++
S.
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080218/f7a4d352/attachment.htm
Stefan Naewe
2008-02-18 18:11:43 UTC
Permalink
Post by Ronald Andrae
Post by Stefan Naewe
Post by Ronald Andrae
Hi,
I want to declare static function in my IDL, but I haven't found any
information to do that.
interface Test {
static void hello();
};
Static cann't be found. How I can describe in the IDL that a function
is a static function?
You can't! IDL != C++
How is it possible to use static functions with corba?
You can use any *implementation language construct* you like
when writing a CORBA client or server. But IDL does not let
you define static functions. You always need an object (reference)
for calling a (member-) function.

S.
--
----------------------------------------------------------------
Dipl.-Inform. Stefan Naewe ATLAS Elektronik GmbH
Dept.: NUS T4
phone: +49-(0)421-457-1378 Sebaldsbruecker Heerstr. 235
fax: +49-(0)421-457-3913 28305 Bremen
----------------------------------------------------------------
/dev/random says: If you have to ask what jazz is, you'll never know.
Wernke Zur Borg
2008-02-18 18:13:01 UTC
Permalink
It is simply not possible, because CORBA does not have that concept.

CORBA is about references to objects, therefore your method must be an
object method, not a class method.

You have to instantiate a (perhaps singleton) object on the server side
and make it available to a client. The client must obtain a reference to
that object and call the object method.

Wernke
-----Original Message-----
Of Ronald Andrae
Sent: 18 February 2008 13:02
Subject: Re: [omniORB] static function?
How is it possible to use static functions with corba?
Post by Stefan Naewe
Post by Ronald Andrae
Hi,
I want to declare static function in my IDL, but I haven't
found any
Post by Stefan Naewe
Post by Ronald Andrae
information to do that.
interface Test {
static void hello();
};
Static cann't be found. How I can describe in the IDL that
a function
Post by Stefan Naewe
Post by Ronald Andrae
is a static function?
You can't! IDL != C++
S.
VEGA IT GmbH - Register court/Registergericht: Darmstadt, HRB No. 4096, Managing Directors/Geschäftsführer: Philip Cartmell, Susan Bygrave, John Lewis
Lars von Wedel
2008-02-18 18:09:39 UTC
Permalink
Ronald,

Look at how a naming service is designed and implemented. You would develop
an object of which only one instance exists. You may want to google for the
singleton design pattern to better understand. That is something that comes
close to what you probably want.

Regards,
Lars
-----Urspr?ngliche Nachricht-----
von Ronald Andrae
Gesendet: Montag, 18. Februar 2008 13:02
Betreff: Re: [omniORB] static function?
How is it possible to use static functions with corba?
Post by Stefan Naewe
Post by Ronald Andrae
Hi,
I want to declare static function in my IDL, but I haven't
found any
Post by Stefan Naewe
Post by Ronald Andrae
information to do that.
interface Test {
static void hello();
};
Static cann't be found. How I can describe in the IDL that
a function
Post by Stefan Naewe
Post by Ronald Andrae
is a static function?
You can't! IDL != C++
S.
_______________________________________________
omniORB-list mailing list
http://www.omniorb-support.com/mailman/listinfo/omniorb-list
Continue reading on narkive:
Loading...