[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mico-devel
Subject:    Re: [mico-devel] IDL generator bug (RE: NAMESPACES (MODULES) IGNORED
From:       Karel Gardas <kgardas () objectsecurity ! com>
Date:       2005-09-19 11:24:05
Message-ID: Pine.LNX.4.63.0509191316020.4340 () silence ! gardas ! net
[Download RAW message or body]


Brian,

my bet is that, your idl file is `current.idl'. If this is true, then 
there is no wonder that IDL compiler generates __CURRENT_H__ as an ifdef 
mark. That's exactly how this should behave. If you have problem with it, 
as you seem to have, then I would recommend renaming your own IDL file to 
different name.

And no, prefixing ifdef mark with module name is not possible due to 
nature of IDL which allows several modules to be defined inside one file.

Anyway, patch enhancing IDL compiler to generate postfix to ifdef mark 
containing actual date (which is recommended practice for example in 
boost) is welcome. e.g.

#ifndef __CURRENT_20050919205016_H__
#define __CURRENT_20050919205016_H__
[...]
#endif // __CURRENT_20050919205016_H__


Thanks,
Karel
--
Karel Gardas                  kgardas@objectsecurity.com
ObjectSecurity Ltd.           http://www.objectsecurity.com
---
Need experienced, fast, reliable technical MICO support?
     ---> http://www.objectsecurity.com/commsup.html  <---
---

On Thu, 1 Sep 2005, Brian Lindahl wrote:

> The error I encountered earlier is due to a problem with the IDL tool
> that generates code from the .idl documents. The include protection
> (#ifdef __CURRENT_H__) in the generated include file doesn't add the
> namespace (module). For example:
>
>
>
> /******************** IDL FILE ***************************/
>
>
>
> #ifndef SPDV_Current_idl
>
> #define SPDV_Current_idl
>
>
>
> module SPDV
>
> {
>
>    struct Current
>
>    {
>
>      double value;
>
>    };
>
> };
>
>
>
> #endif
>
>
>
> /******************** GENERATED INCLUDE PROTECTION
> ***************************/
>
> #ifndef __CURRENT_H__
>
> #define __CURRENT_H__
>
>
>
> The generated include protection should be: '__SPDV_CURRENT_H__', not
> '__CURRENT_H__'. The result of this error means that, in the same source
> file, you cannot use the same IDL-generated symbols (class/struct names)
> even if they are differentiated by namespaces, because the generated
> include protection won't allow both '.h' files to be included.
>
>
>
> Brian Lindahl
>
> Spacecraft Software Engineer
>
> 858-375-2077
>
> brian.lindahl@spacedev.com
>
>
>
> SpaceDev, Inc. <http://www.spacedev.com/>
>
> "We Make Space Happen"
>
>
_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic