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