Regina Calculation Engine
Public Types | Public Member Functions | List of all members
regina::NewFunction< Base > Struct Template Reference

A function object that creates a new object subclassed from Base, where the particular subclass is chosen according to the template argument to operator(). More...

#include <utilities/registryutils.h>

Inheritance diagram for regina::NewFunction< Base >:
regina::Returns< Base * >

Public Types

typedef Base * ReturnType
 Indicates the return type for a function object. More...
 

Public Member Functions

template<typename Info , typename... Args>
Base * operator() (Args &&... args) const
 Creates a new object of the subclass Info::Class. More...
 

Detailed Description

template<class Base>
struct regina::NewFunction< Base >

A function object that creates a new object subclassed from Base, where the particular subclass is chosen according to the template argument to operator().

The template argument to the bracket operator would typically be one of the registry helper classes, such as PacketInfo or NormalInfo.

This routine is intended for use with registry routines, such as the non-void variants of forPacket() and forCoords().

Python
Not present.

Member Typedef Documentation

◆ ReturnType

typedef Base * regina::Returns< Base * >::ReturnType
inherited

Indicates the return type for a function object.


The documentation for this struct 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).