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


A Property storage policy indicating that the property should be held by constant pointer. More...

#include <utilities/property.h>

Public Types

typedef const 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

 StoreConstPtr ()
 Constructor that sets the held pointer to null. More...
 
 StoreConstPtr (const StoreConstPtr &)=default
 Create a clone of the given property value. More...
 
StoreConstPtroperator= (const StoreConstPtr &)=default
 Sets this to be a clone of the given property value. More...
 
void clear ()
 Cleans up any currently held value before the property value is changed or cleared. More...
 
void swap (StoreConstPtr< T > &other)
 Swaps this with the given value. More...
 

Protected Attributes

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

Detailed Description

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


A Property storage policy indicating that the property should be held by constant pointer.

The property assignment and query routines will also use constant pointers, and the Property wrapper takes no responsibility for memory management of the held value.

See the Property class notes for details.

Python
Not present.

Member Typedef Documentation

◆ InitType

template<typename T >
typedef const T* regina::StoreConstPtr< T >::InitType

The type by which new values for the underlying property are passed.

◆ QueryType

template<typename T >
typedef const T* regina::StoreConstPtr< T >::QueryType

The type by which the property value is returned to the user.

Constructor & Destructor Documentation

◆ StoreConstPtr() [1/2]

template<typename T >
regina::StoreConstPtr< T >::StoreConstPtr ( )
inline

Constructor that sets the held pointer to null.

◆ StoreConstPtr() [2/2]

template<typename T >
regina::StoreConstPtr< T >::StoreConstPtr ( const StoreConstPtr< T > &  )
default

Create a clone of the given property value.

This clones the given property's pointer, regardless of whether the property is known or unknown.

Member Function Documentation

◆ clear()

template<typename T >
void regina::StoreConstPtr< T >::clear ( )
inline

Cleans up any currently held value before the property value is changed or cleared.

This implementation resets the held pointer to null.

◆ operator=()

template<typename T >
StoreConstPtr& regina::StoreConstPtr< T >::operator= ( const StoreConstPtr< T > &  )
default

Sets this to be a clone of the given property value.

This clones the given property's pointer, regardless of whether the property is known or unknown.

◆ swap()

template<typename T >
void regina::StoreConstPtr< T >::swap ( StoreConstPtr< T > &  other)
inline

Swaps this with the given value.

Parameters
otherthe value to swap with this.

Member Data Documentation

◆ value_

template<typename T >
const T* regina::StoreConstPtr< T >::value_
protected

The held property value.


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).