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

Stores a calculable property of an object. More...

#include <utilities/property.h>

Inheritance diagram for regina::Property< T, Storage >:
regina::StoreValue< T >

Public Types

typedef Storage< T >::InitType InitType
 The type by which new values for the underlying property are passed. More...
 
typedef Storage< T >::QueryType QueryType
 The type by which the property value is returned to the user. More...
 

Public Member Functions

 Property ()
 Constructor. More...
 
 Property (const Property< T, Storage > &newValue)
 Makes a new clone of the given property. More...
 
bool known () const
 Returns whether or not this property is currently marked as known. More...
 
QueryType value () const
 Returns the current value of this property. More...
 
void clear ()
 Marks this property as unknown. More...
 
QueryType operator= (InitType newValue)
 Assigns a new value to this property. More...
 
Propertyoperator= (const Property &newValue)
 Copies the given property into this property. More...
 
void swap (Property< T, Storage > &other)
 Swaps this with the given property. More...
 

Protected Member Functions

void swap (StoreValue< T > &other)
 Swaps this with the given value. More...
 

Protected Attributes

value_
 The held property value. More...
 

Detailed Description

template<typename T, template< typename Stored > class Storage = StoreValue>
class regina::Property< T, Storage >

Stores a calculable property of an object.

The property may be marked as known or unknown, and its value may be set or retrieved.

The template parameter Storage specifies how the property will be internally stored. Storage options range from simple storage by value (see class StoreValue) to more intelligent storage options that include memory management of pointers (see class StoreManagedPtr).

See also
StoreValue
StoreConstPtr
StoreManagedPtr
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).