Gecode::SharedHandle Class Reference
[Support for copied and shared objects and handles]
The shared handle. More...
#include <core.hpp>
Classes | |
class | Object |
The shared object. More... | |
Public Member Functions | |
SharedHandle (void) | |
Create shared handle with no object pointing to. | |
SharedHandle (SharedHandle::Object *so) | |
Create shared handle that points to shared object so. | |
SharedHandle (const SharedHandle &sh) | |
Copy constructor maintaining reference count. | |
SharedHandle & | operator= (const SharedHandle &sh) |
Assignment operator mainitaining reference count. | |
void | update (Space &home, bool share, SharedHandle &sh) |
Updating during cloning. | |
~SharedHandle (void) | |
Destructor that maintains reference count. | |
Protected Member Functions | |
Object * | object (void) const |
Access to the shared object. | |
void | object (SharedHandle::Object *n) |
Modify shared object. |
Detailed Description
The shared handle.
A shared handle provides access to an object that lives outside a space, and is shared between entities that possibly reside inside different spaces. The handle has an update mechanism that supports updates with and without sharing. An update without sharing makes sure that a single copy of the object is created when the space is copied.
This is the base class that all shared handles must inherit from.
Definition at line 149 of file core.hpp.
Constructor & Destructor Documentation
Gecode::SharedHandle::SharedHandle | ( | void | ) | [inline] |
Gecode::SharedHandle::SharedHandle | ( | SharedHandle::Object * | so | ) | [inline] |
Gecode::SharedHandle::SharedHandle | ( | const SharedHandle & | sh | ) | [inline] |
Gecode::SharedHandle::~SharedHandle | ( | void | ) | [inline] |
Member Function Documentation
SharedHandle & Gecode::SharedHandle::operator= | ( | const SharedHandle & | sh | ) | [inline] |
Assignment operator mainitaining reference count.
Reimplemented from Gecode::CopiedHandle.
void Gecode::SharedHandle::update | ( | Space & | home, | |
bool | share, | |||
SharedHandle & | sh | |||
) | [inline] |
Updating during cloning.
Reimplemented from Gecode::CopiedHandle.
SharedHandle::Object * Gecode::SharedHandle::object | ( | void | ) | const [inline, protected] |
Access to the shared object.
Reimplemented from Gecode::CopiedHandle.
void Gecode::SharedHandle::object | ( | SharedHandle::Object * | n | ) | [inline, protected] |
The documentation for this class was generated from the following file:
- gecode/kernel/core.hpp (Revision: 10035)