#ifndef RANGE_H
#define RANGE_H

#include "global.h"

/**
* This class represents <MIN> and <MAX> element inside <VALUES> element.  
*
* Range consists of value and inclusive flag.
*/
//Date created - 05 May 2002

class Range {

	public:
		/**
		* Default Constructor
		*/
		Range();

		//Range(char * rangevalue, bool inclusive);

		/**
		* Destructor
		*/
		~Range();

		/**
		* Assignment operator overloaded.
		*/
		Range operator=(const Range &o);

		/**
		* Copy Constructor
		*/
		Range(const Range &o);

		int setValue(char * rangeValue, int * status);
		int setPCData(char * pcdata, int * status);
		int setInclusiveFlag(bool inclusive, int * status);

		/**
		* Gets the 'value'
		*/
		int getValue(char * &rangevalue, int * status);

		/**
		* Gets 'false' if inclusive is 'no', true otherwise. 
		*/
		int isInclusive(bool &inclusive, int * status);		

		/**
		* Gets the PCDATA. 
		*/
		int Range::getPCData(char * &pcdata, int * status);
	
	private: 
		char * m_rangeValue;
		bool m_inclusive;
		char * m_pcdata;

		void cleanup();
		void makecopy(const Range &r);
		void init(void);

};

#endif