kanzi::ContentReference< TResourceType > Class Template Reference

#include <kanzi/core.ui/node/content_reference.hpp>

Inheritance diagram for kanzi::ContentReference< TResourceType >:
kanzi::AbstractResourceReference

Public Types

typedef function< void()> CallbackType
 
typedef shared_ptr< TResourceType > ResourceTypePtr
 

Public Member Functions

 operator bool_type () const
 
 ContentReference (Node &thisObject)
 
 ~ContentReference ()
 
void setResource (const ResourceID &id)
 
virtual void onIdChanged () KZ_OVERRIDE
 
virtual void onResourceChanged () KZ_OVERRIDE
 
virtual void release () KZ_OVERRIDE
 
virtual ResourceSharedPtr getResource () KZ_OVERRIDE
 
ResourceTypePtr makeLocal ()
 Clone reference to be an internal copy. More...
 
ResourceTypePtr getUserResource () const
 Access user resource. More...
 
void resetUserResource ()
 Clear user resource. More...
 
void setUserResource (ResourceTypePtr userResource)
 Set user resource. More...
 
void setCallback (CallbackType callback)
 
ResourceTypePtr get () const
 
TResourceType * operator-> () const
 
TResourceType & operator* () const
 

Protected Member Functions

ResourceTypePtrresolve ()
 
const ResourceTypePtrresolve () const
 
void updateResource ()
 
void updateChangeFlags () const
 
void notifyCallback ()
 
- Protected Member Functions inherited from kanzi::AbstractResourceReference
virtual ~AbstractResourceReference ()
 

Member Typedef Documentation

template<typename TResourceType >
typedef function<void()> kanzi::ContentReference< TResourceType >::CallbackType
template<typename TResourceType >
typedef shared_ptr<TResourceType> kanzi::ContentReference< TResourceType >::ResourceTypePtr

Constructor & Destructor Documentation

template<typename TResourceType >
kanzi::ContentReference< TResourceType >::ContentReference ( Node thisObject)
explicit
template<typename TResourceType >
kanzi::ContentReference< TResourceType >::~ContentReference ( )

Member Function Documentation

template<typename TResourceType >
kanzi::ContentReference< TResourceType >::operator bool_type ( ) const
inline
template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::setResource ( const ResourceID id)
inline
template<typename TResourceType >
virtual void kanzi::ContentReference< TResourceType >::onIdChanged ( )
inlinevirtual
template<typename TResourceType >
virtual void kanzi::ContentReference< TResourceType >::onResourceChanged ( )
inlinevirtual
template<typename TResourceType >
virtual void kanzi::ContentReference< TResourceType >::release ( )
inlinevirtual
template<typename TResourceType >
virtual ResourceSharedPtr kanzi::ContentReference< TResourceType >::getResource ( )
inlinevirtual
template<typename TResourceType >
ResourceTypePtr kanzi::ContentReference< TResourceType >::makeLocal ( )
inline

Clone reference to be an internal copy.

Default implementation clones nothing, and returns an empty shared pointer.

template<typename TResourceType >
ResourceTypePtr kanzi::ContentReference< TResourceType >::getUserResource ( ) const
inline

Access user resource.

Returns
User resource shared pointer.
template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::resetUserResource ( )
inline

Clear user resource.

template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::setUserResource ( ResourceTypePtr  userResource)
inline

Set user resource.

Parameters
userResourceNew user resource.
template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::setCallback ( CallbackType  callback)
inline
template<typename TResourceType >
ResourceTypePtr kanzi::ContentReference< TResourceType >::get ( ) const
inline
template<typename TResourceType >
TResourceType* kanzi::ContentReference< TResourceType >::operator-> ( ) const
inline
template<typename TResourceType >
TResourceType& kanzi::ContentReference< TResourceType >::operator* ( ) const
inline
template<typename TResourceType >
ResourceTypePtr& kanzi::ContentReference< TResourceType >::resolve ( )
inlineprotected
template<typename TResourceType >
const ResourceTypePtr& kanzi::ContentReference< TResourceType >::resolve ( ) const
inlineprotected
template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::updateResource ( )
protected
template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::updateChangeFlags ( ) const
protected
template<typename TResourceType >
void kanzi::ContentReference< TResourceType >::notifyCallback ( )
inlineprotected

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