00001 /*************************************************************************** 00002 * Copyright (C) 2004-2005 by David Saxton * 00003 * david@bluehaze.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #ifndef DEMULTIPLEXER_H 00012 #define DEMULTIPLEXER_H 00013 00014 #include "component.h" 00015 #include "logic.h" 00016 00017 #include <qptrvector.h> 00018 00022 class Demultiplexer : public CallbackClass, public Component 00023 { 00024 public: 00025 Demultiplexer( ICNDocument *icnDocument, bool newItem, const char *id = 0 ); 00026 ~Demultiplexer(); 00027 00028 virtual bool canFlip() const { return true; } 00029 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id ); 00030 static LibraryItem *libraryItem(); 00031 00032 protected: 00033 void dataChanged(); 00037 void initPins( unsigned addressSize ); 00038 00039 void inStateChanged( bool newState ); 00040 00041 QPtrVector<LogicIn> m_aLogic; 00042 QPtrVector<LogicOut> m_xLogic; 00043 LogicIn * m_input; 00044 }; 00045 00046 #endif
1.5.1