Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Classes | Public Member Functions | List of all members
jop::DateTime Class Reference

#include <DateTime.hpp>

Classes

struct  Date
 Structure representing a date. More...
 
struct  Time
 

Public Member Functions

 DateTime ()
 Constructor. More...
 
DateTime & update (const bool date=true, const bool time=true)
 Update the date and/or time with the current, real world date and time values. More...
 
const Date & getDate () const
 Get the cached date value. More...
 
const Time & getTime () const
 Get the cached time value. More...
 
bool operator== (const DateTime &right) const
 Equality operator. More...
 
bool operator!= (const DateTime &right) const
 Inequality operator. More...
 

Detailed Description

Definition at line 34 of file DateTime.hpp.

Constructor & Destructor Documentation

jop::DateTime::DateTime ( )

Constructor.

Calls update().

Member Function Documentation

const Date& jop::DateTime::getDate ( ) const

Get the cached date value.

Returns
The cached date value
const Time& jop::DateTime::getTime ( ) const

Get the cached time value.

Returns
The cached time value
bool jop::DateTime::operator!= ( const DateTime &  right) const

Inequality operator.

Parameters
rightThe other DateTime to compare against
Returns
True if the two date-times don't match
bool jop::DateTime::operator== ( const DateTime &  right) const

Equality operator.

Parameters
rightThe other DateTime to compare against
Returns
True if the two date-times match
DateTime& jop::DateTime::update ( const bool  date = true,
const bool  time = true 
)

Update the date and/or time with the current, real world date and time values.

Parameters
dateUpdate date?
timeUpdate time?
Returns
Reference to self

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