Internal class for the reference counting framework, see comments on the public class. More...
#include <shared_object.hpp>

Public Member Functions | |
| void | assertInit () const |
| Assert that the object has been initialized. | |
| virtual SharedObjectNode * | clone () const =0 |
| Make a deep copy of the instance. | |
| virtual void | deepCopyMembers (std::map< SharedObjectNode *, SharedObject > &already_copied) |
| Deep copy data members. | |
| int | getCount () const |
| Get the reference count. | |
| virtual void | init () |
| Initialize the object. | |
| bool | isInit () const |
| Check if the object has been initialized. | |
| SharedObjectNode & | operator= (const SharedObjectNode &node) |
| Assignment operator. | |
| virtual void | print (std::ostream &stream) const |
| Print a destription of the object. | |
| virtual void | repr (std::ostream &stream) const |
| Print a representation of the object. | |
| SharedObjectNode () | |
| Default constructor. | |
| SharedObjectNode (const SharedObjectNode &node) | |
| Copy constructor. | |
| virtual | ~SharedObjectNode ()=0 |
| Destructor. | |
Protected Member Functions | |
| template<class B > | |
| B | shared_from_this () |
| Get a shared object from the current internal object. | |
| template<class B > | |
| const B | shared_from_this () const |
| Get a shared object from the current internal object. | |
Protected Attributes | |
| bool | is_init_ |
| Has the function been initialized? | |
Private Attributes | |
| unsigned int | count |
| Number of references pointing to the object. | |
Friends | |
| class | SharedObject |
Internal class for the reference counting framework, see comments on the public class.
Definition at line 153 of file shared_object.hpp.
Default constructor.
Definition at line 112 of file shared_object.cpp.
| CasADi::SharedObjectNode::SharedObjectNode | ( | const SharedObjectNode & | node | ) |
Copy constructor.
Definition at line 36 of file shared_object.cpp.
| CasADi::SharedObjectNode::~SharedObjectNode | ( | ) | [pure virtual] |
Destructor.
Definition at line 117 of file shared_object.cpp.
| void CasADi::SharedObjectNode::assertInit | ( | ) | const |
Assert that the object has been initialized.
Definition at line 222 of file shared_object.cpp.
| virtual SharedObjectNode* CasADi::SharedObjectNode::clone | ( | ) | const [pure virtual] |
Make a deep copy of the instance.
Implemented in ExportVariableInternal, ExportArgumentInternal, ExportIndexNode, and ExportDataInternal.
| void CasADi::SharedObjectNode::deepCopyMembers | ( | std::map< SharedObjectNode *, SharedObject > & | already_copied | ) | [virtual] |
Deep copy data members.
Reimplemented in ExportArgumentInternal.
Definition at line 207 of file shared_object.cpp.
| int CasADi::SharedObjectNode::getCount | ( | ) | const |
Get the reference count.
Definition at line 203 of file shared_object.cpp.
| void CasADi::SharedObjectNode::init | ( | ) | [virtual] |
Initialize the object.
Definition at line 125 of file shared_object.cpp.
| bool CasADi::SharedObjectNode::isInit | ( | ) | const |
Check if the object has been initialized.
Definition at line 218 of file shared_object.cpp.
| SharedObjectNode & CasADi::SharedObjectNode::operator= | ( | const SharedObjectNode & | node | ) |
Assignment operator.
Definition at line 41 of file shared_object.cpp.
| void CasADi::SharedObjectNode::print | ( | std::ostream & | stream | ) | const [virtual] |
Print a destription of the object.
Definition at line 149 of file shared_object.cpp.
| void CasADi::SharedObjectNode::repr | ( | std::ostream & | stream | ) | const [virtual] |
Print a representation of the object.
Definition at line 139 of file shared_object.cpp.
| B CasADi::SharedObjectNode::shared_from_this | ( | ) | [protected] |
Get a shared object from the current internal object.
Definition at line 272 of file shared_object.hpp.
| const B CasADi::SharedObjectNode::shared_from_this | ( | ) | const [protected] |
Get a shared object from the current internal object.
Definition at line 283 of file shared_object.hpp.
friend class SharedObject [friend] |
Definition at line 154 of file shared_object.hpp.
unsigned int CasADi::SharedObjectNode::count [private] |
Number of references pointing to the object.
Definition at line 207 of file shared_object.hpp.
bool CasADi::SharedObjectNode::is_init_ [protected] |
Has the function been initialized?
Definition at line 203 of file shared_object.hpp.