Shaka Player Embedded
Public Member Functions | List of all members
shaka::impl::FieldConverter< Parent, Field > Class Template Reference

#include <struct.h>

Inheritance diagram for shaka::impl::FieldConverter< Parent, Field >:
shaka::impl::FieldConverterBase

Public Member Functions

 FieldConverter (const std::string &name, Field Parent::*member)
 
void SearchAndStore (Struct *dict, Handle< JsObject > object) override
 
void AddToObject (const Struct *dict, Handle< JsObject > object) const override
 
void Trace (const Struct *dict, memory::HeapTracer *tracer) const override
 
- Public Member Functions inherited from shaka::impl::FieldConverterBase
virtual ~FieldConverterBase ()
 

Detailed Description

template<typename Parent, typename Field>
class shaka::impl::FieldConverter< Parent, Field >

The implementation of the field converter. This will convert a field of type Field that is defined on the type Parent.

Definition at line 109 of file struct.h.

Constructor & Destructor Documentation

§ FieldConverter()

template<typename Parent, typename Field>
shaka::impl::FieldConverter< Parent, Field >::FieldConverter ( const std::string &  name,
Field Parent::*  member 
)
inline

Definition at line 111 of file struct.h.

Member Function Documentation

§ AddToObject()

template<typename Parent, typename Field>
void shaka::impl::FieldConverter< Parent, Field >::AddToObject ( const Struct dict,
Handle< JsObject >  object 
) const
inlineoverridevirtual

Stores the value of the field in the given object.

Implements shaka::impl::FieldConverterBase.

Definition at line 121 of file struct.h.

§ SearchAndStore()

template<typename Parent, typename Field>
void shaka::impl::FieldConverter< Parent, Field >::SearchAndStore ( Struct dict,
Handle< JsObject >  object 
)
inlineoverridevirtual

Search the given object for a property with the name of the field this is converting. If found, try to convert it and store in the field.

Implements shaka::impl::FieldConverterBase.

Definition at line 115 of file struct.h.

§ Trace()

template<typename Parent, typename Field>
void shaka::impl::FieldConverter< Parent, Field >::Trace ( const Struct dict,
memory::HeapTracer tracer 
) const
inlineoverridevirtual

Traces the member on the given object.

Implements shaka::impl::FieldConverterBase.

Definition at line 127 of file struct.h.


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