Hello, I have such classes:
class Base
{
private: bool mEnabled;
public: bool getEnabled() { return mEnabled; }
};
class First : public Base;
{
// ...
};
class Second : public Base
{
Second() {
// I have to check First::mEnabled
}
};
class Manager
{
First obj1;
Second obj2;
};
I have some class manager which handles 2 another classes. And I have to check mEnabled variable in one such object from another. What's the right way? Would it be right if I'll make
static bool mEnabled;
static bool getEnabled();
p.s. There would be only 1 objects of this classes.