calling method from parent class
<p>First: I know my question is not about a parent class, but I don't know how this structure is called and I thought parent would be the easiest to describe it.</p>

<p>I have two classes defined like this:</p>

<pre><code>class class_a {
    void foo() {
        //stuff
    }
};

class class_b {
    class_a A;
    void foo() {
        //more stuff
    }
};
</code></pre>

<p>I want class_b::foo(); called when certain requirements are met in class_a::foo(); It's possible to just set a variable in class_a and check for it in class_b::foo(); but I was wondering if there is a more elegant solution to this.</p>

<p>note: class_b is and can not be derived from class_a.</p>

<p>Thank you</p>
