#ifndef _COMMON_CHARRANGE_HPP_
#define _COMMON_CHARRANGE_HPP_
#ifndef _COMMON_RICHED_HPP_
#include <common/riched.hpp>
#endif

class CharRange : private CHARRANGE
{
public:
  CharRange(void);
	CharRange(const CharRange &charRange);
	CharRange(LONG posMin,LONG posMax);
	virtual ~CharRange();
	CharRange &operator=(const CharRange &charRange);
	BOOL operator==(const CharRange &charRange);
	CHARRANGE &charRange(void);
	LONG posMin(void)const;
	void posMin(LONG posMin);
	LONG posMax(void)const;
	void posMax(LONG posMax);
private:
};

inline
CharRange::CharRange(void)
{
  CHARRANGE::cpMin=0;
	CHARRANGE::cpMax=0;
}

inline
CharRange::CharRange(const CharRange &charRange)
{
  *this=charRange;
}

inline
CharRange::CharRange(LONG posMin,LONG posMax)
{
  CHARRANGE::cpMin=posMin;
	CHARRANGE::cpMax=posMax;
}

inline
CharRange::~CharRange()
{
}

inline
CharRange &CharRange::operator=(const CharRange &charRange)
{
  posMin(charRange.posMin());
	posMax(charRange.posMax());
	return *this;
}

inline
BOOL CharRange::operator==(const CharRange &charRange)
{
  return (posMin()==charRange.posMin()&&
	        posMax()==charRange.posMax());
}

inline
CHARRANGE &CharRange::charRange(void)
{
  return *this;
}

inline
LONG CharRange::posMin(void)const
{
  return CHARRANGE::cpMin;
}

inline
void CharRange::posMin(LONG posMin)
{
  CHARRANGE::cpMin=posMin;
}

inline
LONG CharRange::posMax(void)const
{
  return CHARRANGE::cpMax;
}

inline
void CharRange::posMax(LONG posMax)
{
  CHARRANGE::cpMax=posMax;
}
#endif
