GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmNanBoxedIndex Class Reference

A helper class to store an usigned index as the boxed nan value. More...

#include <gmNanBoxedValue.h>

Inheritance diagram for GmNanBoxedIndex:
Collaboration diagram for GmNanBoxedIndex:

Public Types

enum  PointerTags { IndexValue = 6 }
 Pointer tag values. More...
 

Public Member Functions

 GmNanBoxedIndex ()
 Default constructor: a zero double value.
 
 GmNanBoxedIndex (double value, bool normalizeNans)
 Constructor for storing a double value. If normalizeNans is true, if the given value is a quiet NAN value, it will be normalized to QT_NANBOX_QUIET_MASK so that we don't risk it to being equal to our tag mask used for storing indices. If normalizeNans is set to false, that normalization is NOT performed. This is necessary for initializing the NAN box with an index value stored as a NAN and read from elsewhere (form disk, for example).
 
 GmNanBoxedIndex (unsigned index)
 Constructor for storing an index. Marked as explicit since we don't want an integer (or even a double) value to be converted into a boxed index by an implicit conversion. That could lead to unwanted index boxes when double ones where intended. (ex: GmNanBoxedIndex v = 5.0; would call the index constructor!)
 
bool isIndex () const
 Is this a User function pointer value?
 
unsigned toIndex () const
 Returns the stored value as an index.
 

Detailed Description

A helper class to store an usigned index as the boxed nan value.

Member Enumeration Documentation

◆ PointerTags

Pointer tag values.

Enumerator
IndexValue 

Make the quiet nan + prefix equal to 0xFFFF000000000000. Nicer for external file generators.


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