Skip to content
Snippets Groups Projects
Select Git revision
  • 9dcc1f05926e880b98932d4a1d4a3401ee96ae4d
  • master default protected
  • fix-words-ann
  • wccl-rules-migration
  • develop
5 results

position.h

Blame
  • position.h 705 B
    #ifndef LIBWCCL_VALUES_POSITION_H
    #define LIBWCCL_VALUES_POSITION_H
    
    #include <libwccl/values/value.h>
    #include <cstdlib>
    #include <boost/integer_traits.hpp>
    
    namespace Wccl {
    
    class Position : public Value
    {
    public:
    	WCCL_VALUE_PREAMBLE
    
    	explicit Position(int v = 0)
    		: val_(v)
    	{
    	}
    
    	static const int Nowhere = boost::integer_traits<int>::const_min;
    	static const int Begin = boost::integer_traits<int>::const_min + 1;
    	static const int End = boost::integer_traits<int>::const_max;
    
    	int get_value() const {
    		return val_;
    	}
    
    	void set_value(int v) {
    		val_ = v;
    	}
    
    	/// Value override
    	std::string to_raw_string() const;
    
    private:
    	int val_;
    };
    
    
    } /* end ns Wccl */
    
    #endif // LIBWCCL_POSITION_H