Minsky
MathDAG::WeakNodePtr Struct Reference

weak reference into subexpression cache More...

#include <equations.h>

Collaboration diagram for MathDAG::WeakNodePtr:
Collaboration graph

Public Member Functions

Nodeoperator* ()
 
const Nodeoperator* () const
 
Nodeoperator-> ()
 
const Nodeoperator-> () const
 
WeakNodePtroperator= (const NodePtr &x)
 
WeakNodePtroperator= (Node *x)
 
 WeakNodePtr ()
 
template<class T >
 WeakNodePtr (const std::shared_ptr< T > &x)
 
 operator bool () const
 

Public Attributes

Nodepayload
 

Detailed Description

weak reference into subexpression cache

Definition at line 133 of file equations.h.

Constructor & Destructor Documentation

◆ WeakNodePtr() [1/2]

MathDAG::WeakNodePtr::WeakNodePtr ( )
inline

Definition at line 144 of file equations.h.

144 : payload(nullptr) {}

◆ WeakNodePtr() [2/2]

template<class T >
MathDAG::WeakNodePtr::WeakNodePtr ( const std::shared_ptr< T > &  x)
inline

Definition at line 146 of file equations.h.

146 : payload(x.get()) {}

Member Function Documentation

◆ operator bool()

MathDAG::WeakNodePtr::operator bool ( ) const
inline

Definition at line 147 of file equations.h.

147 {return payload!=nullptr;}

◆ operator*() [1/2]

Node& MathDAG::WeakNodePtr::operator* ( )
inline

Definition at line 136 of file equations.h.

136 {return *payload;}

◆ operator*() [2/2]

const Node& MathDAG::WeakNodePtr::operator* ( ) const
inline

Definition at line 137 of file equations.h.

137 {return *payload;}

◆ operator->() [1/2]

Node* MathDAG::WeakNodePtr::operator-> ( )
inline

Definition at line 138 of file equations.h.

138 {return payload;}

◆ operator->() [2/2]

const Node* MathDAG::WeakNodePtr::operator-> ( ) const
inline

Definition at line 139 of file equations.h.

139 {return payload;}

◆ operator=() [1/2]

WeakNodePtr& MathDAG::WeakNodePtr::operator= ( const NodePtr x)
inline

Definition at line 140 of file equations.h.

141  {payload=x.get(); return *this;}

◆ operator=() [2/2]

WeakNodePtr& MathDAG::WeakNodePtr::operator= ( Node x)
inline

Definition at line 142 of file equations.h.

143  {payload=x; return *this;}

Member Data Documentation

◆ payload

Node* MathDAG::WeakNodePtr::payload

Definition at line 135 of file equations.h.


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