pion::PionTimeFacet Class Reference

#include <PionDateTime.hpp>

List of all members.


Detailed Description

PionTimeFacet: helper class for PionDateTime I/O

Definition at line 34 of file PionDateTime.hpp.

Public Member Functions

 PionTimeFacet (void)
 default constructor
virtual ~PionTimeFacet (void)
 virtual destructor
 PionTimeFacet (const std::string &format)
 PionTimeFacet (const PionTimeFacet &f)
 copy constructor
PionTimeFacetoperator= (const PionTimeFacet &f)
 assignment operator
template<class charT, class traits>
void read (std::basic_istream< charT, traits > &input, PionDateTime &t)
template<class charT, class traits>
void write (std::basic_ostream< charT, traits > &output, const PionDateTime &t)
void fromString (const std::string &str, PionDateTime &t)
void fromString (const char *str, PionDateTime &t)
PionDateTime fromString (const std::string &str)
PionDateTime fromString (const char *str)
void toString (std::string &str, const PionDateTime &t)
std::string toString (const PionDateTime &t)
void setFormat (const std::string &format)
 sets the format used for I/O (see boost::date_time docs)
const std::string & getFormat (void) const
 returns the format used for I/O

Static Public Member Functions

static boost::uint32_t to_time_t (const PionDateTime &t)


Constructor & Destructor Documentation

pion::PionTimeFacet::PionTimeFacet ( const std::string &  format  )  [inline, explicit]

constructs a new PionTimeFacet object

Parameters:
format the format to use for input and output (see boost::date_time docs)

Definition at line 59 of file PionDateTime.hpp.

References setFormat().


Member Function Documentation

PionDateTime pion::PionTimeFacet::fromString ( const char *  str  )  [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
Returns:
result of the date_time value read from the string

Definition at line 139 of file PionDateTime.hpp.

PionDateTime pion::PionTimeFacet::fromString ( const std::string &  str  )  [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
Returns:
result of the date_time value read from the string

Definition at line 126 of file PionDateTime.hpp.

void pion::PionTimeFacet::fromString ( const char *  str,
PionDateTime t 
) [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
t will be set to the date_time value read from the string

Definition at line 115 of file PionDateTime.hpp.

void pion::PionTimeFacet::fromString ( const std::string &  str,
PionDateTime t 
) [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
t will be set to the date_time value read from the string

Definition at line 104 of file PionDateTime.hpp.

template<class charT, class traits>
void pion::PionTimeFacet::read ( std::basic_istream< charT, traits > &  input,
PionDateTime t 
) [inline]

read date_time value from an istream using the defined format

Parameters:
input stream to read the value from
t will be set to the value read from the input stream

Definition at line 81 of file PionDateTime.hpp.

std::string pion::PionTimeFacet::toString ( const PionDateTime t  )  [inline]

write date_time value to a string using the defined format

Parameters:
t the date_time value to write to the string
Returns:
the date_time value converted into string format

Definition at line 164 of file PionDateTime.hpp.

void pion::PionTimeFacet::toString ( std::string &  str,
const PionDateTime t 
) [inline]

write date_time value to a string using the defined format

Parameters:
str string to write the value to
t the date_time value to write to the string

Definition at line 152 of file PionDateTime.hpp.

template<class charT, class traits>
void pion::PionTimeFacet::write ( std::basic_ostream< charT, traits > &  output,
const PionDateTime t 
) [inline]

write date_time value to an output stream using the defined format

Parameters:
output stream to write the value to
t the value to write to the stream

Definition at line 93 of file PionDateTime.hpp.


The documentation for this class was generated from the following file:
Generated on Fri Apr 30 14:48:54 2010 for pion-net by  doxygen 1.4.7