I am constructing a static library in c++. It contains a lot of classes that interact with each other. Some classes are to be used by the user. Those classes have public variables and attributes. However some of these methods and attributes are meant to be used only by other classes within the library and I do not want the user to mess with them. I would like to hide them somehow in the header file I pass to the user.

After building the library, I consolidate all the headers of classes the final user should have access to in a single header. This way I can pass a single .a file and a single .hpp file.

However I do not want to grant access to all the public methods of the classes, as some are meant to be used only within the library and not by the final user.

I thought I would remove from the consolidated header file within the class definition the methods I do not want the user to access (they still remain in the header files within the library). This seemed to work. 

I then thought I would also remove the variables as well (they still remain in the header files within the library). But that seems to fail.

This is what I have in mind:

```
    //// Within the library
    // Class1.hpp

    namespace Library {

    class Class1 {
    public:
        int Var1;
        Class1(int param);
        void InternalMethod();
        void ExternalMethod();
    private:
        int Var1;
        void PrivateMethod();
    }
    }

    // Class2.hpp

    namespace Library {

    class Class2 {
    public:
        int Var1;
        Class2(Class1 param);
        void InternalMethod();
        void ExternalMethod();
    }
    }

    //// Header passed to user (what I would like to have)
    // Library.hpp

    namespace Library {
    class Class1 {
    public:
       Class1(int param);
       void ExternalMethod();
    }

    class Class2 {
    public:
        Class2(Class1 param);
        void ExternalMethod();
    }
    }

```

Is it possible to do that?

Thanks!