Loading...
Searching...
No Matches
colorUnit.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_DATATYPE_COLORUNIT_H
#define BALL_VIEW_DATATYPE_COLORUNIT_H
#include <BALL/common.h>
#include <BALL/DATATYPE/string.h>
#include <BALL/MATHS/common.h>
#include <iostream>
#include <cstdio>
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT ColorUnit
{
public:
//BALL_CREATE(ColorUnit)
class BALL_VIEW_EXPORT NotInHexFormat: public Exception::GeneralException
{
public:
NotInHexFormat(const char* file, int line, const string& data);
};
ColorUnit();
ColorUnit(const ColorUnit& color_unit);
ColorUnit(const char* value);
ColorUnit(const String& value);
ColorUnit(const unsigned char value);
ColorUnit(const short value);
ColorUnit(const unsigned short value);
ColorUnit(const int value);
ColorUnit(const unsigned int value);
ColorUnit(const long value);
ColorUnit(const unsigned long value);
ColorUnit(const float value);
ColorUnit(const double value);
~ColorUnit();
void clear();
operator String () const;
operator char () const;
operator unsigned char () 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;
void set(const ColorUnit& color_unit);
const ColorUnit& operator = (const ColorUnit& color_unit);
void swap(ColorUnit& color_unit);
void set(const char* value);
const ColorUnit& operator = (const char* value);
void get(char* value) const;
void set(const String& value);
const ColorUnit& operator = (const String& value);
void get(String& value) const;
void set(const unsigned char value);
const ColorUnit& operator = (const unsigned char value);
void get(unsigned char& value) const;
void set(const short value);
const ColorUnit& operator = (const short value);
void get(short& value) const;
void set(const unsigned short value);
const ColorUnit& operator = (const unsigned short value);
void get(unsigned short& value) const;
void set(const int value);
const ColorUnit& operator = (const int value);
void get(int& value) const;
void set(const unsigned int value);
const ColorUnit& operator = (const unsigned int value);
void get(unsigned int& value) const;
void set(const long value);
const ColorUnit& operator = (const long value);
void get(long& value) const;
void set(const unsigned long value);
const ColorUnit& operator = (const unsigned long value);
void get(unsigned long& value) const;
void set(const float value);
const ColorUnit& operator = (const float value);
void get(float& value) const;
void set(const double value);
const ColorUnit& operator = (const double value);
void get(double& value) const;
bool operator == (const ColorUnit& color_unit) const;
bool operator != (const ColorUnit& color_unit) const;
bool operator < (const ColorUnit& color_unit) const;
bool operator <= (const ColorUnit& color_unit) const;
bool operator > (const ColorUnit& color_unit) const;
bool operator >= (const ColorUnit& color_unit) const;
void dump(std::ostream& s = std::cout, Size depth = 0) const;
friend std::istream& operator >> (std::istream& s, ColorUnit& color_unit);
friend std::ostream& operator << (std::ostream& s, const ColorUnit& color_unit);
private:
// @throws Exception::InvalidRange
// @throws Exception::NotInHexFormat
float hexToFloat_(const char* value);
float value_;
};
# ifndef BALL_NO_INLINE_FUNCTIONS
# include <BALL/VIEW/DATATYPE/colorUnit.iC>
# endif
} // namespace VIEW
} // namespace BALL
#endif // BALL_VIEW_DATATYPE_COLORUNIT_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
common.h
BALL::Exception::GeneralException
Definition COMMON/exception.h:61
BALL::String
Definition string.h:57
BALL::VIEW::ColorUnit::NotInHexFormat::NotInHexFormat
NotInHexFormat(const char *file, int line, const string &data)
BALL::VIEW::ColorUnit::get
void get(unsigned int &value) const
BALL::VIEW::ColorUnit::get
void get(long &value) const
BALL::VIEW::ColorUnit::set
void set(const int value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const float value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const char *value)
BALL::VIEW::ColorUnit::swap
void swap(ColorUnit &color_unit)
BALL::VIEW::ColorUnit::set
void set(const char *value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit()
BALL::VIEW::ColorUnit::get
void get(unsigned char &value) const
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const short value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const unsigned char value)
BALL::VIEW::ColorUnit::get
void get(unsigned long &value) const
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const unsigned long value)
BALL::VIEW::ColorUnit::clear
void clear()
BALL::VIEW::ColorUnit::set
void set(const double value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const unsigned short value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const unsigned int value)
BALL::VIEW::ColorUnit::set
void set(const unsigned long value)
BALL::VIEW::ColorUnit::set
void set(const unsigned char value)
BALL::VIEW::ColorUnit::set
void set(const long value)
BALL::VIEW::ColorUnit::set
void set(const unsigned short value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const long value)
BALL::VIEW::ColorUnit::get
void get(double &value) const
BALL::VIEW::ColorUnit::get
void get(unsigned short &value) const
BALL::VIEW::ColorUnit::dump
void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::VIEW::ColorUnit::set
void set(const String &value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const double value)
BALL::VIEW::ColorUnit::get
void get(int &value) const
BALL::VIEW::ColorUnit::set
void set(const float value)
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const ColorUnit &color_unit)
BALL::VIEW::ColorUnit::~ColorUnit
~ColorUnit()
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const String &value)
BALL::VIEW::ColorUnit::get
void get(String &value) const
BALL::VIEW::ColorUnit::set
void set(const ColorUnit &color_unit)
BALL::VIEW::ColorUnit::get
void get(char *value) const
BALL::VIEW::ColorUnit::ColorUnit
ColorUnit(const int value)
BALL::VIEW::ColorUnit::get
void get(float &value) const
BALL::VIEW::ColorUnit::set
void set(const short value)
BALL::VIEW::ColorUnit::set
void set(const unsigned int value)
BALL::VIEW::ColorUnit::get
void get(short &value) const
double
common.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
string.h