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

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

+ Inheritance diagram for odbc::Timestamp:
+ Collaboration diagram for odbc::Timestamp:

Public Member Functions

 Timestamp (int year, int month, int day, int hour, int minute, int second, int nanos=0)
 
 Timestamp ()
 
 Timestamp (time_t t)
 
 Timestamp (const ODBCXX_STRING &s)
 
 Timestamp (const Timestamp &t)
 
Timestampoperator= (const Timestamp &t)
 
virtual ~Timestamp ()
 
virtual void setTime (time_t t)
 
virtual time_t getTime ()
 
void parse (const ODBCXX_STRING &s)
 
int getNanos () const
 
void setNanos (int nanos)
 
virtual ODBCXX_STRING toString () const
 
- Public Member Functions inherited from odbc::Date
 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 ()
 
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)
 
- Public Member Functions inherited from odbc::Time
 Time (int hour, int minute, int second)
 
 Time ()
 
 Time (time_t t)
 
 Time (const ODBCXX_STRING &str)
 
 Time (const Time &t)
 
Timeoperator= (const Time &t)
 
virtual ~Time ()
 
time_t getTime () const
 
void parse (const ODBCXX_STRING &str)
 
int getHour () const
 
int getMinute () const
 
int getSecond () const
 
void setHour (int h)
 
void setMinute (int m)
 
void setSecond (int s)
 

Private Member Functions

virtual void _invalid (const char *what, int value)
 
int _validateNanos (int n)
 

Private Attributes

int nanos_
 

Additional Inherited Members

- Protected Member Functions inherited from odbc::Date
int _validateYear (int y)
 
int _validateMonth (int m)
 
int _validateDay (int d)
 
- Protected Member Functions inherited from odbc::Time
int _validateHour (int h)
 
int _validateMinute (int m)
 
int _validateSecond (int s)
 
- Protected Attributes inherited from odbc::Date
int year_
 
int month_
 
int day_
 
- Protected Attributes inherited from odbc::Time
int hour_
 
int minute_
 
int second_
 

Detailed Description

An SQL TIMESTAMP

Definition at line 515 of file types.h.

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

Constructor & Destructor Documentation

odbc::Timestamp::Timestamp ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
int  nanos = 0 
)
inline

Constructor

Definition at line 530 of file types.h.

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

odbc::Timestamp::Timestamp ( )
explicit

Constructor.

Sets the timestamp to now.

odbc::Timestamp::Timestamp ( time_t  t)
inline

Constructor.

Sets this timestamp to the specified time_t value.

Definition at line 547 of file types.h.

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

odbc::Timestamp::Timestamp ( const ODBCXX_STRING s)
inline

Constructor.

Sets this timestamp from a YYYY-MM-DD HH:MM:SS[.NNN...] format

Definition at line 555 of file types.h.

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

References ActsExamples::Options::parse().

+ Here is the call graph for this function:

odbc::Timestamp::Timestamp ( const Timestamp t)
inline

Copy constructor

Definition at line 561 of file types.h.

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

virtual odbc::Timestamp::~Timestamp ( )
inlinevirtual

Destructor

Definition at line 573 of file types.h.

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

Member Function Documentation

virtual void odbc::Timestamp::_invalid ( const char *  what,
int  value 
)
privatevirtual

Reimplemented from odbc::Date.

int odbc::Timestamp::_validateNanos ( int  n)
inlineprivate

Definition at line 521 of file types.h.

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

References n.

int odbc::Timestamp::getNanos ( ) const
inline

Gets the nanoseconds value of this timestamp

Definition at line 588 of file types.h.

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

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

+ Here is the caller graph for this function:

virtual time_t odbc::Timestamp::getTime ( )
inlinevirtual

Gets the time_t value of this timestamp

Definition at line 579 of file types.h.

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

References odbc::Date::getTime(), and odbc::Time::getTime().

Referenced by OnlMonDBodbc::GetVar().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Timestamp& odbc::Timestamp::operator= ( const Timestamp t)
inline

Assignment operator

Definition at line 565 of file types.h.

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

References nanos_, odbc::Date::operator=(), and odbc::Time::operator=().

+ Here is the call graph for this function:

void odbc::Timestamp::parse ( const ODBCXX_STRING s)

Set this timestamp from a YYYY-MM-DD HH:MM:SS[.NNN...] format

void odbc::Timestamp::setNanos ( int  nanos)
inline

Sets the nanoseconds value of this timestamp

Definition at line 593 of file types.h.

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

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

Sets this timestamp to the specified time_t value

Reimplemented from odbc::Date.

Referenced by OnlMonDBodbc::AddRow(), OnCalServer::AdjustRichTimeStampForMultipleRuns(), and OnCalServer::RunNumber().

+ Here is the caller graph for this function:

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

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

Reimplemented from odbc::Date.

Referenced by OnlMonDBodbc::AddRow(), OnCalServer::AdjustRichTimeStampForMultipleRuns(), OnlMonDBodbc::GetVar(), and OnCalServer::RunNumber().

+ Here is the caller graph for this function:

Member Data Documentation

int odbc::Timestamp::nanos_
private

Definition at line 517 of file types.h.

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

Referenced by operator=().


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