15#ifndef INCLUDED_GR_RUNTIME_SPTR_MAGIC_H
16#define INCLUDED_GR_RUNTIME_SPTR_MAGIC_H
32 static std::shared_ptr<gr::basic_block> fetch_initial_sptr(
gr::basic_block* p);
43std::shared_ptr<T> get_initial_sptr(T* p)
45 return std::dynamic_pointer_cast<T, gr::basic_block>(
46 detail::sptr_magic::fetch_initial_sptr(p));
54template <
typename T,
typename... Args>
55std::shared_ptr<T> make_block_sptr(Args&&... args)
57 return get_initial_sptr(
new T(std::forward<Args>(args)...));
Definition: sptr_magic.h:30
The abstract base class for all signal processing blocks.
Definition: basic_block.h:63
Hierarchical container class for gr::block's and gr::hier_block2's.
Definition: hier_block2.h:34
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
Definition: sptr_magic.h:26
GNU Radio logging wrapper.
Definition: basic_block.h:29