|
bpp-popgen
2.2.0
|
#include <Bpp/PopGen/Date.h>
Inheritance diagram for bpp::Date:
Collaboration diagram for bpp::Date:Public Member Functions | |
| Date (const int day=1, const int month=1, const int year=2000) throw (BadIntegerException) | |
| Build a new Date from three values. More... | |
| Date (const Date &date) | |
| The Date copy constructor. More... | |
| ~Date () | |
| Destroy the Date object. More... | |
| Date & | operator= (const Date &date) |
| The Date copy operator. More... | |
| void | setDate (const int day, const int month, const int year) throw (BadIntegerException) |
| Set the Date. More... | |
| void | setYear (const int year) |
| Set the year. More... | |
| void | setMonth (const int month) throw (BadIntegerException) |
| Set the month. More... | |
| void | setDay (const int day) throw (BadIntegerException) |
| Set the day. More... | |
| std::string | getDateStr () const |
| Get the Date as a string. More... | |
| int | getYear () const |
| Get the Year as an int. More... | |
| int | getMonth () const |
| Get the month as an int. More... | |
| int | getDay () const |
| Get the day as an int. More... | |
| bool | operator== (const Date &date) const |
| The == operator. More... | |
| bool | operator< (const Date &date) const |
| The < operator. More... | |
| bool | operator!= (const Date &date) const |
| The != operator. More... | |
| bool | operator> (const Date &date) const |
| The > operator. More... | |
| bool | operator<= (const Date &date) const |
| The <= operator. More... | |
| bool | operator>= (const Date &date) const |
| The >= operator. More... | |
The Clonable interface | |
| Date * | clone () const |
Private Attributes | |
| int | day_ |
| int | month_ |
| int | year_ |
| Date::Date | ( | const int | day = 1, |
| const int | month = 1, |
||
| const int | year = 2000 |
||
| ) | |||
| throw | ( | BadIntegerException | |
| ) | |||
| std::string Date::getDateStr | ( | ) | const |
|
inline |
Get the day as an int.
Definition at line 146 of file Date.h.
References day_.
Referenced by operator<(), operator=(), and operator==().
|
inline |
Get the month as an int.
Definition at line 141 of file Date.h.
References month_.
Referenced by operator<(), operator=(), and operator==().
|
inline |
Get the Year as an int.
Definition at line 136 of file Date.h.
References year_.
Referenced by operator<(), operator=(), and operator==().
|
inline |
| bool Date::operator< | ( | const Date & | date | ) | const |
|
inline |
| bool Date::operator== | ( | const Date & | date | ) | const |
|
inline |
|
inline |
| void Date::setDate | ( | const int | day, |
| const int | month, | ||
| const int | year | ||
| ) | |||
| throw | ( | BadIntegerException | |
| ) | |||
| void Date::setDay | ( | const int | day | ) | |
| throw | ( | BadIntegerException | |||
| ) | |||||
| void Date::setMonth | ( | const int | month | ) | |
| throw | ( | BadIntegerException | |||
| ) | |||||
| void Date::setYear | ( | const int | year | ) |
|
private |
Definition at line 59 of file Date.h.
Referenced by getDateStr(), getDay(), operator<(), operator=(), and operator==().
|
private |
Definition at line 60 of file Date.h.
Referenced by getDateStr(), getMonth(), operator<(), operator=(), and operator==().
|
private |
Definition at line 61 of file Date.h.
Referenced by getDateStr(), getYear(), operator<(), operator=(), operator==(), and setYear().