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. More... | |
virtual SharedObjectNode * | clone () const =0 |
Make a deep copy of the instance. More... | |
virtual void | deepCopyMembers (std::map< SharedObjectNode *, SharedObject > &already_copied) |
Deep copy data members. More... | |
int | getCount () const |
Get the reference count. More... | |
virtual void | init () |
Initialize the object. More... | |
bool | isInit () const |
Check if the object has been initialized. More... | |
SharedObjectNode & | operator= (const SharedObjectNode &node) |
Assignment operator. More... | |
virtual void | print (std::ostream &stream) const |
Print a destription of the object. More... | |
virtual void | repr (std::ostream &stream) const |
Print a representation of the object. More... | |
SharedObjectNode () | |
Default constructor. More... | |
SharedObjectNode (const SharedObjectNode &node) | |
Copy constructor. More... | |
virtual | ~SharedObjectNode ()=0 |
Destructor. More... | |
Protected Member Functions | |
template<class B > | |
B | shared_from_this () |
Get a shared object from the current internal object. More... | |
template<class B > | |
const B | shared_from_this () const |
Get a shared object from the current internal object. More... | |
Protected Attributes | |
bool | is_init_ |
Has the function been initialized? More... | |
Private Attributes | |
unsigned int | count |
Number of references pointing to the object. More... | |
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.
CasADi::SharedObjectNode::SharedObjectNode | ( | ) |
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.
|
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.
|
pure virtual |
Make a deep copy of the instance.
Implemented in ExportVariableInternal, ExportArgumentInternal, ExportIndexNode, and ExportDataInternal.
|
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.
|
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.
|
virtual |
Print a destription of the object.
Definition at line 149 of file shared_object.cpp.
|
virtual |
Print a representation of the object.
Definition at line 139 of file shared_object.cpp.
|
protected |
Get a shared object from the current internal object.
Definition at line 272 of file shared_object.hpp.
|
protected |
Get a shared object from the current internal object.
Definition at line 283 of file shared_object.hpp.
|
friend |
Definition at line 154 of file shared_object.hpp.
|
private |
Number of references pointing to the object.
Definition at line 207 of file shared_object.hpp.
|
protected |
Has the function been initialized?
Definition at line 203 of file shared_object.hpp.