Shaka Player Embedded
Public Member Functions | List of all members
shaka::impl::FieldConverterBase Class Referenceabstract

#include <struct.h>

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

Public Member Functions

virtual ~FieldConverterBase ()
 
virtual void SearchAndStore (Struct *dict, Handle< JsObject > object)=0
 
virtual void AddToObject (const Struct *dict, Handle< JsObject > object) const =0
 
virtual void Trace (const Struct *dict, memory::HeapTracer *tracer) const =0
 

Detailed Description

Defines a base class for a field converter. This represents a member of a struct and will convert the JavaScript object member to the respective C++ object member, and vice versa.

There needs to be a non-templated base class because we store a vector of them in Struct and they have different (and only known in CreateFieldMember) types.

Definition at line 88 of file struct.h.

Constructor & Destructor Documentation

§ ~FieldConverterBase()

virtual shaka::impl::FieldConverterBase::~FieldConverterBase ( )
inlinevirtual

Definition at line 90 of file struct.h.

Member Function Documentation

§ AddToObject()

virtual void shaka::impl::FieldConverterBase::AddToObject ( const Struct dict,
Handle< JsObject >  object 
) const
pure virtual

Stores the value of the field in the given object.

Implemented in shaka::impl::FieldConverter< Parent, Field >.

§ SearchAndStore()

virtual void shaka::impl::FieldConverterBase::SearchAndStore ( Struct dict,
Handle< JsObject >  object 
)
pure virtual

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.

Implemented in shaka::impl::FieldConverter< Parent, Field >.

§ Trace()

virtual void shaka::impl::FieldConverterBase::Trace ( const Struct dict,
memory::HeapTracer tracer 
) const
pure virtual

Traces the member on the given object.

Implemented in shaka::impl::FieldConverter< Parent, Field >.


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