ome-files  0.5.0
Public Types | Public Member Functions | Private Attributes | List of all members
ome::files::tiff::ValueProxy< V > Class Template Reference

Proxy for getting and setting a Field value. More...

#include <ome/files/tiff/Field.h>

Public Types

typedef V value_type
 The value type being wrapped.
 

Public Member Functions

 ValueProxy (value_type &value)
 Construct from value. More...
 
 ~ValueProxy ()
 Destructor.
 
ValueProxyoperator= (const ValueProxy &value)
 Assign from a ValueProxy. More...
 
ValueProxyoperator= (const value_type &value)
 Assign from value_type. More...
 
template<typename F >
ValueProxyoperator= (const Field< F > &field)
 Assign from Field. More...
 
value_typeget ()
 Get the wrapped value. More...
 
const value_typeget () const
 Get the wrapped value. More...
 

Private Attributes

V & value
 The wrapped value.
 

Detailed Description

template<typename V>
class ome::files::tiff::ValueProxy< V >

Proxy for getting and setting a Field value.

This wraps a value to allow it to be assigned a value from a Field as the left hand side of an expression.

Note
the lifetime of this wrapper may not exceed that of the wrapped value since it is stored by reference.

Constructor & Destructor Documentation

◆ ValueProxy()

template<typename V >
ome::files::tiff::ValueProxy< V >::ValueProxy ( value_type value)
inlineexplicit

Construct from value.

Parameters
valuethe value to wrap.

Member Function Documentation

◆ get() [1/2]

template<typename V >
value_type& ome::files::tiff::ValueProxy< V >::get ( )
inline

Get the wrapped value.

Returns
the wrapped value.

◆ get() [2/2]

template<typename V >
const value_type& ome::files::tiff::ValueProxy< V >::get ( ) const
inline

Get the wrapped value.

Returns
the wrapped value.

◆ operator=() [1/3]

template<typename V >
ValueProxy& ome::files::tiff::ValueProxy< V >::operator= ( const ValueProxy< V > &  value)
inline

Assign from a ValueProxy.

Parameters
valuethe value to assign.
Returns
the ValueProxy.

References ome::files::tiff::ValueProxy< V >::value.

◆ operator=() [2/3]

template<typename V >
ValueProxy& ome::files::tiff::ValueProxy< V >::operator= ( const value_type value)
inline

Assign from value_type.

Parameters
valuethe value to assign.
Returns
the ValueProxy.

◆ operator=() [3/3]

template<typename V >
template<typename F >
ValueProxy& ome::files::tiff::ValueProxy< V >::operator= ( const Field< F > &  field)
inline

Assign from Field.

Parameters
fieldthe field to assign.
Returns
the ValueProxy.

References ome::files::tiff::Field< Tag >::get().


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