Regina Calculation Engine
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
regina::StoreManagedPtr< T > Class Template Reference

A Property storage policy indicating that the property should be held by pointer and that the property wrapper will also take responsibility for memory management. More...

#include <utilities/property.h>

Inheritance diagram for regina::StoreManagedPtr< T >:
regina::Property< regina::AngleStructure, regina::StoreManagedPtr > regina::Property< regina::Laurent< regina::IntegerBase >, regina::StoreManagedPtr > regina::Property< regina::TreeDecomposition, regina::StoreManagedPtr > regina::Property< regina::GroupPresentation, regina::StoreManagedPtr > regina::Property< regina::AbelianGroup, regina::StoreManagedPtr > regina::Property< regina::Laurent2< regina::IntegerBase >, regina::StoreManagedPtr >

Public Types

typedef T * InitType
 The type by which new values for the underlying property are passed. More...
 
typedef const T * QueryType
 The type by which the property value is returned to the user. More...
 

Public Member Functions

 StoreManagedPtr ()
 Constructor that sets the held pointer to null. More...
 
void clear ()
 Cleans up any currently held value before the property value is changed or cleared. More...
 
 StoreManagedPtr (const StoreManagedPtr &)=delete
 
StoreManagedPtroperator= (const StoreManagedPtr &)=delete
 

Protected Member Functions

 ~StoreManagedPtr ()
 Destroys the currently held value if one exists. More...
 
void swap (StoreManagedPtr< T > &other)
 Swaps this with the given value. More...
 

Protected Attributes

T * value_
 The held property value. More...
 

Detailed Description

template<typename T>
class regina::StoreManagedPtr< T >

A Property storage policy indicating that the property should be held by pointer and that the property wrapper will also take responsibility for memory management.

The property assignment and query routines will also use pointers; in particular the query routines will return a constant pointer. When the held value is changed or the Property wrapper is destroyed, any currently held value will be destroyed automatically.

See the Property class notes for details.

Python
Not present.

The documentation for this class was generated from the following file:

Copyright © 1999-2021, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).