﻿package com.adobe.captivate.widgets
{
	/**
		* This class describes the properties of the question object associated with the widget.
		
		* @see CPMovieHandle#getQuestionData
	*/
	public class CPQuestionData
	{
		/**
     		* @private
     	*/

     	public static const QUESTION_NOT_IN_QUIZ:int = -1;
     	public static const INFINITE_ATTEMPTS:uint = 0;

		public function CPQuestionData(aQuestionNumInQuiz :int = QUESTION_NOT_IN_QUIZ, aWeightage:int=0,aAttempts = INFINITE_ATTEMPTS,aTries = 0)
		{
			this._questionNumInQuiz = aQuestionNumInQuiz;
			this._weightage = aWeightage;
			this._attempts = aAttempts;
			this._tries = aTries;
		}
		/**
     		* @private
     	*/
		private var _questionNumInQuiz:int;
		/**
     		* @private
     	*/
		private var _weightage:uint;

		/**
     		* @private
     	*/
		private var _attempts:uint;
		
		/**
     		* @private
     	*/
		private var _tries:uint;
		
		/**
     		* * This function returns the question number assigned to the widget. 
     		* A value of QUESTION_NOT_IN_QUIZ indicates it is not present in the quiz
			* @return An integer indicating the question number assigned to the widget.
		*/
		public function get questionNumInQuiz():int
		{ 
			return _questionNumInQuiz;
		}
		
		/**
     		* This function returns the points assigned to the widget.
			* @return An unsigned integer indicating the points assigned to the widget 
		*/
		public function get weightage():uint
		{ 
			return _weightage;
		}

		/**
     		* * This function returns the question number assigned to the widget. 
     		* A value of INFINITE_ATTEMPTS indicates it is not present in the quiz
			* @return An integer indicating the question number assigned to the widget.
		*/
		public function get attempts():uint
		{ 
			return _attempts;
		}
		
		/**
     		* This function returns the number of times the user has attempted the question
			* @return An unsigned integer indicating the number of times the user has attempted the question
		*/
		public function get numTries():uint
		{
			return _tries;
		}
	}
}
