| Flutter Impeller |

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
impeller::Resource< T > Class Template Reference

`#include <command.h>`

## Public Types
using | ResourceType = T

## Public Member Functions
| Resource ()
| Resource (const ShaderMetadata *metadata, ResourceType p_resource)
const ShaderMetadata * | GetMetadata () const

## Static Public Member Functions
static Resource | MakeDynamic (std::unique_ptr< ShaderMetadata > metadata, ResourceType p_resource)

## Public Attributes
ResourceType | resource

## Detailed Description

### template<class T>
class impeller::Resource< T >

Definition at line 24 of file command.h.

## Member Typedef Documentation

## ◆ ResourceType

template<class T >

using impeller::Resource< T >::ResourceType = T

Definition at line 26 of file command.h.

## Constructor & Destructor Documentation

## ◆ Resource() [1/2]

template<class T >

impeller::Resource< T >::Resource | ( |  | ) |
| inline

Definition at line 29 of file command.h.

29 {}

Referenced by impeller::Resource< T >::MakeDynamic().

## ◆ Resource() [2/2]

template<class T >

impeller::Resource< T >::Resource | ( | const ShaderMetadata * | metadata,
|  | ResourceType | p_resource
| ) |  |
| inline

Definition at line 31 of file command.h.

32 : resource(p_resource), metadata_(metadata) {}
impeller::Resource::resource
ResourceType resource
Definition: command.h:27

## Member Function Documentation

## ◆ GetMetadata()

template<class T >

const ShaderMetadata* impeller::Resource< T >::GetMetadata | ( |  | ) | const
| inline

Definition at line 34 of file command.h.

34 {
35 return dynamic_metadata_ ? dynamic_metadata_.get() : metadata_;
36 }

## ◆ MakeDynamic()

template<class T >

static Resource impeller::Resource< T >::MakeDynamic | ( | std::unique_ptr< ShaderMetadata > | metadata,
|  | ResourceType | p_resource
| ) |  |
| inlinestatic

Definition at line 38 of file command.h.

39 {
40 return Resource(std::move(metadata), p_resource);
41 }
impeller::Resource::Resource
Resource()
Definition: command.h:29

References impeller::Resource< T >::Resource().

Referenced by impeller::RenderPass::BindDynamicResource().

## Member Data Documentation

## ◆ resource

template<class T >

ResourceType impeller::Resource< T >::resource

Definition at line 27 of file command.h.

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

- impeller/renderer/command.h