Flutter Engine
The Flutter Engine
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 ShaderMetadataGetMetadata () const
 

Public Attributes

ResourceType resource
 

Detailed Description

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

Definition at line 32 of file command.h.

Member Typedef Documentation

◆ ResourceType

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

Definition at line 33 of file command.h.

Constructor & Destructor Documentation

◆ Resource() [1/3]

template<class T >
impeller::Resource< T >::Resource ( )
inline

Definition at line 36 of file command.h.

36{}

◆ Resource() [2/3]

template<class T >
impeller::Resource< T >::Resource ( const ShaderMetadata metadata,
ResourceType  p_resource 
)
inline

Definition at line 38 of file command.h.

39 : resource(p_resource), metadata_(metadata) {}
ResourceType resource
Definition: command.h:34

◆ Resource() [3/3]

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

Definition at line 41 of file command.h.

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

Member Function Documentation

◆ GetMetadata()

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

Definition at line 45 of file command.h.

45 {
46 return dynamic_metadata_ ? dynamic_metadata_.get() : metadata_;
47 }

Member Data Documentation

◆ resource

template<class T >
ResourceType impeller::Resource< T >::resource

Definition at line 34 of file command.h.


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