List of all members | Public Member Functions | Friends
casadi::WeakRef Class Reference

Weak reference type. More...

#include <shared_object.hpp>

Detailed Description

A weak reference to a SharedObject

Author
Joel Andersson
Date
2013

Extra doc: https://github.com/casadi/casadi/wiki/L_ax

Definition at line 181 of file shared_object.hpp.

Inheritance diagram for casadi::WeakRef:
Inheritance graph
[legend]

Public Member Functions

 WeakRef (int dummy=0)
 Default constructor. More...
 
 WeakRef (SharedObject shared)
 Construct from a shared object (also implicit type conversion) More...
 
SharedObject shared ()
 Get a shared (owning) reference. More...
 
bool alive () const
 Check if alive. More...
 
WeakRefInternal * operator-> ()
 Access functions of the node. More...
 
const WeakRefInternal * operator-> () const
 Const access functions of the node. More...
 
std::string class_name () const
 Get class name. More...
 
void disp (std::ostream &stream, bool more=false) const
 Print a description of the object. More...
 
std::string get_str (bool more=false) const
 Get string representation. More...
 
bool is_null () const
 Is a null pointer? More...
 
casadi_int __hash__ () const
 Returns a number that is unique for a given Node. More...
 

Friends

class SharedObjectInternal
 

Constructor & Destructor Documentation

◆ WeakRef() [1/2]

casadi::WeakRef::WeakRef ( int  dummy = 0)

◆ WeakRef() [2/2]

casadi::WeakRef::WeakRef ( SharedObject  shared)

Member Function Documentation

◆ __hash__()

casadi_int casadi::SharedObject::__hash__ ( ) const
inherited

If the Object does not point to any node, "0" is returned.

Extra doc: https://github.com/casadi/casadi/wiki/L_av

◆ alive()

bool casadi::WeakRef::alive ( ) const

◆ class_name()

std::string casadi::SharedObject::class_name ( ) const
inherited

◆ disp()

void casadi::SharedObject::disp ( std::ostream &  stream,
bool  more = false 
) const
inherited

◆ get_str()

std::string casadi::SharedObject::get_str ( bool  more = false) const
inlineinherited

Definition at line 138 of file shared_object.hpp.

◆ is_null()

bool casadi::SharedObject::is_null ( ) const
inherited

◆ operator->() [1/2]

WeakRefInternal* casadi::WeakRef::operator-> ( )

◆ operator->() [2/2]

const WeakRefInternal* casadi::WeakRef::operator-> ( ) const

◆ shared()

SharedObject casadi::WeakRef::shared ( )

Friends And Related Function Documentation

◆ SharedObjectInternal

friend class SharedObjectInternal
friend

Definition at line 183 of file shared_object.hpp.


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