ESPHome  2024.12.0
Public Member Functions | Protected Attributes
esphome::Parented< T > Class Template Reference

Helper class to easily give an object a parent of type T. More...

#include <helpers.h>

Public Member Functions

 Parented ()
 
 Parented (T *parent)
 
T * get_parent () const
 Get the parent of this object. More...
 
void set_parent (T *parent)
 Set the parent of this object. More...
 

Protected Attributes

T * parent_ {nullptr}
 

Detailed Description

template<typename T>
class esphome::Parented< T >

Helper class to easily give an object a parent of type T.

Definition at line 530 of file helpers.h.

Constructor & Destructor Documentation

◆ Parented() [1/2]

template<typename T>
esphome::Parented< T >::Parented ( )
inline

Definition at line 532 of file helpers.h.

◆ Parented() [2/2]

template<typename T>
esphome::Parented< T >::Parented ( T *  parent)
inline

Definition at line 533 of file helpers.h.

Member Function Documentation

◆ get_parent()

template<typename T>
T* esphome::Parented< T >::get_parent ( ) const
inline

Get the parent of this object.

Definition at line 536 of file helpers.h.

◆ set_parent()

template<typename T>
void esphome::Parented< T >::set_parent ( T *  parent)
inline

Set the parent of this object.

Definition at line 538 of file helpers.h.

Field Documentation

◆ parent_

template<typename T>
T* esphome::Parented< T >::parent_ {nullptr}
protected

Definition at line 541 of file helpers.h.


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