I have some class for a collector, and there are 2 methods, for example:
bool MyCollectorChanged() const;
bool MyCollectorDoSomeOperation() const;
I can't change the signatures of these methods which means I can't remove the const
from the signature.
I want to set/unset some flag in MyCollectorChanged()
for some situation, so I could check the flag value inside MyCollectorDoSomeOperation()
.
Adding a member flag to the class will not work, as MyCollectorChanged()
is a const method so I can't change the member flag inside MyCollectorChanged()
.
Is there an option to do it? How can I set/unset some flag inside MyCollectorChanged()
, so it will be visible inside MyCollectorDoSomeOperation()
?