ome-files  0.5.0
Public Member Functions | Public Attributes | List of all members
ome::files::detail::MetadataMapOStreamVisitor Struct Reference

Visitor template for output of MetadataMap values to an ostream. More...

#include <ome/files/MetadataMap.h>

+ Inheritance diagram for ome::files::detail::MetadataMapOStreamVisitor:
+ Collaboration diagram for ome::files::detail::MetadataMapOStreamVisitor:

Public Member Functions

 MetadataMapOStreamVisitor (std::ostream &os, const MetadataMap::key_type &key)
 Constructor. More...
 
template<typename T >
void operator() (const std::vector< T > &c) const
 Output a vector value of arbitrary type. More...
 
template<typename T >
void operator() (const T &v) const
 Output a scalar value of arbitrary type. More...
 

Public Attributes

std::ostream & os
 The stream to output to.
 
const MetadataMap::key_typekey
 The key of the value being output.
 

Detailed Description

Visitor template for output of MetadataMap values to an ostream.

Constructor & Destructor Documentation

◆ MetadataMapOStreamVisitor()

ome::files::detail::MetadataMapOStreamVisitor::MetadataMapOStreamVisitor ( std::ostream &  os,
const MetadataMap::key_type key 
)
inline

Constructor.

Parameters
osthe output stream to output to.
keythe key being output.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
void ome::files::detail::MetadataMapOStreamVisitor::operator() ( const std::vector< T > &  c) const
inline

Output a vector value of arbitrary type.

Each value will be output as a separate line of the form "key #n = value", where n is the index into the vector, indexed from 1. The suffix will be left zero-padded to the width of the largest suffix.

Parameters
cthe container values to output.

◆ operator()() [2/2]

template<typename T >
void ome::files::detail::MetadataMapOStreamVisitor::operator() ( const T &  v) const
inline

Output a scalar value of arbitrary type.

The value will be output as a separate line of the form "key = value".

Parameters
vthe value to output.

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