Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
SkSVGProperty< T, kInheritable > Class Template Reference

#include <SkSVGTypes.h>

Public Types

using ValueT = T
 

Public Member Functions

 SkSVGProperty ()
 
 SkSVGProperty (SkSVGPropertyState state)
 
 SkSVGProperty (const T &value)
 
 SkSVGProperty (T &&value)
 
template<typename... Args>
void init (Args &&... args)
 
constexpr bool isInheritable () const
 
bool isValue () const
 
TgetMaybeNull () const
 
void set (SkSVGPropertyState state)
 
void set (const T &value)
 
void set (T &&value)
 
Toperator-> ()
 
const Toperator-> () const
 
Toperator* ()
 
const Toperator* () const
 

Detailed Description

template<typename T, bool kInheritable>
class SkSVGProperty< T, kInheritable >

Definition at line 40 of file SkSVGTypes.h.

Member Typedef Documentation

◆ ValueT

template<typename T , bool kInheritable>
using SkSVGProperty< T, kInheritable >::ValueT = T

Definition at line 42 of file SkSVGTypes.h.

Constructor & Destructor Documentation

◆ SkSVGProperty() [1/4]

template<typename T , bool kInheritable>
SkSVGProperty< T, kInheritable >::SkSVGProperty ( )
inline

Definition at line 44 of file SkSVGTypes.h.

◆ SkSVGProperty() [2/4]

template<typename T , bool kInheritable>
SkSVGProperty< T, kInheritable >::SkSVGProperty ( SkSVGPropertyState  state)
inlineexplicit

Definition at line 46 of file SkSVGTypes.h.

46: fState(state) {}
AtkStateType state

◆ SkSVGProperty() [3/4]

template<typename T , bool kInheritable>
SkSVGProperty< T, kInheritable >::SkSVGProperty ( const T value)
inlineexplicit

Definition at line 48 of file SkSVGTypes.h.

49 fValue = value;
50 }
uint8_t value

◆ SkSVGProperty() [4/4]

template<typename T , bool kInheritable>
SkSVGProperty< T, kInheritable >::SkSVGProperty ( T &&  value)
inlineexplicit

Definition at line 52 of file SkSVGTypes.h.

53 fValue = std::move(value);
54 }

Member Function Documentation

◆ getMaybeNull()

template<typename T , bool kInheritable>
T * SkSVGProperty< T, kInheritable >::getMaybeNull ( ) const
inline

Definition at line 66 of file SkSVGTypes.h.

66 {
67 return fValue.has_value() ? &fValue.value() : nullptr;
68 }

◆ init()

template<typename T , bool kInheritable>
template<typename... Args>
void SkSVGProperty< T, kInheritable >::init ( Args &&...  args)
inline

Definition at line 57 of file SkSVGTypes.h.

57 {
59 fValue.emplace(std::forward<Args>(args)...);
60 }
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ isInheritable()

template<typename T , bool kInheritable>
constexpr bool SkSVGProperty< T, kInheritable >::isInheritable ( ) const
inlineconstexpr

Definition at line 62 of file SkSVGTypes.h.

62{ return kInheritable; }

◆ isValue()

template<typename T , bool kInheritable>
bool SkSVGProperty< T, kInheritable >::isValue ( ) const
inline

Definition at line 64 of file SkSVGTypes.h.

64{ return fState == SkSVGPropertyState::kValue; }

◆ operator*() [1/2]

template<typename T , bool kInheritable>
T & SkSVGProperty< T, kInheritable >::operator* ( )
inline

Definition at line 99 of file SkSVGTypes.h.

99 {
101 SkASSERT(fValue.has_value());
102 return *fValue;
103 }
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ operator*() [2/2]

template<typename T , bool kInheritable>
const T & SkSVGProperty< T, kInheritable >::operator* ( ) const
inline

Definition at line 105 of file SkSVGTypes.h.

105 {
107 SkASSERT(fValue.has_value());
108 return *fValue;
109 }

◆ operator->() [1/2]

template<typename T , bool kInheritable>
T * SkSVGProperty< T, kInheritable >::operator-> ( )
inline

Definition at line 87 of file SkSVGTypes.h.

87 {
89 SkASSERT(fValue.has_value());
90 return &fValue.value();
91 }

◆ operator->() [2/2]

template<typename T , bool kInheritable>
const T * SkSVGProperty< T, kInheritable >::operator-> ( ) const
inline

Definition at line 93 of file SkSVGTypes.h.

93 {
95 SkASSERT(fValue.has_value());
96 return &fValue.value();
97 }

◆ set() [1/3]

template<typename T , bool kInheritable>
void SkSVGProperty< T, kInheritable >::set ( const T value)
inline

Definition at line 77 of file SkSVGTypes.h.

77 {
79 fValue = value;
80 }

◆ set() [2/3]

template<typename T , bool kInheritable>
void SkSVGProperty< T, kInheritable >::set ( SkSVGPropertyState  state)
inline

Definition at line 70 of file SkSVGTypes.h.

70 {
71 fState = state;
72 if (fState != SkSVGPropertyState::kValue) {
73 fValue.reset();
74 }
75 }

◆ set() [3/3]

template<typename T , bool kInheritable>
void SkSVGProperty< T, kInheritable >::set ( T &&  value)
inline

Definition at line 82 of file SkSVGTypes.h.

82 {
84 fValue = std::move(value);
85 }

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