ich stehe gerade ziemlich auf dem Schlauch. Vermutlich sehe ich einfach den Wald vor lauter Bäumen nicht mehr. Hier mein Problem:
Compilermeldung:
Code: Alles auswählen
[...]/AbstractRelationNode.hpp:87: error: 'virtual void AbstractRelationNode::setInputChannels(unsigned int, PathID)' is protected
[...]/AbstractFilterRelationNode_impl.hpp:72: error: within this contextCode: Alles auswählen
// AbstractRelationNode.hpp
class AbstractRelationNode : public Observable<IAbstractRelationNode>
{
[...]
protected:
virtual void setInputChannels( const unsigned int aChannels, const PathID aPath ) = 0; // <-- Hier meckert der Compiler (Zeile 87)
[...]
};Code: Alles auswählen
// AbstractFilterRelationNode_impl.hpp
template< typename T >
void
AbstractFilterRelationNode<T>::outputChannelsChanged( AbstractFilter<T>* aFilter, unsigned int aOutputChannels )
{
// Signal the change of the output channels to the connected relation node:
if (0 != this->next(0))
{
this->next(0)->setInputChannels( aOutputChannels, this->next(0)->incomingPath(this) ); // <-- Hier meckert der Compiler (Zeile 72)
}
}Code: Alles auswählen
// AbstractFilterRelationNode.hpp
template< typename T >
class AbstractFilterRelationNode : public AbstractRelationNode, protected Observer< IAbstractFilter<T> >
{
[...]
protected:
// From AbstractRelationNode:
virtual void setInputChannels( const unsigned int aChannels, const PathID aPath );
// From Observer< IAbstractFilter<T> >
virtual void outputChannelsChanged(AbstractFilter<T>* aFilter, unsigned int aOutputChannels);
[...]
};Normalerweise darf ich auf protected-Elemente im Zuge der Vererbung doch zugreifen. Wahrscheinlich habe ich so etwas simples übersehen, dass ich es einfach immer noch übersehe.
Danke an alle, die mal drüberschauen.
Gruß,
Christoph
P.S.: Gab es nicht mal Tags, die den Code farbig einfärben? Oder war das in einem anderen Forum?