Q:

Grant access to function only for classes that have the same base class

I have a baseclass, lets call it base_t. base_t has a function called void render(). I want that all classes that derive from base_t to have access to that function, but noone else. The render functions will be defined in base_t as virtual void render() = 0; making it pure virtual.
How can I achieve this in C++? Via friend? Or are there other methods of doing this?
To make it more clear, I want the class A (derived from base_t) to be able to access the function render() in class B (also derived from base_t) which is implemented by A and B but is pure virtual defined in base_t.
Here is an example:
class base_t
{
private:
    virtual void render() = 0;
};

class A : public base_t
{
private:
    virtual void render()
    {
        // Do Stuff
    }
};

class B : public base_t
{
public:
    void dostuff(A *classA)
    {
        // here I want to call render!
        classA->render();
    }

private:
    virtual void render()
    {
        // Do Stuff
    }
};

A:

What about a simple:
class base_t
{
private:
    virtual void render() = 0;

protected:
   void renderOther(base_t& other){
      other.render();
   }
};

B can render A through the interface method keeping a correct encapsulation.

