GemaCoreLib
The GeMA Core library
Public Types | Public Member Functions | List of all members
GmNanBoxedValue Class Reference

A wrapper class around QtNanBoxedValue providing specific constructors to store user functions / user function evaluators together with double values. More...

#include <gmNanBoxedValue.h>

Inheritance diagram for GmNanBoxedValue:
Inheritance graph
[legend]
Collaboration diagram for GmNanBoxedValue:
Collaboration graph
[legend]

Public Types

enum  PointerTags { UserFunction = 0, FunctionEvaluator = 1 }
 Pointer tag values. More...
 

Public Member Functions

 GmNanBoxedValue ()
 Default constructor: a zero double value.
 
 GmNanBoxedValue (double value)
 Constructor for storing a double value.
 
 GmNanBoxedValue (GmUserFunction *ptr)
 Constructor for storing a User function pointer.
 
 GmNanBoxedValue (GmUserFunctionEvaluator *ptr)
 Constructor for storing a User function evaluator pointer.
 
bool isUserFunction () const
 Is this a User function pointer value?
 
bool isUserFunctionEvaluator () const
 Is this a User function evaluator pointer value?
 
GmUserFunctiontoUserFunction () const
 Returns the stored value as a GmUserFunction*.
 
GmUserFunctionEvaluatortoUserFunctionEvaluator () const
 Returns the stored value as a GmUserFunctionEvaluator*.
 

Detailed Description

A wrapper class around QtNanBoxedValue providing specific constructors to store user functions / user function evaluators together with double values.

IMPORTANT: Please make sure to read the base class comments. Using a NAN box without understanding the implied structure is a fast track to disaster...

Member Enumeration Documentation

◆ PointerTags

Pointer tag values.

Enumerator
UserFunction 

Stored pointer is a GmUserFunction*.

FunctionEvaluator 

Stored pointer is a GmUserFunctionEvaluator*.


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