00001 #ifndef __BLOCK_H__ 00002 #define __BLOCK_H__ 00003 00004 #include "port.h" 00005 00006 namespace DiscreteTimeSystems { 00007 00011 class Block { 00012 protected: 00013 std::vector<InputPort *> _in_ports; 00014 std::vector<OutputPort *> _out_ports; 00015 public: 00019 Block(); 00020 00023 virtual ~Block() {} 00024 00029 InputPort *getInputPort(int n); 00030 00035 OutputPort *getOutputPort(int n); 00036 00040 virtual bool isStatefulBlock() = 0; 00041 00045 virtual void updateState() = 0; 00046 00050 virtual void updateOutput() = 0; 00051 }; 00052 00053 } 00054 00055 00056 #endif // __BLOCK_H__
1.5.1