BALL 1.5.0
Loading...
Searching...
No Matches
colorUnitHue.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; -*-
2// vi: set ts=2:
3//
4
5#ifndef BALL_VIEW_DATATYPE_COLORUNITHUE_H
6#define BALL_VIEW_DATATYPE_COLORUNITHUE_H
7
8#include <BALL/common.h>
10#include <BALL/MATHS/common.h>
12
13#include <iostream>
14#include <cstdio>
15
16namespace BALL
17{
18 namespace VIEW
19 {
30 {
31 public:
32
34
35
38
39
42
45 ColorUnitHue(const ColorUnitHue& colcor_h_unit);
46
52 ColorUnitHue(const char* value);
53
58 ColorUnitHue(const String& value);
59
64 ColorUnitHue(const short value);
65
70 ColorUnitHue(const unsigned short value);
71
76 ColorUnitHue(const int value);
77
82 ColorUnitHue(const unsigned int value);
83
88 ColorUnitHue(const long value);
89
94 ColorUnitHue(const unsigned long value);
95
100 ColorUnitHue(const float value);
101
106 ColorUnitHue(const double value);
107
112 ColorUnitHue(const long double value);
113
115
117
120 virtual ~ColorUnitHue();
121
125 virtual void clear();
126
128
131
135 operator String () const;
136
140 operator short () const;
141
145 operator unsigned short () const;
146
150 operator int () const;
151
155 operator unsigned int () const;
156
160 operator long () const;
161
165 operator unsigned long () const;
166
170 operator float () const;
171
175 operator double () const;
176
180 operator long double () const;
181
183
186
189 void set(const ColorUnitHue& color_unit_hue);
190
193 const ColorUnitHue& operator = (const ColorUnitHue& color_unit_hue);
194
197 void swap(ColorUnitHue& color_unit_hue);
198
205 void set(const char* value);
206
213 const ColorUnitHue& operator = (const char* value);
214
221 void get(char* value) const;
222
228 void set(const String& value);
229
236 const ColorUnitHue& operator = (const String& value);
237
242 void get(String& value) const;
243
248 void set(const short value);
249
255 const ColorUnitHue& operator = (const short value);
256
260 void get(short& value) const;
261
266 void set(const unsigned short value);
267
273 const ColorUnitHue& operator = (const unsigned short value);
274
278 void get(unsigned short& value) const;
279
284 void set(const int value);
285
291 const ColorUnitHue& operator = (const int value);
292
296 void get(int& value) const;
297
302 void set(const unsigned int value);
303
309 const ColorUnitHue& operator = (const unsigned int value);
310
314 void get(unsigned int& value) const;
315
320 void set(const long value);
321
327 const ColorUnitHue& operator = (const long value);
328
332 void get(long& value) const;
333
338 void set(const unsigned long value);
339
345 const ColorUnitHue& operator = (const unsigned long value);
346
350 void get(unsigned long& value) const;
351
356 void set(const float value);
357
363 const ColorUnitHue& operator = (const float init);
364
369 void get(float& value) const;
370
375 void set(const double value);
376
382 const ColorUnitHue& operator = (const double value);
383
387 void get(double& value) const;
388
393 void set(const long double value);
394
400 const ColorUnitHue& operator = (const long double value);
401
405 void get(long double& value) const;
406
408
411
414 bool operator == (const ColorUnitHue& color_unit_hue) const;
415
418 bool operator != (const ColorUnitHue& color_unit_hue) const;
419
422 bool operator < (const ColorUnitHue& color_unit_hue) const;
423
426 bool operator <= (const ColorUnitHue& color_unit_hue) const;
427
430 bool operator > (const ColorUnitHue& color_unit_hue) const;
431
434 bool operator >= (const ColorUnitHue& color_unit_hue) const;
435
437
440
447 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
448
450
453
461 friend std::istream& operator >> (std::istream& s, ColorUnitHue& color_unit_hue);
462
470 friend std::ostream& operator << (std::ostream& s, const ColorUnitHue& color_unit_hue);
472
473 private:
474
475 // @throw Exception::InvalidRange
476 // @throw Exception::NotInHexFormat
477 float hexToFloat_(const char* string);
478
479 float value_;
480 };
481
482# ifndef BALL_NO_INLINE_FUNCTIONS
483# include <BALL/VIEW/DATATYPE/colorUnitHue.iC>
484# endif
485
486 } // namspace VIEW
487} // namespace BALL
488
489#endif // BALL_VIEW_DATATYPE_COLORUNITHUE_H
#define BALL_CREATE(name)
Definition create.h:62
STL namespace.
#define BALL_VIEW_EXPORT