# MI - Fimex: MetNoFimex::ReplaceStringTimeObject Class Reference

# MetNoFimex::ReplaceStringTimeObject Class Reference

`#include <ReplaceStringTimeObject.h>`

Inheritance diagram for MetNoFimex::ReplaceStringTimeObject:

List of all members.

## Public Member Functions

| ReplaceStringTimeObject ()
| ReplaceStringTimeObject (std::time_t time, std::string format="%Y-%m-%d %H:%M:%S%F%Q")
virtual | ~ReplaceStringTimeObject ()
virtual std::ostream & | put (std::ostream &s) const
virtual void | setFormatString (const std::string &format)
virtual void | setFormatStringAndOptions (const std::string &format, const std::vector< std::string > &options)

## Friends

std::ostream & | operator<< (std::ostream &s, const ReplaceStringTimeObject &rsto)

## Constructor & Destructor Documentation

MetNoFimex::ReplaceStringTimeObject::ReplaceStringTimeObject | ( |  | ) | `[inline]`

MetNoFimex::ReplaceStringTimeObject::ReplaceStringTimeObject | ( | std::time_t | time,
|  | std::string | format = `"%Y-%m-%d %H:%M:%S%F%Q"` |
| ) |  |  | `[inline]`

initialize a ReplaceStringTimeObject with time and string set

virtual MetNoFimex::ReplaceStringTimeObject::~ReplaceStringTimeObject | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual std::ostream& MetNoFimex::ReplaceStringTimeObject::put | ( | std::ostream & | s | ) | const`[inline, virtual]`

put the formatted string to the stream

implementors are asked to implement operator<<

Implements MetNoFimex::ReplaceStringObject.

virtual void MetNoFimex::ReplaceStringTimeObject::setFormatString | ( | const std::string & | format | ) | `[inline, virtual]`

set the formatting String for this object

Parameters:

  | format,: | format string of strftime http://www.cplusplus.com/reference/clibrary/ctime/strftime.html

Implements MetNoFimex::ReplaceStringObject.

virtual void MetNoFimex::ReplaceStringTimeObject::setFormatStringAndOptions | ( | const std::string & | format,
|  | const std::vector< std::string > & | options |
| ) |  |  | `[virtual]`

set the formatting string and additional options for this object options are: 0: offset as in seconds, i.e. +5000, -6000

Implements MetNoFimex::ReplaceStringObject.

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | s,
|  | const ReplaceStringTimeObject & | rsto |
| ) |  |  | `[friend]`

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

- include/fimex/ReplaceStringTimeObject.h