Consider this:
Code:
...
class A
{
	friend class B;
...
Now class B may call protected function from class A.

But actually, there is too much useless code you provide us, that's why we are just guessing what you expect to be an answer to your question.