/******************************************************************************
 * MarkData.cs 
 * 
 * <Copyright and License> 
 * 
 * This file is part of GODS, a package for annotating medical images. 
 * 
 * Copyright (C) 2004 
 * Xuedong Chen 
 * Heri Mariwa 
 * Kimmy (Hsiang-ling) Lin 
 * Rui Yu 
 * 
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License 
 * as published by the Free Software Foundation; either version 2 
 * of the License, or (at your option) any later version. 
 * 
 * This program is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details. 
 * 
 * You should have received a copy of the GNU General Public License 
 * along with this program; if not, write to the Free Software 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
 *  
 * For further questions about this file, please send email to 
 * gods@cs.umb.edu or visit us at http://gods.sourceforge.net.  
 ******************************************************************************/

using System;
using System.Collections;

namespace GODS.DBHandler
{
	/// <summary>
	/// Summary description for MarkData.
	/// </summary>
	public class MarkData
	{
		public int MarkID;
		public string MarkName;
		public int MarkSetID;
		public string Group;
		public string Description;
		public int ImageHeight;
		public int ImageWidth;
		public string ImagePath;
		public bool IsSingleton;
		public ArrayList ValueList;

		public MarkData(int id, string name, int msID, string groupName, 
			string desc, int width, int height, string imgPath, bool isSingleton,
			ArrayList valueList)
		{
			this.MarkID = id;
			this.MarkName = name;
			this.MarkSetID = msID;
			this.Group = groupName;
			this.Description = desc;
			this.ImageHeight = height;
			this.ImageWidth = width;
			this.ImagePath = imgPath;
			this.IsSingleton = isSingleton;
			this.ValueList = valueList;
		}

		public bool Equals(MarkData markData)
		{	
			return (this.MarkID==markData.MarkID &&
				this.MarkName == markData.MarkName &&
				this.MarkSetID == markData.MarkSetID &&
				this.Group == markData.Group &&
				this.Description == markData.Description &&
				this.ImagePath == markData.ImagePath &&
				this.ImageWidth == markData.ImageWidth &&
				this.ImageHeight == markData.ImageHeight &&
				this.IsSingleton == markData.IsSingleton &&
				IsSameValueList(markData.ValueList)
				);
		}

		private bool IsSameValueList(ArrayList valueList)
		{
			if(this.ValueList.Count == valueList.Count) return true;
			return false;
		}
	}
}
