List of all members | Public Member Functions
casadi::null_ptr_on_copy< T > Class Template Reference

Pointer that gets set to null when copied. More...

#include <optistack_internal.hpp>

Detailed Description

template<class T>
class casadi::null_ptr_on_copy< T >

Definition at line 36 of file optistack_internal.hpp.

Public Member Functions

 null_ptr_on_copy ()
 
 null_ptr_on_copy (const null_ptr_on_copy &rhs)
 
void operator= (T *ptr)
 
T * operator-> ()
 
 operator bool () const
 

Constructor & Destructor Documentation

◆ null_ptr_on_copy() [1/2]

template<class T >
casadi::null_ptr_on_copy< T >::null_ptr_on_copy ( )
inline

Definition at line 38 of file optistack_internal.hpp.

38 : ptr_(nullptr) {}

◆ null_ptr_on_copy() [2/2]

template<class T >
casadi::null_ptr_on_copy< T >::null_ptr_on_copy ( const null_ptr_on_copy< T > &  rhs)
inline

Definition at line 39 of file optistack_internal.hpp.

39 : ptr_(nullptr) {}

Member Function Documentation

◆ operator bool()

template<class T >
casadi::null_ptr_on_copy< T >::operator bool ( ) const
inline

Definition at line 42 of file optistack_internal.hpp.

42 { return ptr_; }

◆ operator->()

template<class T >
T* casadi::null_ptr_on_copy< T >::operator-> ( )
inline

Definition at line 41 of file optistack_internal.hpp.

41 { return ptr_; }

References casadi::T.

◆ operator=()

template<class T >
void casadi::null_ptr_on_copy< T >::operator= ( T *  ptr)
inline

Definition at line 40 of file optistack_internal.hpp.

40 { ptr_ = ptr; }

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