Flutter Engine
The Flutter Engine
Classes | Public Member Functions | Static Public Member Functions | List of all members
sk_tools::Registry< T > Class Template Reference

#include <Registry.h>

Inheritance diagram for sk_tools::Registry< T >:
SkNoncopyable

Classes

struct  Range
 

Public Member Functions

 Registry (T value, bool condition=true)
 
const Registrynext () const
 
const Tget () const
 

Static Public Member Functions

static const RegistryHead ()
 

Detailed Description

template<typename T>
class sk_tools::Registry< T >

Template class that registers itself (in the constructor) into a linked-list and provides a function-pointer. This can be used to auto-register a set of services, e.g. a set of image codecs.

Definition at line 21 of file Registry.h.

Constructor & Destructor Documentation

◆ Registry()

template<typename T >
sk_tools::Registry< T >::Registry ( T  value,
bool  condition = true 
)
inlineexplicit

Definition at line 23 of file Registry.h.

23 : fValue(value) {
24 if (condition) {
25 this->linkToRegistryHead();
26 }
27 }
uint8_t value

Member Function Documentation

◆ get()

template<typename T >
const T & sk_tools::Registry< T >::get ( ) const
inline

Definition at line 32 of file Registry.h.

32{ return fValue; }

◆ Head()

template<typename T >
static const Registry * sk_tools::Registry< T >::Head ( )
inlinestatic

Definition at line 29 of file Registry.h.

29{ return gHead; }

◆ next()

template<typename T >
const Registry * sk_tools::Registry< T >::next ( ) const
inline

Definition at line 31 of file Registry.h.

31{ return fChain; }

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