#include <at_gray_code.h>
Public Types | |
| typedef T | value_type |
| enum | ArgType { is_gray, is_binary } |
Public Methods | |
| operator value_type () const throw () | |
| value_type | getbin () const throw () |
| value_type | getgray () const throw () |
| void | setgray (value_type value) throw () |
| gray_code (const T &i_value, ArgType i_arg_type) | |
| gray_code (const T &i_value) | |
| template<typename RHS_T> | gray_code (const gray_code< RHS_T > &i_other_gray) |
| template<typename RHS_T> gray_code & | operator= (const RHS_T &i_other_gray) |
| bool | gtez () |
| bool | equal_to_zero () |
Protected Attributes | |
| value_type | m_value |
Friends | |
| class | gray_code |
|
|||||
|
|
|
|||||
|
Allow construction of a gray code without any conversion. |
|
||||||||||||||||
|
gray_code constructor from a either a binary value or a binary form of a gray code. To construct a gray_code object with a gray_code value, then do the following:
gray_code( 0x234235, gray_code::is_gray )
To construct a gray_code object with a binary value then:
gray_code( 555, gray_code::is_binary )
or
gray_code( 555 ) // implicit conversions allowed.
*
|
|
||||||||||
|
gray_code constructor from a regular binary value.
|
|
||||||||||||||
|
Construct a gray_code from another gray code of different type.
|
|
|||||||||
|
Since there is not much meaning in compareing gray codes, other than special things like being equal to zero or sign, this is an efficient method for doing this. This method compares for equal to zero. |
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
Since there is not much meaning in compareing gray codes, other than special things like being equal to zero or sign, this is an efficient method for doing this. This method compares for "greater than or equal to zero". This is allways true for unsigned values. |
|
|||||||||
|
conversion operator for a gray_code to a regular binary number. |
|
||||||||||||||
|
Assign a gray_code from a gray code of a different type.
|
|
||||||||||
|
|
|
|||||
|
|
|
|||||
|
|
Generated for Austria by
and
MakeXS at Sun Oct 24 17:35:34 PDT 2004