STIR  6.2.0
Public Member Functions | List of all members
stir::NumericInfo< NUMBER > Class Template Reference

class NumericInfo<NUMBER> defines properties for the type NUMBER. More...

#include "stir/NumericInfo.h"

Public Member Functions

bool signed_type () const
 
bool integer_type () const
 
size_t size_in_bytes () const
 Size in 'bytes' as reported by sizeof(), so really size_in_sizeof_char.
 
size_t size_in_bits () const
 
NUMBER max_value () const
 
NUMBER min_value () const
 
NumericType type_id () const
 

Detailed Description

template<class NUMBER>
class stir::NumericInfo< NUMBER >

class NumericInfo<NUMBER> defines properties for the type NUMBER.

The idea comes the ANSI C++ class std::numeric_limits, but some compiler didn't have this yet when PARAPET/STIR was started. This current class should disappear at some point.

Note that this general template is essentially empty, but it is needed to use template syntax.

Warning
It could be better to have some error in here, flagging (at compile time) when you use it for a type which is not yet in our list. With the current implementation, you will see a linker error only, something like 'undefined reference NumericInfo<complex>::signed_type()'

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