pm::shared_object< Object, Params > Class Template Reference

Inheritance diagram for pm::shared_object< Object, Params >:

List of all members.


Public Member Functions

 shared_object ()
 Create the attached object with its default constructor.

Detailed Description

template<typename Object, typename Params = void>
class pm::shared_object< Object, Params >

Automatic pointer to shared data

This class implements an automatic pointer to a data object that can be shared among several hosts. The data instance remains shared as far as all hosts it is attached to don't attempt to change it (read-only access). The host that wants to get read-write access to the data automatically obtains a new copy, while its former partners continue sharing the old one.

In that way, a copy of the host always shares the data instance with the original host. Assignment to a host causes it to detach the old data instance and share the new one with the host being assigned from.

The data instance is destroyed together with the last host is is attached to.

Object type of the attached object tools Automatic Pointers


The documentation for this class was generated from the following file:
  • include/core/polymake/internal/shared_object.h
Generated on Wed Mar 30 23:31:46 2011 for Polymake Template Library (PTL) by doxygen 1.5.6