bioformats  5.1.0
Public Types | Public Member Functions | Private Attributes | List of all members
ome::xml::model::primitives::Timestamp Class Reference

An ISO-8601 timestamp. More...

#include <ome/xml/model/primitives/Timestamp.h>

Public Types

typedef boost::posix_time::ptime value_type
 POSIX time is the underlying time representation.
 

Public Member Functions

 Timestamp ()
 Construct a Timestamp (defaults to current UTC time).
 
 Timestamp (const std::string &value)
 Construct a Timestamp from an ISO-8601 date string. More...
 
 Timestamp (value_type value)
 Construct a Timestamp from POSIX time. More...
 
 operator value_type () const
 Get the wrapped POSIX time value. More...
 

Private Attributes

value_type value
 The POSIX time (at least microsecond precision).
 

Detailed Description

An ISO-8601 timestamp.

The timestamp will have at least microsecond precision and, on systems where the Boost.Date_Time module has been compiled with support enabled, nanosecond precision.

Constructor & Destructor Documentation

ome::xml::model::primitives::Timestamp::Timestamp ( const std::string &  value)

Construct a Timestamp from an ISO-8601 date string.

Parameters
valuean ISO-8601-formatted string.
ome::xml::model::primitives::Timestamp::Timestamp ( value_type  value)

Construct a Timestamp from POSIX time.

Parameters
valuethe POSIX time.

Member Function Documentation

ome::xml::model::primitives::Timestamp::operator value_type ( ) const
inline

Get the wrapped POSIX time value.

Returns the POSIX time.

References value.


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