Shaka Player Embedded
Public Member Functions | Static Public Member Functions | Friends | List of all members
shaka::BackingObjectFactoryRegistry< T > Class Template Reference

#include <backing_object_factory.h>

Inheritance diagram for shaka::BackingObjectFactoryRegistry< T >:
shaka::BackingObjectFactoryBase shaka::PseudoSingleton< BackingObjectFactoryRegistry< T > > shaka::BackingObjectFactory< T, events::EventTarget > shaka::BackingObjectFactory< T, Base > shaka::js::mse::TrackListFactory< T >

Public Member Functions

 BackingObjectFactoryRegistry (BackingObjectFactoryBase *base)
 
template<>
BackingObjectFactoryBaseCheckedInstance ()
 
- Public Member Functions inherited from shaka::BackingObjectFactoryBase
virtual ~BackingObjectFactoryBase ()
 
const std::string & name () const
 
const BackingObjectFactoryBasebase () const
 
ReturnVal< JsValue > GetConstructor () const
 
bool DerivedFrom (const std::string &name) const
 
ReturnVal< JsValue > WrapInstance (BackingObject *object)
 
ReturnVal< JsValue > GetIndex (Handle< JsObject > that, size_t index)
 
void SetIndex (Handle< JsObject > that, size_t index, Handle< JsValue > value)
 

Static Public Member Functions

static BackingObjectFactoryBaseCheckedInstance ()
 

Friends

class PseudoSingleton< BackingObjectFactoryRegistry< T > >
 

Additional Inherited Members

- Protected Member Functions inherited from shaka::BackingObjectFactoryBase
 BackingObjectFactoryBase (const std::string &name, NativeCtor ctor, const BackingObjectFactoryBase *base)
 
template<typename Callback >
void AddMemberFunction (const std::string &name, Callback callback)
 
template<typename Ret , typename... Args>
void AddStaticFunction (const std::string &name, Ret(*callback)(Args...))
 
template<typename Prop >
void AddListenerField (js::EventType type, Prop member)
 
template<typename This , typename Prop >
void AddReadOnlyProperty (const std::string &name, Prop This::*member)
 
template<typename This , typename Prop >
void AddReadWriteProperty (const std::string &name, Prop This::*member)
 
template<typename Derived = void, typename This = void, typename GetProp = void>
void AddGenericProperty (const std::string &name, GetProp(This::*get)() const)
 
template<typename Derived = void, typename This = void, typename GetProp = void, typename SetProp = void, typename SetPropRet = void>
void AddGenericProperty (const std::string &name, GetProp(This::*get)() const, SetPropRet(This::*set)(SetProp))
 
template<typename T >
void AddConstant (const std::string &name, T value)
 
template<typename This , typename T >
void AddIndexer (bool(This::*get)(size_t, T *) const, void(This::*set)(size_t, T)=nullptr)
 
void NotImplemented (const std::string &name)
 

Detailed Description

template<typename T>
class shaka::BackingObjectFactoryRegistry< T >

An intermediate type that allows getting the singleton instance for a given BackingObject type. The instance can't be stored in BackingObjectFactory since doing so would require knowing the base type. To be able to be used in this way, it is valid to use the Instance() method when T is void, but it is invalid to create an instance when T is void.

Definition at line 377 of file backing_object_factory.h.

Constructor & Destructor Documentation

§ BackingObjectFactoryRegistry()

template<typename T>
shaka::BackingObjectFactoryRegistry< T >::BackingObjectFactoryRegistry ( BackingObjectFactoryBase base)
inlineexplicit

Definition at line 381 of file backing_object_factory.h.

Member Function Documentation

§ CheckedInstance() [1/2]

template<typename T>
static BackingObjectFactoryBase* shaka::BackingObjectFactoryRegistry< T >::CheckedInstance ( )
inlinestatic

Returns the instance of the factory that will generate objects of type T. Instance() will CHECK for the value not being null. There is a specialization below for T == void so this will still return null on that case.

Definition at line 391 of file backing_object_factory.h.

§ CheckedInstance() [2/2]

template<>
BackingObjectFactoryBase * shaka::BackingObjectFactoryRegistry< void >::CheckedInstance ( )
inline

Definition at line 400 of file backing_object_factory.h.

Friends And Related Function Documentation

§ PseudoSingleton< BackingObjectFactoryRegistry< T > >

template<typename T>
friend class PseudoSingleton< BackingObjectFactoryRegistry< T > >
friend

Definition at line 396 of file backing_object_factory.h.


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