
// Title:	SystemModel.h

#include "Block.h"
#include "Signal.h"

#ifndef SYSTEM_MODEL_H
	#define SYSTEM_MODEL_H					// inclusion guard

	// User defined consts/vars.

	// User defined types

	// SystemModel			
	class CSystemModel
	{
	public:
		CSystemModel(void);	
		~CSystemModel(void);
	
		ComputeModelSignals();				// computes all Signals across all Connections according to math ops.
		char *GetName(void);				// gets model name
		ReadIntputFromFile();				// reads: time, states
		WriteOutputToFile();				// writes: time, states, output, final states
		WriteNthTimeStepToFile();			// writes: every n-th time step to file
		ValidateConnectivity();				// validates Blocks are connected by Connections, warns of alg. loops

	private:
		char	*model_name;				// name of the current SystemModel
		double	t_start;					// simulation start time
		double	t_stop;						// simulation stop time
		list<CBlock*> m_lstBlock;			// a list of ptrs to the Blocks of the current SystemModel
		list<CConnection*> m_lstConnection;	// a list of ptrs to the Connections of the current SystemModel								
	};

#endif

// eof