36 #define G_INT "GSkyPixel::operator int()"
37 #define G_DOUBLE "GSkyPixel::operator double()"
183 if (
this != &pixel) {
208 GSkyPixel::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);
233 GSkyPixel::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.";
GSkyPixel & operator=(const GSkyPixel &pixel)
Assignment operator.
std::string print(const GChatter &chatter=NORMAL) const
Print pixel.
void free_members(void)
Delete class members.
bool is_1D(void) const
Check if pixel is 1D.
int m_size
Pixel dimension (0=undefined, 1=1D, 2=2D)
GSkyPixel * clone(void) const
Clone sky map pixel.
void init_members(void)
Initialise class members.
virtual ~GSkyPixel(void)
Destructor.
void clear(void)
Clear instance.
const double & index(void) const
Return sky map pixel index.
void copy_members(const GSkyPixel &pixel)
Copy class members.
const double & x(void) const
Return x value of sky map pixel.
Exception handler interface definition.
GSkyPixel(void)
Void constructor.
bool is_2D(void) const
Check if pixel is 2D.
Sky map pixel class definition.
const double & y(void) const
Return y value of sky pixel.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.