[omniORB] abstract class

Marek Cichy m_are_k at o2.pl
Thu Mar 5 20:44:46 GMT 2009


Näwe pisze:
>  
>
>   
>> -----Original Message-----
>> From: omniorb-list-bounces at omniorb-support.com 
>> [mailto:omniorb-list-bounces at omniorb-support.com] On Behalf 
>> Of Clarke Brunt
>> Sent: Thursday, March 05, 2009 3:07 PM
>> To: omniorb-list at omniorb-support.com
>> Subject: RE: [omniORB] abstract class
>>
>>     
>>> My omniidl gives me the following declarations for the _get/_set
>>>       
>> functions:
>>     
>>>    virtual ::CORBA::Char get_char(::CORBA::UShort index) = 0;
>>>    virtual ::CORBA::Double get_double(::CORBA::UShort index) = 0;
>>>    virtual void set_char(::CORBA::Char c, ::CORBA::UShort 
>>>       
>> index) = 0;
>>     
>>>    virtual void set_double(::CORBA::Double d, 
>>>       
>> ::CORBA::UShort index) = 0;
>>     
>>> Look Ma, no underscores!
>>>       
>> Well spotted! Those underscores evidently escaped the eyes of 
>> both myself
>> and Wernke. The original poster solved the problem (either by getting
>> omniidl to generate the examples, or by examining the 
>> definitions in the
>> generated header), but didn't actually say it was that was 
>> wrong before.
>>
>> Some compilers/linkers add underscores, don't they? I wonder 
>> if perhaps some
>> previous error messages included the '_', and caused confusion.
>>     
>
> I just read the CORBA Spec (CORBA-3.0-04-03-12.pdf). It says in §3.2.3.1:
>
> <quote>
> ...
> To minimize the amount of work, users may lexically “escape” identifiers by
> prepending an underscore (_) to an identifier. This is a purely lexical convention that
> ONLY turns off keyword checking. The resulting identifier follows all the other rules
> for identifier processing. For example, the identifier _AnIdentifier is treated as if it
> were AnIdentifier.
> The following is a non-exclusive list of implications of these rules:
> • The underscore does not appear in the Interface Repository.
> • The underscore is not used in the DII and DSI.
> • The underscore is not transmitted over “the wire.”
> • Case sensitivity rules are applied to the identifier after stripping off the leading
> underscore.
> For example:
> module M {
>    interface thing {
>       attribute boolean abstract; // error: abstract collides with
>                                   // keyword abstract
>       attribute boolean _abstract; // ok: abstract is an identifier
> };
> };
> ...
> </quote>
>
> Everything explained...
>
> Stefan
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
> __________ NOD32 Informacje 3910 (20090305) __________
>
> Wiadomosc zostala sprawdzona przez System Antywirusowy NOD32
> http://www.nod32.com lub http://www.nod32.pl 
>
>
>
>   
Finally I do not know, if there were those underscores or wrong data 
types, because I desperately ;-)  tested _all_ ideas that came into mine 
or compiler's (IntelliSense) mind. Anyway, I did not know about 
specification mentioning this neither and next time I'll remember this.
Thanks again Stefan and Clarke.
Regards
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090305/2c768789/attachment.htm


More information about the omniORB-list mailing list