Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
odbc::Date Class Reference

#include <RDBC/blob/master/include/RDBC/odbc++/types.h>

+ Inheritance diagram for odbc::Date:

Public Member Functions

 Date (int year, int month, int day)
 
 Date ()
 
 Date (time_t t)
 
 Date (const ODBCXX_STRING &str)
 
 Date (const Date &d)
 
Dateoperator= (const Date &d)
 
virtual ~Date ()
 
virtual void setTime (time_t t)
 
time_t getTime () const
 
void parse (const ODBCXX_STRING &str)
 
int getYear () const
 
int getMonth () const
 
int getDay () const
 
void setYear (int year)
 
void setMonth (int month)
 
void setDay (int day)
 
virtual ODBCXX_STRING toString () const
 

Protected Member Functions

virtual void _invalid (const char *what, int value)
 
int _validateYear (int y)
 
int _validateMonth (int m)
 
int _validateDay (int d)
 

Protected Attributes

int year_
 
int month_
 
int day_
 

Detailed Description

An SQL DATE

Definition at line 276 of file types.h.

View newest version in sPHENIX GitHub at line 276 of file types.h

Constructor & Destructor Documentation

odbc::Date::Date ( int  year,
int  month,
int  day 
)
inline

Constructor.

Definition at line 305 of file types.h.

View newest version in sPHENIX GitHub at line 305 of file types.h

odbc::Date::Date ( )
explicit

Constructor.

Sets this date to today.

odbc::Date::Date ( time_t  t)
inline

Constructor.

Sets this date to the specified time_t value.

Definition at line 321 of file types.h.

View newest version in sPHENIX GitHub at line 321 of file types.h

odbc::Date::Date ( const ODBCXX_STRING str)
inline

Constructor.

Sets this date to the specified string in the YYYY-MM-DD format.

Definition at line 329 of file types.h.

View newest version in sPHENIX GitHub at line 329 of file types.h

References ActsExamples::Options::parse().

+ Here is the call graph for this function:

odbc::Date::Date ( const Date d)
inline

Copy constructor

Definition at line 334 of file types.h.

View newest version in sPHENIX GitHub at line 334 of file types.h

virtual odbc::Date::~Date ( )
inlinevirtual

Destructor

Definition at line 348 of file types.h.

View newest version in sPHENIX GitHub at line 348 of file types.h

Member Function Documentation

virtual void odbc::Date::_invalid ( const char *  what,
int  value 
)
protectedvirtual

Reimplemented in odbc::Timestamp.

int odbc::Date::_validateDay ( int  d)
inlineprotected

Definition at line 295 of file types.h.

View newest version in sPHENIX GitHub at line 295 of file types.h

int odbc::Date::_validateMonth ( int  m)
inlineprotected

Definition at line 288 of file types.h.

View newest version in sPHENIX GitHub at line 288 of file types.h

References Acts::UnitConstants::m.

int odbc::Date::_validateYear ( int  y)
inlineprotected

Definition at line 284 of file types.h.

View newest version in sPHENIX GitHub at line 284 of file types.h

References y.

int odbc::Date::getDay ( ) const
inline

Gets the monthday of this date

Definition at line 370 of file types.h.

View newest version in sPHENIX GitHub at line 370 of file types.h

Referenced by ODBCCallableStatement::GetDate(), ODBCResultSet::GetDate(), ODBCCallableStatement::GetTimestamp(), and ODBCResultSet::GetTimestamp().

+ Here is the caller graph for this function:

int odbc::Date::getMonth ( ) const
inline

Gets the month of this date

Definition at line 365 of file types.h.

View newest version in sPHENIX GitHub at line 365 of file types.h

Referenced by ODBCCallableStatement::GetDate(), ODBCResultSet::GetDate(), ODBCCallableStatement::GetTimestamp(), and ODBCResultSet::GetTimestamp().

+ Here is the caller graph for this function:

time_t odbc::Date::getTime ( ) const

Returns the time_t value of 00:00:00 at this date

Referenced by odbc::Timestamp::getTime().

+ Here is the caller graph for this function:

int odbc::Date::getYear ( ) const
inline

Gets the year of this date

Definition at line 360 of file types.h.

View newest version in sPHENIX GitHub at line 360 of file types.h

Referenced by ODBCCallableStatement::GetDate(), ODBCResultSet::GetDate(), ODBCCallableStatement::GetTimestamp(), and ODBCResultSet::GetTimestamp().

+ Here is the caller graph for this function:

Date& odbc::Date::operator= ( const Date d)
inline

Assignment operator

Definition at line 340 of file types.h.

View newest version in sPHENIX GitHub at line 340 of file types.h

References day_, month_, and year_.

Referenced by odbc::Timestamp::operator=().

+ Here is the caller graph for this function:

void odbc::Date::parse ( const ODBCXX_STRING str)

Sets this date from a string in the YYYY-MM-DD format

void odbc::Date::setDay ( int  day)
inline

Sets the day of this date

Definition at line 385 of file types.h.

View newest version in sPHENIX GitHub at line 385 of file types.h

void odbc::Date::setMonth ( int  month)
inline

Sets the month of this date

Definition at line 380 of file types.h.

View newest version in sPHENIX GitHub at line 380 of file types.h

virtual void odbc::Date::setTime ( time_t  t)
virtual

Sets this date to the specified time_t value

Reimplemented in odbc::Timestamp.

void odbc::Date::setYear ( int  year)
inline

Sets the year of this date

Definition at line 375 of file types.h.

View newest version in sPHENIX GitHub at line 375 of file types.h

virtual ODBCXX_STRING odbc::Date::toString ( ) const
virtual

Gets the date as a string in the YYYY-MM-DD format

Reimplemented in odbc::Timestamp.

Member Data Documentation

int odbc::Date::day_
protected

Definition at line 280 of file types.h.

View newest version in sPHENIX GitHub at line 280 of file types.h

Referenced by operator=().

int odbc::Date::month_
protected

Definition at line 279 of file types.h.

View newest version in sPHENIX GitHub at line 279 of file types.h

Referenced by operator=().

int odbc::Date::year_
protected

Definition at line 278 of file types.h.

View newest version in sPHENIX GitHub at line 278 of file types.h

Referenced by operator=().


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