| Flutter Impeller |

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

`#include <command.h>`

## Public Types
using | ResourceType = T

## Public Member Functions
| Resource ()
| Resource (const ShaderMetadata *metadata, ResourceType p_resource)
| Resource (std::shared_ptr< const ShaderMetadata > &metadata, ResourceType p_resource)
const ShaderMetadata * | GetMetadata () const

## Public Attributes
ResourceType | resource

## Detailed Description

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

Definition at line 35 of file command.h.

## Member Typedef Documentation

## ◆ ResourceType

template<class T >

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

Definition at line 36 of file command.h.

## Constructor & Destructor Documentation

## ◆ Resource() [1/3]

template<class T >

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

Definition at line 39 of file command.h.

39 {}

## ◆ Resource() [2/3]

template<class T >

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

Definition at line 41 of file command.h.

42 : resource(p_resource), metadata_(metadata) {}

## ◆ Resource() [3/3]

template<class T >

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

Definition at line 44 of file command.h.

46 : resource(p_resource), dynamic_metadata_(metadata) {}

## Member Function Documentation

## ◆ GetMetadata()

template<class T >

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

Definition at line 48 of file command.h.

48 {
49 return dynamic_metadata_ ? dynamic_metadata_.get() : metadata_;
50 }

## Member Data Documentation

## ◆ resource

template<class T >

ResourceType impeller::Resource< T >::resource

Definition at line 37 of file command.h.

Referenced by impeller::Command::GetVertexBuffer().

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

- impeller/renderer/command.h

impeller::Resource::resource
ResourceType resource
Definition: command.h:37