/*

cls_2: Curl Like Syntax
Yauheni A. Akhotnikau (C) 2001-2003
eao197@yahoo.com
-------------------------------------------------

Permission is granted to anyone to use this software for any purpose on any
computer system, and to redistribute it freely, subject to the following
restrictions:

1. This software 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.

2. The origin of this software must not be misrepresented, either by
   explicit claim or by omission.

3. Altered versions must be plainly marked as such, and must not be
   misrepresented as being the original software.

-------------------------------------------------

*/
#if !defined( _CLS_2__SCALAR__CONSTRAINT_HPP_ )
#define _CLS_2__SCALAR__CONSTRAINT_HPP_

#include <cls_2/h/cls.hpp>

namespace cls_2 {

//
// scalar_constraint_t
//

/*
	Base class for scalar (single) values constraints
*/
template< class T >
class	scalar_constraint_t {
	public :
		scalar_constraint_t() {
		}
		virtual ~scalar_constraint_t() {
		}

		// Must return c_ok if everything Ok
		virtual int
		check(
			parser_context_t & context,
			const T & value ) = 0;
};


} /* namespace cls_2 */

#endif
