using System;
using System.Data;

namespace FactorsNamespace
{
	//!! TODO: append comments
	//!! TODO: add type of Bd factors. and write converting
	// to it in "compile" calc factors

	public class FutureDBFactor : FutureFactor
	{
		/// <summary>
		/// specifies name in database for this factor
		/// </summary>
		private String dbName;

		public String DBName
		{
			get { return dbName; }
			set { dbName = value; }
		}

		/// <summary>
		/// dummy for GetFactorValue
		/// not used
		/// </summary>
		/// <param name="row"></param>
		private void GetValueRealisation(DataRow row)
		{
		}

		#region constructors

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="name"></param>
		/// <param name="NameInDB"></param>
		public FutureDBFactor(String name, String NameInDB)
			: base(name, null)
		{
			this.dbName = NameInDB;

		}

		/// <summary>
		/// Another constructor
		/// </summary>
		/// <param name="name"></param>
		/// <param name="function"></param>
		/// <param name="nameInDB"></param>
		public FutureDBFactor(String name, GetFactorValueDelegate function, String nameInDB)
			: base(name, function)
		{
			this.dbName = nameInDB;
		}
		#endregion
	}
}