tags:

views:

81

answers:

1

Hi,

I have

Package A (Namespace A), which has header file say internalItems.hpp, contains a class with enumeration of items to be created and methods to get and set item type. Now this class has to be made available in common package (Package Common with Namespace COMMON) so that other package (let says Package EndUser with Namespace EUSER) can use enumeration type.

What is the best way to do it ? Thanks you for your valuable responses.

+1  A: 

I think you're asking how to expose the classes and enums in internalitems.hpp to your EUSER project from your Common library.

You're going to have to #include "internalitems.hpp" in any file that needs to use the enums or classes defined in it, no matter which project they're in. In that case if internalitems is intended to be an internal, not-exposed-to-library-consumers header file then you'll need to promote so it is part of the Common library interface headers or at least filter out the parts that the external code needs to use into a public header file.

Rup