#ifndef _PROTOCOL_MANAGER_H #define _PROTOCOL_MANAGER_H #include #include class AbstractProtocol; class StreamBase; class ProtocolManager { QMap numberToNameMap; QMap nameToNumberMap; QMultiMap neighbourProtocols; QMap factory; QList protocolList; void populateNeighbourProtocols(); public: ProtocolManager(); void registerProtocol(int protoNumber, void *protoInstanceCreator); AbstractProtocol* createProtocol(int protoNumber, StreamBase *stream, AbstractProtocol *parent = 0); AbstractProtocol* createProtocol(QString protoName, StreamBase *stream, AbstractProtocol *parent = 0); bool isValidNeighbour(int protoPrefix, int protoSuffix); QStringList protocolDatabase(); }; #endif