
// Title:	Signal.h

#include "Block.h"

#ifndef SIGNAL_H
	#define SIGNAL_H					// inclusion guard

	// Signal			
	class CSignal
	{
	public:
		CSignal(void);		// creates a Signal obj. based on the datatype of the evolved (due to block ops.) signal
		~CSignal(void);

		// Accessor methods
		char *GetName(void);
	
	private:
		char *signal_name;	// name of the current Signal
	};

	// DoubleSignal
	class CDoubleSignal : public CSignal
	{
	public:
		CDoubleSignal(void);	
		~CDoubleSignal(void);
	
	private:
		double var;	// each signal will have some numerical val
	};

	// MatrixSignal
	class CMatrixSignal : public CSignal
	{
	public:
		CMatrixSignal(void);	
		~CMatrixSignal(void);
	
	private:
		int		nrows;
		int		ncols;	
		double	**matrix_signal;	// matrix of signal vals
	};

	// VectorSignal
	class CVectorSignal : public CSignal
	{
	public:
		CVectorSignal(void);	
		~CVectorSignal(void);
	
	private:
		int		length;
		double	*vector_signal;		// vector of signal vals
	};

	// Connection
	class CConnection
	{
	public:
		CConnection(void);				
		~CConnection(void);

		// Accessor methods
		CSignal *GetSignal(void);			// gets the private member var signal of type ptr-to-CSignal
	
	private:
		double	start_pt[2];				// start pt. (x,y) ordered pair
		double	end_pt[2];					// end pt. (x,y) ordered pair
		CPort	*m_pRefFromPort;			// singular, since 1 connection has only 1 from-port (ptr used since block ports not know at this stage)
		CPort	*m_pRefToPort;				// singular, since 1 connection has only 1 to-port (ptr used since block ports not know at this stage)
		CSignal	*m_pSignal;					// singular, since 1 signal (like a current) travels down 1 connection (like a wire), signal has derived forms so use *signal.
	};

#endif

// eof