Base Module: FNuller< T > Struct Template Reference
Author: Steinberg

Base Module VST 3.8 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
FNuller< T > Struct Template Reference

Template definition for classes that help resetting an object's value. More...

`#include <fcleanup.h>`

## Public Member Functions
| FNuller (T &_toNull)
| Constructor.
| ~FNuller ()
| Destructor. Assigns 0 to the at construction time passed object reference.

## Public Attributes
T & | toNull
| Remembers the object that is to be assigned 0 during destruction.

## Detailed Description

template<class T>
struct Steinberg::FNuller< T >

Template definition for classes that help resetting an object's value.

A stack allocated object of this type automatically resets the value of an at construction time passed object to null when it reaches the end of its scope.
Intended usage:

int theObject
= 0;
{
Steinberg::FNuller<int> theNuller (theObject);
theObject = 1;
} // Here the destructor of theNuller resets the value of theObject to 0.
Steinberg::FNuller
Template definition for classes that help resetting an object's value.
Definition fcleanup.h:130

## Constructor & Destructor Documentation

## ◆ FNuller()

template<class T>

FNuller | ( | T & | _toNull | ) |
| inline

Constructor.

_toNull is a reference to the object that is to be assigned 0 when this FNuller object's destructor is executed.

## ◆ ~FNuller()

template<class T>

~FNuller | ( |  | ) |
| inline

Destructor. Assigns 0 to the at construction time passed object reference.

## Member Data Documentation

## ◆ toNull

template<class T>

T& toNull

Remembers the object that is to be assigned 0 during destruction.

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.