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

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

#include <ome/files/MetadataMap.h>

+ Inheritance diagram for ome::files::detail::MetadataMapFlattenVisitor:
+ Collaboration diagram for ome::files::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

◆ MetadataMapFlattenVisitor()

ome::files::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

◆ operator()() [1/2]

template<typename T >
void ome::files::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::files::MetadataMap::set().

◆ operator()() [2/2]

template<typename T >
void ome::files::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::files::MetadataMap::set().


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