Jpp
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t > Struct Template Reference

2D Element. More...

#include <JElement.hh>

Inheritance diagram for JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >:
JTOOLS::JBin2D< JAbscissa_t, JOrdinate_t > JTOOLS::JPolintElement2S< JAbscissa_t, JOrdinate_t > JTOOLS::JSplineElement2D< JAbscissa_t, JOrdinate_t > JTOOLS::JSplineElement2S< JAbscissa_t, JOrdinate_t >

Public Types

typedef JAbscissa_t abscissa_type
 
typedef JOrdinate_t ordinate_type
 

Public Member Functions

 JElement2D ()
 Default constructor. More...
 
 JElement2D (typename JLANG::JClass< abscissa_type >::argument_type x, typename JLANG::JClass< ordinate_type >::argument_type y)
 Constructor. More...
 
abscissa_type getX () const
 Get abscissa value. More...
 
const ordinate_typegetY () const
 Get ordinate value. More...
 
ordinate_typegetY ()
 Get ordinate value. More...
 

Protected Attributes

abscissa_type __x
 
ordinate_type __y
 

Friends

JReaderoperator>> (JReader &in, JElement2D &element)
 Read element from input. More...
 
JWriteroperator<< (JWriter &out, const JElement2D &element)
 Write element to output. More...
 

Detailed Description

template<class JAbscissa_t, class JOrdinate_t>
struct JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >

2D Element.

Definition at line 44 of file JElement.hh.

Member Typedef Documentation

◆ abscissa_type

template<class JAbscissa_t , class JOrdinate_t >
typedef JAbscissa_t JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::abscissa_type

Definition at line 46 of file JElement.hh.

◆ ordinate_type

template<class JAbscissa_t , class JOrdinate_t >
typedef JOrdinate_t JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::ordinate_type

Definition at line 47 of file JElement.hh.

Constructor & Destructor Documentation

◆ JElement2D() [1/2]

template<class JAbscissa_t , class JOrdinate_t >
JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::JElement2D ( )
inline

Default constructor.

Definition at line 53 of file JElement.hh.

53  :
54  __x(getZero<abscissa_type>()),
55  __y(getZero<ordinate_type>())
56  {}

◆ JElement2D() [2/2]

template<class JAbscissa_t , class JOrdinate_t >
JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::JElement2D ( typename JLANG::JClass< abscissa_type >::argument_type  x,
typename JLANG::JClass< ordinate_type >::argument_type  y 
)
inline

Constructor.

Parameters
xabscissa value
yordinate value

Definition at line 65 of file JElement.hh.

66  :
67  __x(x),
68  __y(y)
69  {}

Member Function Documentation

◆ getX()

template<class JAbscissa_t , class JOrdinate_t >
abscissa_type JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::getX ( ) const
inline

Get abscissa value.

Returns
abscissa value

Definition at line 77 of file JElement.hh.

78  {
79  return __x;
80  }

◆ getY() [1/2]

template<class JAbscissa_t , class JOrdinate_t >
const ordinate_type& JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::getY ( ) const
inline

Get ordinate value.

Returns
ordinate value

Definition at line 88 of file JElement.hh.

89  {
90  return __y;
91  }

◆ getY() [2/2]

template<class JAbscissa_t , class JOrdinate_t >
ordinate_type& JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::getY ( )
inline

Get ordinate value.

Returns
ordinate value

Definition at line 99 of file JElement.hh.

100  {
101  return __y;
102  }

Friends And Related Function Documentation

◆ operator>>

template<class JAbscissa_t , class JOrdinate_t >
JReader& operator>> ( JReader in,
JElement2D< JAbscissa_t, JOrdinate_t > &  element 
)
friend

Read element from input.

Parameters
inreader
elementelement
Returns
reader

Definition at line 112 of file JElement.hh.

113  {
114  in >> element.__x;
115  in >> element.__y;
116 
117  return in;
118  }

◆ operator<<

template<class JAbscissa_t , class JOrdinate_t >
JWriter& operator<< ( JWriter out,
const JElement2D< JAbscissa_t, JOrdinate_t > &  element 
)
friend

Write element to output.

Parameters
outwriter
elementelement
Returns
writer

Definition at line 128 of file JElement.hh.

129  {
130  out << element.__x;
131  out << element.__y;
132 
133  return out;
134  }

Member Data Documentation

◆ __x

template<class JAbscissa_t , class JOrdinate_t >
abscissa_type JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::__x
protected

Definition at line 138 of file JElement.hh.

◆ __y

template<class JAbscissa_t , class JOrdinate_t >
ordinate_type JTOOLS::JElement2D< JAbscissa_t, JOrdinate_t >::__y
protected

Definition at line 139 of file JElement.hh.


The documentation for this struct was generated from the following file:
JTOOLS::JElement2D::__x
abscissa_type __x
Definition: JElement.hh:138
JTOOLS::JElement2D::__y
ordinate_type __y
Definition: JElement.hh:139