The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Private Types | Private Attributes | List of all members
TargetTypedPropertyAccessor< V, T, typename > Class Template Reference

#include <PropertyAccessor.hpp>

Inheritance diagram for TargetTypedPropertyAccessor< V, T, typename >:
Inheritance graph
[legend]

Public Member Functions

 TargetTypedPropertyAccessor (Getter getter, Setter setter)
 
void setTargetValue (Item *target, V value) const override
 
targetValue (const Item *target) const override
 
virtual void setTargetValue (Item *target, V value) const =0
 
virtual V targetValue (const Item *target) const =0
 
- Public Member Functions inherited from PropertyAccessor
 PropertyAccessor (const PropertyAccessor &)=delete
 
PropertyAccessoroperator= (const PropertyAccessor &)=delete
 

Private Types

using Getter = V(T::*)() const
 
using Setter = void(T::*)(V)
 

Private Attributes

Getter _getter
 
Setter _setter
 

Detailed Description

template<typename V, class T, typename = void>
class TargetTypedPropertyAccessor< V, T, typename >

The TargetTypedPropertyAccessor template class sits at level two of the PropertyAccessor class hierarchy. It actually implements the property access interface for a value type V and for a target type T (which must inherit Item), both given as template parameters. TargetTypedPropertyAccessor inherits TypedPropertyAccessor with an appropriate value type. The template is specialized for several value types to allow special processing, such as casting pointers between Item and one of its subclasses, or translating an enumeration value to an integer and vice versa. Refer to the PropertyAccessor class for more information.

Member Function Documentation

◆ setTargetValue()

template<typename V , class T , typename = void>
void TargetTypedPropertyAccessor< V, T, typename >::setTargetValue ( Item target,
value 
) const
inlineoverridevirtual

◆ targetValue()

template<typename V , class T , typename = void>
V TargetTypedPropertyAccessor< V, T, typename >::targetValue ( const Item target) const
inlineoverridevirtual

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