bpp-popgen3
3.0.0
|
#include <Bpp/PopGen/DataSet/Locality.h>
Public Member Functions | |
Locality (const std::string name, const T x=0, const T y=0) | |
Build a new locality with name and coordinates. More... | |
Locality (const std::string name, const bpp::Point2D< T > &coord) | |
Build a new locality with name and coordinates. More... | |
virtual | ~Locality () |
Destroy a locality. More... | |
Locality< T > * | clone () const |
Implements the Clonable interface. More... | |
virtual bool | operator== (const Locality< T > &locality) const |
The == operator. More... | |
virtual bool | operator!= (const Locality< T > &locality) const |
The != operator. More... | |
void | setName (const std::string &name) |
Set the name of the locality. More... | |
const std::string & | getName () const |
Get the name of the locality. More... | |
void | setCoord (const T x, const T y) |
void | setX (const T x) |
void | setY (const T y) |
const T & | getX () const |
const T & | getY () const |
bool | hasSameCoordsAs (const Point2D< T > &coord) const |
virtual bool | operator== (const Point2D< T > &coord) const |
virtual bool | operator!= (const Point2D< T > &coord) const |
Protected Attributes | |
std::string | name_ |
Private Attributes | |
T | x_ |
T | y_ |
The Locality class.
This is a class derivated from the Point2D class. It's a Point2D with a name.
Definition at line 23 of file Locality.h.
|
inline |
Build a new locality with name and coordinates.
name | The name of the locality. |
x | The longitude. |
y | The latitude. |
Definition at line 27 of file Locality.h.
|
inline |
Build a new locality with name and coordinates.
name | The name of the locality. |
coord | The coordinates of the locality. |
Definition at line 27 of file Locality.h.
|
inlinevirtual |
Destroy a locality.
Definition at line 27 of file Locality.h.
|
inlinevirtual |
Implements the Clonable interface.
Implements bpp::Clonable.
Definition at line 62 of file Locality.h.
|
inline |
Get the name of the locality.
Definition at line 90 of file Locality.h.
References bpp::Locality< T >::name_.
Referenced by bpp::DataSet::addLocality(), and bpp::PopgenlibIO::parseLocality_().
|
inlinevirtual |
The != operator.
Definition at line 77 of file Locality.h.
|
inlinevirtual |
The == operator.
returns true if both name and coordinates are identical between the two Locality objects.
Definition at line 69 of file Locality.h.
References bpp::Point2D< class >::getX(), bpp::Point2D< T >::getX(), bpp::Point2D< class >::getY(), bpp::Point2D< T >::getY(), and bpp::Locality< T >::name_.
|
inline |
Set the name of the locality.
Definition at line 85 of file Locality.h.
References bpp::Locality< T >::name_.
Referenced by bpp::PopgenlibIO::parseLocality_().
|
protected |
Definition at line 27 of file Locality.h.
Referenced by bpp::Locality< T >::getName(), bpp::Locality< T >::operator==(), and bpp::Locality< T >::setName().