Initial
This commit is contained in:
94
proto/source/deltapos.hpp
Normal file
94
proto/source/deltapos.hpp
Normal file
@@ -0,0 +1,94 @@
|
||||
#ifndef _PROTO_DELTAPOS_HPP_
|
||||
#define _PROTO_DELTAPOS_HPP_
|
||||
#ifndef _REMOTEPSAPP_RGB888_HPP_
|
||||
#include <proto/rgb888.hpp>
|
||||
#endif
|
||||
|
||||
class DeltaPos
|
||||
{
|
||||
public:
|
||||
DeltaPos(void);
|
||||
DeltaPos(const DeltaPos &someDeltaPos);
|
||||
DeltaPos(int row,int col,const RGB888 &color);
|
||||
~DeltaPos(); // destructor cannot be virtual
|
||||
DeltaPos &operator=(const DeltaPos &someDeltaPos);
|
||||
const RGB888 &color(void)const;
|
||||
void color(const RGB888 &color);
|
||||
int row(void)const;
|
||||
void row(int row);
|
||||
int col(void)const;
|
||||
void col(int col);
|
||||
private:
|
||||
RGB888 mColor;
|
||||
int mRow;
|
||||
int mCol;
|
||||
};
|
||||
|
||||
inline
|
||||
DeltaPos::DeltaPos(void)
|
||||
: mRow(0), mCol(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DeltaPos::DeltaPos(int row,int col,const RGB888 &color)
|
||||
: mColor(color), mRow(row), mCol(col)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DeltaPos::DeltaPos(const DeltaPos &someDeltaPos)
|
||||
: mColor(someDeltaPos.color()), mRow(someDeltaPos.row()), mCol(someDeltaPos.col())
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DeltaPos::~DeltaPos()
|
||||
{
|
||||
}
|
||||
|
||||
DeltaPos &DeltaPos::operator=(const DeltaPos &someDeltaPos)
|
||||
{
|
||||
color(someDeltaPos.color());
|
||||
row(someDeltaPos.row());
|
||||
col(someDeltaPos.col());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
const RGB888 &DeltaPos::color(void)const
|
||||
{
|
||||
return mColor;
|
||||
}
|
||||
|
||||
inline
|
||||
void DeltaPos::color(const RGB888 &color)
|
||||
{
|
||||
mColor=color;
|
||||
}
|
||||
|
||||
inline
|
||||
int DeltaPos::row(void)const
|
||||
{
|
||||
return mRow;
|
||||
}
|
||||
|
||||
inline
|
||||
void DeltaPos::row(int row)
|
||||
{
|
||||
mRow=row;
|
||||
}
|
||||
|
||||
inline
|
||||
int DeltaPos::col(void)const
|
||||
{
|
||||
return mCol;
|
||||
}
|
||||
|
||||
inline
|
||||
void DeltaPos::col(int col)
|
||||
{
|
||||
mCol=col;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user