Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
kome::core::Point< T > Class Template Reference

2 dimensional point information management class More...

#include <Point.h>

Collaboration diagram for kome::core::Point< T >:
Collaboration graph
[legend]

Public Member Functions

 Point ()
 constructor
 
 Point (T x, T y)
 constructor More...
 
virtual ~Point ()
 destructor
 

Static Public Member Functions

static bool lessX (const Point< T > &p0, const Point< T > &p1)
 compare to sort More...
 
static bool greaterX (const Point< T > &p0, const Point< T > &p1)
 compare to sort More...
 
static bool lessY (const Point< T > &p0, const Point< T > &p1)
 compare to sort More...
 
static bool greaterY (const Point< T > &p0, const Point< T > &p1)
 compare to sort More...
 

Public Attributes

px
 
py
 

Detailed Description

template<typename T>
class kome::core::Point< T >

2 dimensional point information management class

Definition at line 21 of file Point.h.

Constructor & Destructor Documentation

template<typename T>
kome::core::Point< T >::Point ( x,
y 
)
inline

constructor

Parameters
[in]xx coordinate
[in]yy coordinate

Definition at line 36 of file Point.h.

36  : px( x ), py( y ) {
37  }

Member Function Documentation

template<typename T>
static bool kome::core::Point< T >::greaterX ( const Point< T > &  p0,
const Point< T > &  p1 
)
inlinestatic

compare to sort

Parameters
[in]p0point object to be compared
[in]p1point object to compare
Returns
If x coordinate of p0 is greater than it of p1, this method returns true

Definition at line 71 of file Point.h.

71  {
72  return ( p0.px > p1.px );
73  }
template<typename T>
static bool kome::core::Point< T >::greaterY ( const Point< T > &  p0,
const Point< T > &  p1 
)
inlinestatic

compare to sort

Parameters
[in]p0point object to be compared
[in]p1point object to compare
Returns
If y coordinate of p0 is greater than it of p1, this method returns true

Definition at line 93 of file Point.h.

93  {
94  return ( p0.py > p1.py );
95  }
template<typename T>
static bool kome::core::Point< T >::lessX ( const Point< T > &  p0,
const Point< T > &  p1 
)
inlinestatic

compare to sort

Parameters
[in]p0point object to be compared
[in]p1point object to compare
Returns
If x coordinate of p0 is less than it of p1, this method returns true

Definition at line 60 of file Point.h.

60  {
61  return ( p0.px < p1.px );
62  }
template<typename T>
static bool kome::core::Point< T >::lessY ( const Point< T > &  p0,
const Point< T > &  p1 
)
inlinestatic

compare to sort

Parameters
[in]p0point object to be compared
[in]p1point object to compare
Returns
If y coordinate of p0 is less than it of p1, this method returns true

Definition at line 82 of file Point.h.

82  {
83  return ( p0.py < p1.py );
84  }

Member Data Documentation

template<typename T>
T kome::core::Point< T >::px

x coordinate

Definition at line 48 of file Point.h.

template<typename T>
T kome::core::Point< T >::py

y coordinate

Definition at line 50 of file Point.h.


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