static_smart_ptr_cast Method |
||||||||||||||
Casts a smart_ptr to a TType to a smart_ptr to a TDestType by using static_cast. | ||||||||||||||
Syntax: | template<typename TDestType,typename="" TType=""> inline smart_ptr<TDestType> static_smart_ptr_cast( smart_ptr<TType> op2 ) |
|||||||||||||
|
||||||||||||||
Return value: | The result of the static_cast operation. |
|||||||||||||
Remarks: | The program has to make sure that op2 is actually of type TDestType, otherwise its behavior is undefined. |
|||||||||||||
Information: | Namespace: DShowLib | |||||||||||||
Sample: | The following sample shows how cast a GrabberSinkType that was returned from Grabber::getSinkTypePtr to its actual type: grabber.setSinkType( FrameQueueSink::create( /* ... */ ) ); // ... smart_ptr<FrameQueueSink> pSink = static_smart_ptr_cast<FrameQueueSink>( grabber.getSinkTypePtr() ); |
|||||||||||||
See also: | smart_ptr |