nfd::tools::nfdc::xml Namespace Reference

Classes

struct  Flag
 Print true as an empty element and false as nothing. More...
 
struct  Text
 

Functions

std::string formatDuration (time::nanoseconds d)
 
std::string formatTimestamp (time::system_clock::time_point t)
 
std::ostream & operator<< (std::ostream &os, const Text &text)
 Print XML text with special character represented as predefined entities. More...
 
std::ostream & operator<< (std::ostream &os, Flag v)
 
void printFooter (std::ostream &os)
 
void printHeader (std::ostream &os)
 

Function Documentation

◆ formatDuration()

std::string nfd::tools::nfdc::xml::formatDuration ( time::nanoseconds  d)
Returns
duration in XML duration format

Definition of this format: https://www.w3.org/TR/xmlschema11-2/#duration

Definition at line 86 of file format-helpers.cpp.

◆ formatTimestamp()

std::string nfd::tools::nfdc::xml::formatTimestamp ( time::system_clock::time_point  t)
Returns
timestamp in XML dateTime format

Definition of this format: https://www.w3.org/TR/xmlschema11-2/#dateTime

Definition at line 111 of file format-helpers.cpp.

◆ operator<<() [1/2]

std::ostream & nfd::tools::nfdc::xml::operator<< ( std::ostream &  os,
const Text text 
)

Print XML text with special character represented as predefined entities.

Definition at line 48 of file format-helpers.cpp.

◆ operator<<() [2/2]

std::ostream & nfd::tools::nfdc::xml::operator<< ( std::ostream &  os,
Flag  v 
)

Definition at line 76 of file format-helpers.cpp.

◆ printFooter()

void nfd::tools::nfdc::xml::printFooter ( std::ostream &  os)

Definition at line 43 of file format-helpers.cpp.

◆ printHeader()

void nfd::tools::nfdc::xml::printHeader ( std::ostream &  os)

Definition at line 36 of file format-helpers.cpp.