bioformats  5.1.3
Public Member Functions | Public Attributes | List of all members
ome::bioformats::detail::MetadataMapFlattenVisitor Struct Reference

Visitor template for flattening of MetadataMap vector values. More...

#include <ome/bioformats/MetadataMap.h>

+ Inheritance diagram for ome::bioformats::detail::MetadataMapFlattenVisitor:
+ Collaboration diagram for ome::bioformats::detail::MetadataMapFlattenVisitor:

Public Member Functions

 MetadataMapFlattenVisitor (MetadataMap &map, 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

MetadataMapmap
 The map in which to set the flattened elements.
 
const MetadataMap::key_typekey
 The key of the value being flattened.
 

Detailed Description

Visitor template for flattening of MetadataMap vector values.

Constructor & Destructor Documentation

ome::bioformats::detail::MetadataMapFlattenVisitor::MetadataMapFlattenVisitor ( MetadataMap map,
const MetadataMap::key_type key 
)
inline

Constructor.

Parameters
mapthe map in which to set flattened elements.
keythe key being output.

Member Function Documentation

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

Output a vector value of arbitrary type.

Each value will be set as a separate entry of with the a #n suffix added to the key, 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.

References ome::bioformats::MetadataMap::set().

template<typename T >
void ome::bioformats::detail::MetadataMapFlattenVisitor::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.

References ome::bioformats::MetadataMap::set().


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