title: c++ how to hide observer implementation
body: <p>I am designing some kind of observer pattern for my project, the problem is I don't want my <code>Observee</code> derived classes exposing to public it's methods like <code>attachObserver(...)</code> or <code>detachObserver(...)</code>.
  Only my "Observer" classes needs to access these methods.</p>
  
  <p>I give you an example:</p>
  
  <pre><code>template &lt;typename O&gt;
  class Observee {
  public:
      std::set&lt;O*&gt; getObservers() const;
      virtual void attachObserver(O* observer);
      virtual void detachObserver(O* observer);
  private:
      std::set&lt;O*&gt; m_Observers;
  };
  
  class SomeObserveeClass : public Observee&lt;SomeObserverClass&gt; {
  
  
  }
  </code></pre>
  
  <p>(I don't need <code>Observer</code> class in my case, because all my "Observers" (classes I am passing to template of Observee) have not much in common)</p>
  
  <p>What I would like is that <code>SomeObserveeClass</code> does not expose it's <code>Observee</code> methods (<code>attachObserver</code>, <code>detachObserver</code>). The only class requiring to access them is the "Observer" (the class of Observee template)</p>
  
  <p>The only solution I have come up with is privatize <code>attachObserver</code> and <code>detachObserver</code> and let all <code>Observee</code> be friend with their respective "Observer" but it's doesn't sound right to me.</p>
  
  <p>Any ideas ?</p>