Click here to Skip to main content
15,891,253 members
Articles / Programming Languages / C#

An Object-oriented Approach to Finite State Automata

Rate me:
Please Sign up or sign in to vote.
4.85/5 (19 votes)
3 Feb 2009CPOL7 min read 61.8K   1.1K   55  
A brief introduction to FSA and a ready-to-use class library
using System.IO;

namespace FSA
{

	public class RunParameters
	{
		private bool writeEcho;
		private Stream input;
		private Stream output;
		private IOMode readerMode;
		private IOMode writerMode;

		public Stream Input
		{
			get { return input; }
			set { input = value; }
		}

		public Stream Output
		{
			get { return output; }
			set { output = value; }
		}

		//public Stream Echo
		//{
		//    get { return echo; }
		//    set { echo = value; }
		//}

		public IOMode ReaderMode
		{
			get { return readerMode; }
			set { readerMode = value; }
		}

		public IOMode WriterMode
		{
			get { return writerMode; }
			set { writerMode = value; }
		}

		public bool WriteEcho
		{
			get { return writeEcho; }
			set { writeEcho = value; }
		}

		public enum IOMode
		{
			Char, Int32, Byte
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Poland Poland
My name is Jacek. Currently, I am a Java/kotlin developer. I like C# and Monthy Python's sense of humour.

Comments and Discussions