teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Public Types | Public Member Functions | Public Attributes | List of all members
teditor::Pos2d< T > Struct Template Reference

Any 2D position. More...

#include <pos2d.h>

Public Types

typedef T DataT
 

Public Member Functions

 Pos2d (T x_=0, T y_=0)
 
const Pos2d< T > & operator= (const Pos2d< T > &in)
 
bool operator> (const Pos2d< T > &b) const
 
bool operator>= (const Pos2d< T > &b) const
 
bool operator== (const Pos2d< T > &b) const
 
bool operator!= (const Pos2d< T > &b) const
 
bool operator<= (const Pos2d< T > &b) const
 
bool operator< (const Pos2d< T > &b) const
 
int find (Pos2d< T > &start, Pos2d< T > &end, const Pos2d< T > &other) const
 Finds the start/end points for the range defined by this and the other position. More...
 
Pos2doperator+= (const std::string &chars)
 
bool isInside (int _y, int _x, const Pos2d< T > &cu) const
 Check if the given location is in the regions. More...
 

Public Attributes

x
 
y
 

Detailed Description

template<typename T>
struct teditor::Pos2d< T >

Any 2D position.

Template Parameters
TType of position

Member Typedef Documentation

◆ DataT

template<typename T >
typedef T teditor::Pos2d< T >::DataT

Constructor & Destructor Documentation

◆ Pos2d()

template<typename T >
teditor::Pos2d< T >::Pos2d ( x_ = 0,
y_ = 0 
)
inline

Member Function Documentation

◆ find()

template<typename T >
int teditor::Pos2d< T >::find ( Pos2d< T > &  start,
Pos2d< T > &  end,
const Pos2d< T > &  other 
) const
inline

Finds the start/end points for the range defined by this and the other position.

Parameters
startthe start location
endthe end location
otherthe other position
Returns
-1 if the vertical location is earlier, 0 if equal and +1 if earlier than the other

◆ isInside()

template<typename T >
bool teditor::Pos2d< T >::isInside ( int  _y,
int  _x,
const Pos2d< T > &  cu 
) const
inline

Check if the given location is in the regions.

◆ operator!=()

template<typename T >
bool teditor::Pos2d< T >::operator!= ( const Pos2d< T > &  b) const
inline

◆ operator+=()

template<typename T >
Pos2d& teditor::Pos2d< T >::operator+= ( const std::string &  chars)
inline

move the pointer ahead based on the characters in the input

◆ operator<()

template<typename T >
bool teditor::Pos2d< T >::operator< ( const Pos2d< T > &  b) const
inline

◆ operator<=()

template<typename T >
bool teditor::Pos2d< T >::operator<= ( const Pos2d< T > &  b) const
inline

◆ operator=()

template<typename T >
const Pos2d<T>& teditor::Pos2d< T >::operator= ( const Pos2d< T > &  in)
inline

◆ operator==()

template<typename T >
bool teditor::Pos2d< T >::operator== ( const Pos2d< T > &  b) const
inline

◆ operator>()

template<typename T >
bool teditor::Pos2d< T >::operator> ( const Pos2d< T > &  b) const
inline

◆ operator>=()

template<typename T >
bool teditor::Pos2d< T >::operator>= ( const Pos2d< T > &  b) const
inline

Member Data Documentation

◆ x

template<typename T >
T teditor::Pos2d< T >::x

◆ y

template<typename T >
T teditor::Pos2d< T >::y

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