ESPHome  2022.11.3
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 500 of file helpers.h.

Constructor & Destructor Documentation

◆ Parented() [1/2]

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

Definition at line 502 of file helpers.h.

◆ Parented() [2/2]

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

Definition at line 503 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 506 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 508 of file helpers.h.

Field Documentation

◆ parent_

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

Definition at line 511 of file helpers.h.


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