34template <
typename T,
typename U>
35static inline std::shared_ptr<T> property_private_cast(
const std::shared_ptr<U> &r)
37 static struct Invalid :
public T
41 auto result = std::dynamic_pointer_cast<T>(r);
46 if (result ==
nullptr && r !=
nullptr)
49 if (std::strcmp(
typeid(
object).name(),
typeid(T).name()) == 0)
50 result = std::static_pointer_cast<T>(r);
53 return result !=
nullptr ? result : make_shared_weak(&invalid);
60 void *
property =
nullptr;
77#ifdef INDI_PROPERTY_BACKWARD_COMPATIBILE
Class to provide basic INDI device functionality.
virtual ~PropertyPrivate()
std::function< void()> onUpdateCallback
Provides generic container for INDI properties.
Namespace to encapsulate INDI client, drivers, and mediator classes.