ESA JPIP server  0.1
jpeg2000::Point Class Reference

Represents a couple of integer values that can be used to identify a coordinate as well as a size. More...

#include <point.h>

Collaboration diagram for jpeg2000::Point:

Public Member Functions

 Point ()
 Initializes the object. More...
 
 Point (int x, int y)
 Initializes the object. More...
 
 Point (const Point &p)
 Copy constructor. More...
 
Pointoperator= (const Point &p)
 Copy assignment. More...
 
Pointoperator++ ()
 Increments by one the two values. More...
 
Pointoperator-- ()
 Decrements by one the two values. More...
 
Pointoperator+= (int val)
 Increments the two values. More...
 
Pointoperator-= (int val)
 Decrements the two values. More...
 
Pointoperator*= (int val)
 Multiplies the two values by one value. More...
 
Pointoperator/= (int val)
 Divides the two values by one value. More...
 
template<typename T >
T & SerializeWith (T &stream)
 
virtual ~Point ()
 

Public Attributes

int x
 Value X. More...
 
int y
 Value Y. More...
 

Friends

Point operator+ (const Point &a, int value)
 Returns the sum of a point with an integer value. More...
 
Point operator- (const Point &a, int value)
 Returns the subtraction of a point with an integer value. More...
 
Point operator* (const Point &a, int value)
 Returns the multiplication of a point with an integer value. More...
 
Point operator/ (const Point &a, int value)
 Returns the division of a point with an integer value. More...
 
Point operator+ (const Point &a, const Point &b)
 Returns the sum of two points. More...
 
Point operator- (const Point &a, const Point &b)
 Returns the subtraction of two points. More...
 
Point operator* (const Point &a, const Point &b)
 Returns the multiplication of two points. More...
 
Point operator/ (const Point &a, const Point &b)
 Returns the division of two points. More...
 
bool operator== (const Point &a, const Point &b)
 Returns true if the two points are equal. More...
 
bool operator!= (const Point &a, const Point &b)
 Returns true if the two points are not equal. More...
 
ostream & operator<< (ostream &out, const Point &point)
 

Detailed Description

Represents a couple of integer values that can be used to identify a coordinate as well as a size.

This class can be printed and serialized.

Constructor & Destructor Documentation

jpeg2000::Point::Point ( )
inline

Initializes the object.

jpeg2000::Point::Point ( int  x,
int  y 
)
inline

Initializes the object.

Parameters
xValue X.
yValue Y.
jpeg2000::Point::Point ( const Point p)
inline

Copy constructor.

virtual jpeg2000::Point::~Point ( )
inlinevirtual

Member Function Documentation

Point& jpeg2000::Point::operator*= ( int  val)
inline

Multiplies the two values by one value.

Parameters
valValue to multiply.
Returns
The object itself.
Point& jpeg2000::Point::operator++ ( )
inline

Increments by one the two values.

Returns
The object itself.
Point& jpeg2000::Point::operator+= ( int  val)
inline

Increments the two values.

Parameters
valValue to increment.
Returns
The object itself.
Point& jpeg2000::Point::operator-- ( )
inline

Decrements by one the two values.

Returns
The object itself.
Point& jpeg2000::Point::operator-= ( int  val)
inline

Decrements the two values.

Parameters
valValue to decrement.
Returns
The object itself.
Point& jpeg2000::Point::operator/= ( int  val)
inline

Divides the two values by one value.

Parameters
valValue to divide.
Returns
The object itself.
Point& jpeg2000::Point::operator= ( const Point p)
inline

Copy assignment.

template<typename T >
T& jpeg2000::Point::SerializeWith ( T &  stream)
inline

Friends And Related Function Documentation

bool operator!= ( const Point a,
const Point b 
)
friend

Returns true if the two points are not equal.

Point operator* ( const Point a,
int  value 
)
friend

Returns the multiplication of a point with an integer value.

The value is multiplied to the two values of the point.

Point operator* ( const Point a,
const Point b 
)
friend

Returns the multiplication of two points.

The operation is applied each value of each point.

Point operator+ ( const Point a,
int  value 
)
friend

Returns the sum of a point with an integer value.

The value is added to the two values of the point.

Point operator+ ( const Point a,
const Point b 
)
friend

Returns the sum of two points.

The operation is applied each value of each point.

Point operator- ( const Point a,
int  value 
)
friend

Returns the subtraction of a point with an integer value.

The value is subtracted from the two values of the point.

Point operator- ( const Point a,
const Point b 
)
friend

Returns the subtraction of two points.

The operation is applied each value of each point.

Point operator/ ( const Point a,
int  value 
)
friend

Returns the division of a point with an integer value.

The value is divided to the two values of the point.

Point operator/ ( const Point a,
const Point b 
)
friend

Returns the division of two points.

The operation is applied each value of each point.

ostream& operator<< ( ostream &  out,
const Point point 
)
friend
bool operator== ( const Point a,
const Point b 
)
friend

Returns true if the two points are equal.

Member Data Documentation

int jpeg2000::Point::x

Value X.

int jpeg2000::Point::y

Value Y.


The documentation for this class was generated from the following file: