#include <BALL/VIEW/DATATYPE/colorUnitHue.h>
Public Member Functions | |
Constructors | |
| ColorUnitHue () | |
| ColorUnitHue (const ColorUnitHue &colcor_h_unit) | |
| ColorUnitHue (const char *value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) | |
| ColorUnitHue (const String &value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) | |
| ColorUnitHue (const short value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const unsigned short value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const int value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const unsigned int value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const long value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const unsigned long value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const float value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const double value) throw (Exception::InvalidRange) | |
| ColorUnitHue (const long double value) throw (Exception::InvalidRange) | |
Destructors | |
| virtual | ~ColorUnitHue () |
| virtual void | clear () |
Converters | |
| operator String () const | |
| operator short () const | |
| operator unsigned short () const | |
| operator int () const | |
| operator unsigned int () const | |
| operator long () const | |
| operator unsigned long () const | |
| operator float () const | |
| operator double () const | |
| operator long double () const | |
Assignment methods | |
| void | set (const ColorUnitHue &color_unit_hue) |
| const ColorUnitHue & | operator= (const ColorUnitHue &color_unit_hue) |
| void | swap (ColorUnitHue &color_unit_hue) |
| void | set (const char *value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
| const ColorUnitHue & | operator= (const char *value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
| void | get (char *value) const |
| void | set (const String &value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
| const ColorUnitHue & | operator= (const String &value) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
| void | get (String &value) const |
| void | set (const short value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const short value) throw (Exception::InvalidRange) |
| void | get (short &value) const |
| void | set (const unsigned short value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const unsigned short value) throw (Exception::InvalidRange) |
| void | get (unsigned short &value) const |
| void | set (const int value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const int value) throw (Exception::InvalidRange) |
| void | get (int &value) const |
| void | set (const unsigned int value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const unsigned int value) throw (Exception::InvalidRange) |
| void | get (unsigned int &value) const |
| void | set (const long value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const long value) throw (Exception::InvalidRange) |
| void | get (long &value) const |
| void | set (const unsigned long value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const unsigned long value) throw (Exception::InvalidRange) |
| void | get (unsigned long &value) const |
| void | set (const float value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const float init) throw (Exception::InvalidRange) |
| void | get (float &value) const |
| void | set (const double value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const double value) throw (Exception::InvalidRange) |
| void | get (double &value) const |
| void | set (const long double value) throw (Exception::InvalidRange) |
| const ColorUnitHue & | operator= (const long double value) throw (Exception::InvalidRange) |
| void | get (long double &value) const |
Predicates | |
| bool | operator== (const ColorUnitHue &color_unit_hue) const |
| bool | operator!= (const ColorUnitHue &color_unit_hue) const |
| bool | operator< (const ColorUnitHue &color_unit_hue) const |
| bool | operator<= (const ColorUnitHue &color_unit_hue) const |
| bool | operator> (const ColorUnitHue &color_unit_hue) const |
| bool | operator>= (const ColorUnitHue &color_unit_hue) const |
debuggers and diagnostics | |
| virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Private Member Functions | |
| float | hexToFloat_ (const char *string) throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Private Attributes | |
| float | value_ |
Friends | |
Storers | |
| std::istream & | operator>> (std::istream &s, ColorUnitHue &color_unit_hue) |
| std::ostream & | operator<< (std::ostream &s, const ColorUnitHue &color_unit_hue) |
Value for the hue component of the class ColorHSV. The class handles the many possible variations a hue value can be set (e.g. integer, float, string values can be given as parameter). The integer values are of range 0-360, the float values are of range 0-1.0 and the strings are given in hex format "000"-"168" for the values 0-360. ColorUnitHue provides certain conversion functions as well that will convert its value to the needed type.
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | ) |
Default Constructor.
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const ColorUnitHue & | colcor_h_unit | ) |
Copy constructor.
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const char * | value | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Constructor with Parameter char*.
| value | the pointer to a string ( 00 - 168h) |
| InvalidRange | if string length > 3 | |
| NotInHexFormat | if string contains characters g-z or G-Z or the hex number exceeds 168h |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const String & | value | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Constructor with Parameter String.
| InvalidRange | if string length > 3 | |
| NotInHexFormat | if string contains characters g-z or G-Z or the hex number exceeds 168h |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const short | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter short.
| value | a short value ( 0 - 360) |
| InvalidRange | if value < 0 || value > 360 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const unsigned short | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter unsigned short.
| value | a unsigned short value ( 0 - 360) |
| InvalidRange | if value > 360 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const int | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter int.
| value | an int value ( 0 - 360) |
| InvalidRange | if value < 0 || value > 360 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const unsigned int | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter unsigned int.
| value | an unsigned int value ( 0 - 360) |
| InvalidRange | if value > 360 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const long | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter long.
| value | an long value ( 0 - 360) |
| InvalidRange | if value < 0 || value > 360 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const unsigned long | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter unsigned long.
| value | an unsigned long value ( 0 - 360) |
| InvalidRange | if value > 360 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const float | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter float.
| value | a float value ( 0 - 1.0) |
| InvalidRange | if value < 0.0 || value > 1.0 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const double | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter double.
| value | a double value ( 0 - 1.0) |
| InvalidRange | if value < 0.0 || value > 1.0 |
| BALL::VIEW::ColorUnitHue::ColorUnitHue | ( | const long double | value | ) | throw (Exception::InvalidRange) |
Constructor with Parameter long double.
| value | a long double value ( 0 - 1.0) |
| InvalidRange | if value < 0.0 || value > 1.0 |
| virtual BALL::VIEW::ColorUnitHue::~ColorUnitHue | ( | ) | [virtual] |
Destructor.
| virtual void BALL::VIEW::ColorUnitHue::clear | ( | ) | [virtual] |
Explicit default initialization. Sets the value to the default value (0).
| virtual void BALL::VIEW::ColorUnitHue::dump | ( | std::ostream & | s = std::cout, |
|
| Size | depth = 0 | |||
| ) | const [virtual] |
Internal value dump. Dumps the current value to the output ostream s with dumping depth depth.
| s | output stream where to output the value | |
| depth | the dumping depth (depth is irrelevant here) |
| void BALL::VIEW::ColorUnitHue::get | ( | long double & | value | ) | const |
Inspection of the value.
| value | a long double receiving the value (range: 0-1.0) |
| void BALL::VIEW::ColorUnitHue::get | ( | double & | value | ) | const |
Inspection of the value.
| value | a double receiving the value (range: 0-1.0) |
| void BALL::VIEW::ColorUnitHue::get | ( | float & | value | ) | const |
| void BALL::VIEW::ColorUnitHue::get | ( | unsigned long & | value | ) | const |
Inspection of the value.
| value | an unsigned long receiving the value (range: 0-360) |
| void BALL::VIEW::ColorUnitHue::get | ( | long & | value | ) | const |
Inspection of the value.
| value | a long receiving the value (range: 0-360) |
| void BALL::VIEW::ColorUnitHue::get | ( | unsigned int & | value | ) | const |
Inspection of the value.
| value | an unsigned int receiving the value (range: 0-360) |
| void BALL::VIEW::ColorUnitHue::get | ( | int & | value | ) | const |
Inspection of the value.
| value | an int receiving the value (range: 0-360) |
| void BALL::VIEW::ColorUnitHue::get | ( | unsigned short & | value | ) | const |
Inspection of the value.
| value | an unsigned short receiving the value (range: 0-360) |
| void BALL::VIEW::ColorUnitHue::get | ( | short & | value | ) | const |
Inspection of the value.
| value | a short receiving the value (range: 0-360) |
| void BALL::VIEW::ColorUnitHue::get | ( | String & | value | ) | const |
Inspection of the value.
| value | a string receiving the value in hex format ( "00"-"168") |
| void BALL::VIEW::ColorUnitHue::get | ( | char * | value | ) | const |
Inspection of the value. Accesses the value by using a char pointer. Memory must be allocated for this parameter. The memory must be at least the size of 4 bytes.
| value | a char* receiving the value in hex format ( "00"-"168") |
| float BALL::VIEW::ColorUnitHue::hexToFloat_ | ( | const char * | string | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) [private] |
| BALL::VIEW::ColorUnitHue::operator double | ( | ) | const |
Conversion to double.
0 - 1.0 | BALL::VIEW::ColorUnitHue::operator float | ( | ) | const |
Conversion to float.
0 - 1.0 | BALL::VIEW::ColorUnitHue::operator int | ( | ) | const |
Conversion to int.
0 - 360 | BALL::VIEW::ColorUnitHue::operator long | ( | ) | const |
Conversion to long.
0 - 360 | BALL::VIEW::ColorUnitHue::operator long double | ( | ) | const |
Conversion to long double.
0 - 1.0 | BALL::VIEW::ColorUnitHue::operator short | ( | ) | const |
Conversion to short.
0 - 360 | BALL::VIEW::ColorUnitHue::operator String | ( | ) | const |
Conversion to string.
"00"-"168" | BALL::VIEW::ColorUnitHue::operator unsigned int | ( | ) | const |
Conversion to unsigned int.
0 - 360 | BALL::VIEW::ColorUnitHue::operator unsigned long | ( | ) | const |
Conversion to unsigned long.
0 - 360 | BALL::VIEW::ColorUnitHue::operator unsigned short | ( | ) | const |
Conversion to unsigned short.
0 - 360 | bool BALL::VIEW::ColorUnitHue::operator!= | ( | const ColorUnitHue & | color_unit_hue | ) | const |
Unequality test.
| bool BALL::VIEW::ColorUnitHue::operator< | ( | const ColorUnitHue & | color_unit_hue | ) | const |
Smaller test.
| bool BALL::VIEW::ColorUnitHue::operator<= | ( | const ColorUnitHue & | color_unit_hue | ) | const |
Smaller or equal test.
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const long double | value | ) | throw (Exception::InvalidRange) |
Assignment operator with long double. Calls set.
| value | a long double containing a value of range 0-1.0 |
| InvalidRange | if value < 0.0 || value > 1.0 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const double | value | ) | throw (Exception::InvalidRange) |
Assignment operator with double. Calls set.
| value | a double containing a value of range 0-1.0 |
| InvalidRange | if value < 0.0 || value > 1.0 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const float | init | ) | throw (Exception::InvalidRange) |
Assignment operator with float. Calls set.
| init | a float containing a value of range 0-1.0 |
| InvalidRange | if value < 0.0 || value > 1.0 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const unsigned long | value | ) | throw (Exception::InvalidRange) |
Assignment operator with unsigned long. Calls set.
| value | an unsigned long containing a value of range 0-360 |
| InvalidRange | if value > 360 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const long | value | ) | throw (Exception::InvalidRange) |
Assignment operator with long. Calls set.
| value | a long containing a value of range 0-360 |
| InvalidRange | if value < 0 || value > 360 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const unsigned int | value | ) | throw (Exception::InvalidRange) |
Assignment operator with unsigned int. Calls set.
| value | an unsigned int containing a value of range 0-360 |
| InvalidRange | if value > 360 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const int | value | ) | throw (Exception::InvalidRange) |
Assignment operator with int. Calls set.
| value | an int containing a value of range 0-360 |
| InvalidRange | if value < 0 || value > 360 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const unsigned short | value | ) | throw (Exception::InvalidRange) |
Assignment operator with unsigned short. Calls set.
| value | an unsigned short containing a value of range 0-360 |
| InvalidRange | if value > 360 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const short | value | ) | throw (Exception::InvalidRange) |
Assignment operator with short. Calls set.
| value | a short containing a value of range 0-360 |
| InvalidRange | if value < 0 || value > 360 |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const String & | value | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Assignment operator with string. Calls set.
| value | a string containing a value in hex format ( "00"-"168") |
| InvalidRange | if string length > 3 | |
| NotInHexFormat | if string contains characters g-z or G-Z or the hex number exceeds 168h |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const char * | value | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Assignment operator with char*. Calls set.
| value | the pointer to a string containing a value in hex format ( "00"-"168") |
| InvalidRange | if string length > 3 | |
| NotInHexFormat | if string contains characters g-z or G-Z or the hex number exceeds 168h |
| const ColorUnitHue& BALL::VIEW::ColorUnitHue::operator= | ( | const ColorUnitHue & | color_unit_hue | ) |
Assignment operator.
| bool BALL::VIEW::ColorUnitHue::operator== | ( | const ColorUnitHue & | color_unit_hue | ) | const |
Equality test.
| bool BALL::VIEW::ColorUnitHue::operator> | ( | const ColorUnitHue & | color_unit_hue | ) | const |
Greater test.
| bool BALL::VIEW::ColorUnitHue::operator>= | ( | const ColorUnitHue & | color_unit_hue | ) | const |
Greater or equal test.
| void BALL::VIEW::ColorUnitHue::set | ( | const long double | value | ) | throw (Exception::InvalidRange) |
Changes the value.
| value | a long double of range 0-1.0 |
| InvalidRange | if value < 0.0 || value > 1.0 |
| void BALL::VIEW::ColorUnitHue::set | ( | const double | value | ) | throw (Exception::InvalidRange) |
Changes the value.
| value | a double of range 0-1.0 |
| InvalidRange | if value < 0.0 || value > 1.0 |
| void BALL::VIEW::ColorUnitHue::set | ( | const float | value | ) | throw (Exception::InvalidRange) |
Changes the value.
| value | a float of range 0-1.0 |
| InvalidRange | if value < 0.0 || value > 1.0 |
| void BALL::VIEW::ColorUnitHue::set | ( | const unsigned long | value | ) | throw (Exception::InvalidRange) |
Changes the value.
| value | an unsigned long of range 0-360 |
| InvalidRange | if value > 360 |
| void BALL::VIEW::ColorUnitHue::set | ( | const long | value | ) | throw (Exception::InvalidRange) |
Changes the value.
| value | a long of range 0-360 |
| InvalidRange | if value < 0 || value > 360 |
| void BALL::VIEW::ColorUnitHue::set | ( | const unsigned int | value | ) | throw (Exception::InvalidRange) |
Changes the value.
| value | an unsigned int of range 0-360 |
| InvalidRange | if value > 360 |
| void BALL::VIEW::ColorUnitHue::set | ( | const int | value | ) | throw (Exception::InvalidRange) |
Changes the value .
| value | an int of range 0-360 |
| InvalidRange | if value < 0 || value > 360 |
| void BALL::VIEW::ColorUnitHue::set | ( | const unsigned short | value | ) | throw (Exception::InvalidRange) |
Changes the value .
| value | an unsigned short of range 0-360 |
| InvalidRange | if value > 360 |
| void BALL::VIEW::ColorUnitHue::set | ( | const short | value | ) | throw (Exception::InvalidRange) |
Changes the value .
| value | a short of range 0-360 |
| InvalidRange | if value < 0 || value > 360 |
| void BALL::VIEW::ColorUnitHue::set | ( | const String & | value | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Changes the value .
| value | a string (in the hex format "00"-"168") |
| InvalidRange | if string length > 3 | |
| NotInHexFormat | if string contains characters g-z or G-Z or the hex number exceeds 168h |
| void BALL::VIEW::ColorUnitHue::set | ( | const char * | value | ) | throw (Exception::InvalidRange, ColorUnit::NotInHexFormat) |
Changes the value to the value represented by a pointer value to a string.
| value | the new value (a string in the format "00"-"168") |
| InvalidRange | if string length > 3 | |
| NotInHexFormat | if string contains characters g-z or G-Z or the hex number exceeds 168h |
| void BALL::VIEW::ColorUnitHue::set | ( | const ColorUnitHue & | color_unit_hue | ) |
Assignment.
| void BALL::VIEW::ColorUnitHue::swap | ( | ColorUnitHue & | color_unit_hue | ) |
Swapping of colorUnitHues.
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const ColorUnitHue & | color_unit_hue | |||
| ) | [friend] |
Friend stream output. Writes colorUnitHue data to the output stream s and store the value of this. The value will be stored in integer format of range 0-360. This method is provided for convienience.
| s | output stream to where the value will be stored | |
| color_unit_hue | the colorUnitHue from which the value will be stored |
| std::istream& operator>> | ( | std::istream & | s, | |
| ColorUnitHue & | color_unit_hue | |||
| ) | [friend] |
Friend stream input. Reads colorUnitHue data from the input stream s and restore the value of this. The value will be needed in integer format of range 0-360. This method is provided for convienience.
| s | input stream from where to restore the value | |
| color_unit_hue | the colorUnitHue to which the value will be restored |
float BALL::VIEW::ColorUnitHue::value_ [private] |