overloaded operator() in c++ structure
<p>In Effective C++, 3rd Edition, Page 173~175, Scott Meyers talked of alternatives to virtual functions using the strategy pattern:</p>

<pre><code>class GameCharacter;
int defaultHealthCalc(const GameCharacter&amp; gc);

class GameCharacter {
public:
    typedef std::tr1::function&lt;int (const GameCharacter&amp;)&gt; HealthCalcFunc;
    explicit GameCharacter(HealthCalcFUnc hcf = defaultHealthCalc)
    : healthFunc(hcf)
    {}

    int healthValue const
    { return healthFunc(*this) }
    ...
private:
    HealthCalcFunc healthFunc;
};
...
struct HealthCalculator {
    int operator()(const GameCharacter&amp;) const
    { ... }
};
...
class EyeCandyCharacter: public GameCharacter {
    explicit EyeCandyCharacter(HealthCalcFunc hcf=defaultHealthCalc)
    :GameCharacter(hcf)
    { ... }
    ...
}
...
EyeCcandyCharacter ecc(HealthCalculator());
</code></pre>

<p>The last statement is to illustrate how to use a health calculation function object in the constructor of <code>EyeCandyCharacter</code> class.</p>

<p>My question is, the constructor of <code>EyeCandyCharacter</code> class requires some function that takes a parameter compatible with a <code>const GameCharacter&amp;</code> and returns something convertible to an <code>int</code>.</p>

<p>Is this supported/implemented by <code>operator()</code> defined in <code>struct HealthCalculator</code>? I don't quite understand the meaning of this overloaded operator here.</p>

<p>Another question of mine here is that the initializer list in the constructor of the derived class usually only initializes the data members of itself (though I know the base part of the derived class is also intialized implicitly). How come the base class <code>GameCharacter</code> appears in the initializer of derived class <code>EyeCandyCharacter</code>?</p>
