Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::CPProfiler::Option< T > Class Template Reference

Optional value class. More...

#include <message.hpp>

Public Member Functions

bool valid (void) const
 Check whether value is present.
void set (const T &t)
 Set value to t.
void unset (void)
 Disregard value.
const T & value (void) const
 Access value.
T & value (void)
 Access value.

Protected Attributes

value_
 A value, potentially not initialized.
bool present {false}
 Whether value is present.

Detailed Description

template<class T>
class Gecode::CPProfiler::Option< T >

Optional value class.

Definition at line 68 of file message.hpp.

Member Function Documentation

◆ valid()

template<class T>
bool Gecode::CPProfiler::Option< T >::valid ( void ) const
inline

Check whether value is present.

Definition at line 89 of file message.hpp.

◆ set()

template<class T>
void Gecode::CPProfiler::Option< T >::set ( const T & t)
inline

Set value to t.

Definition at line 94 of file message.hpp.

◆ unset()

template<class T>
void Gecode::CPProfiler::Option< T >::unset ( void )
inline

Disregard value.

Definition at line 99 of file message.hpp.

◆ value() [1/2]

template<class T>
const T & Gecode::CPProfiler::Option< T >::value ( void ) const
inline

Access value.

Definition at line 104 of file message.hpp.

◆ value() [2/2]

template<class T>
T & Gecode::CPProfiler::Option< T >::value ( void )
inline

Access value.

Definition at line 109 of file message.hpp.

Member Data Documentation

◆ value_

template<class T>
T Gecode::CPProfiler::Option< T >::value_
protected

A value, potentially not initialized.

Definition at line 71 of file message.hpp.

◆ present

template<class T>
bool Gecode::CPProfiler::Option< T >::present {false}
protected

Whether value is present.

Definition at line 73 of file message.hpp.


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