Problem with ndds/log/log_makeheader.h

2 posts / 0 new
Last post
Offline
Last seen: 7 months 1 week ago
Joined: 08/25/2015
Posts: 32
Problem with ndds/log/log_makeheader.h

Hi,


One of our third-party products defines an enum class similar to this:

enum class AccessType { Public = 0, Private = 1 }

This works fine until ndds/log/log_makeheader.h is included (due to some dependencies inside the rti headers) before this enum since there 'Public' is defined to nothing:

#define Public

#define Package

#define Peer

What's the reason behind those defines? Are they really needed?

 

Thx,

Christian

 

 

 

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 3 days ago
Joined: 06/02/2010
Posts: 594

Hi,

The   ndds/log/log_makeheader.h defines are used by internal RTI tools to automatially manage the header files.

I have taken a quick look at the header files we ship and done a small test. It appers the only #define we currently need as part of the public header files is Peer.

So you could try to edit the   ndds/log/log_makeheader.h and remove (or rename RTI_XXX) the other definitions (Public, Package) and see if you get any compilation errors.

I will file an internal issue to improve this. I do not think there is a need to actually have this dependency in the shipped header files. The only public header that uses it is advlog/advlog_logger.h and the dependency there appears unnecessary. The keyword Peer there could be replaced with extern.

Regards,

Gerardo