36#define G_INT "GSkyPixel::operator int()"
37#define G_DOUBLE "GSkyPixel::operator double()"
183 if (
this != &pixel) {
208GSkyPixel::operator int()
const
212 std::string msg =
"Sky map pixel is not 1-dimensional.\n"
213 "Conversion from GSkyPixel to int is only allowed"
214 " for 1-dimensional sky map pixels.";
219 int value = int(m_x + 0.5);
233GSkyPixel::operator double()
const
237 std::string msg =
"Sky map pixel is not 1-dimensional.\n"
238 "Conversion from GSkyPixel to double is only allowed"
239 " for 1-dimensional sky map pixels.";
Exception handler interface definition.
Sky map pixel class definition.
void copy_members(const GSkyPixel &pixel)
Copy class members.
int m_size
Pixel dimension (0=undefined, 1=1D, 2=2D)
void free_members(void)
Delete class members.
GSkyPixel & operator=(const GSkyPixel &pixel)
Assignment operator.
std::string print(const GChatter &chatter=NORMAL) const
Print pixel.
const double & y(void) const
Return y value of sky pixel.
GSkyPixel * clone(void) const
Clone sky map pixel.
bool is_1D(void) const
Check if pixel is 1D.
bool is_2D(void) const
Check if pixel is 2D.
void clear(void)
Clear instance.
const double & x(void) const
Return x value of sky map pixel.
void init_members(void)
Initialise class members.
const double & index(void) const
Return sky map pixel index.
virtual ~GSkyPixel(void)
Destructor.
GSkyPixel(void)
Void constructor.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.