Functions

NotificationBoard.cc File Reference

#include <algorithm>
#include "NotificationBoard.h"
#include "NotifierConsts.h"

Go to the source code of this file.

Functions

 Define_Module (NotificationBoard)
std::ostream & operator<< (std::ostream &os, const NotificationBoard::NotifiableVector &v)

Function Documentation

Define_Module ( NotificationBoard   ) 
std::ostream& operator<< ( std::ostream &  os,
const NotificationBoard::NotifiableVector v 
)

Definition at line 25 of file NotificationBoard.cc.

{
    os << v.size() << " client(s)";
    for (unsigned int i=0; i<v.size(); i++)
    {
        os << (i==0 ? ": " : ", ");
        if (dynamic_cast<cModule*>(v[i]))
        {
            cModule *mod = dynamic_cast<cModule*>(v[i]);
            os << "mod (" << mod->getClassName() << ")" << mod->getFullName() << " id=" << mod->getId();
        }
        else if (dynamic_cast<cPolymorphic*>(v[i]))
        {
            cPolymorphic *obj = dynamic_cast<cPolymorphic*>(v[i]);
            os << "a " << obj->getClassName();
        }
        else
        {
            os << "a " << opp_typename(typeid(v[i]));
        }
    }
    return os;
}