HasValueReceiver< T > Class Template Reference

#include <valuereceiver.h>

Detailed Description

template<typename T>
class maxon::HasValueReceiver< T >

ValueReceiver type that will verify if one value was received from the caller. No information about the actual value collected will be retained, just found/not found. Useful for calls such as GetConnections when we are interested if there is at least one/any of connection of the given type. Iterations stop after a value is found.

String myString;
...
HasValueReceiver<const String&> recv;
myString.Split('a', false, recv) iferr_return;
if (recv.IsPopulated())
DiagnosticOutput("At least one value was found");
Definition: c4d_string.h:39
Bool IsPopulated() const
Definition: string.h:1449
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:176
#define iferr_return
Definition: resultbase.h:1465

Public Member Functions

 operator ValueReceiver< T > ()
 
Bool IsPopulated () const
 
Bool IsEmpty () const
 
void Reset ()
 

Private Attributes

Bool _hasValue
 

Member Function Documentation

◆ operator ValueReceiver< T >()

operator ValueReceiver< T > ( )

◆ IsPopulated()

Bool IsPopulated ( void  ) const

◆ IsEmpty()

Bool IsEmpty ( ) const

◆ Reset()

void Reset ( void  )

Member Data Documentation

◆ _hasValue

Bool _hasValue
private