Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
om::math::ScalarType Class Reference

A class that represents a type of scalar math value. More...

#include <omScalarType.h>

Public Types

enum  Enum {
  UNDEFINED = 0, BOOLEAN = 1, INT8 = 2, UINT8 = 3,
  INT16 = 4, UINT16 = 5, INT32 = 6, UINT32 = 7,
  INT64 = 8, UINT64 = 9, FLOAT16 = 10, FLOAT32 = 11,
  FLOAT64 = 12, COMPLEX_FLOAT16 = 13, COMPLEX_FLOAT32 = 14, COMPLEX_FLOAT64 = 15,
  COUNT = 16
}
 An enum type used to indicate a primitive built-in type. More...
 

Public Member Functions

 ScalarType (Enum newType)
 Create a new scalar type with the specified scalar type enum value. More...
 
 operator Enum () const
 Convert this scalar type to an enum value. More...
 
Size getSizeInBits () const
 Return the size of this scalar type in bits. More...
 
Size getSizeInBytes () const
 Return the size of this scalar type in bytes. More...
 
Bool isSigned () const
 Return whether or not this scalar type can represent negative numbers. More...
 
Bool isInteger () const
 Return whether or not this scalar type is an integer type. More...
 
Bool isFloatingPoint () const
 Return whether or not this scalar type is a floating point type. More...
 
data::String toString () const
 Return a string representation of the scalar type. More...
 
 operator data::String () const
 Convert this scalar type into a string representation. More...
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
ScalarType of ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 
template<>
void check ()
 

Static Public Member Functions

template<typename T >
static ScalarType of ()
 Get the scalar type of a templated type. More...
 
template<typename T >
static void check ()
 Check to see if the templated type is a supported scalar type. More...
 

Detailed Description

A class that represents a type of scalar math value.

Member Enumeration Documentation

An enum type used to indicate a primitive built-in type.

Enumerator
UNDEFINED 

An undefined scalar type.

BOOLEAN 

A scalar type representing the 'bool' type.

INT8 

A scalar type representing an 8-bit signed integer type.

UINT8 

A scalar type representing an 8-bit unsigned integer type.

INT16 

A scalar type representing an 16-bit signed signed integer type.

UINT16 

A scalar type representing an 16-bit unsigned integer type.

INT32 

A scalar type representing a 32-bit signed integer type.

UINT32 

A scalar type representing a 32-bit unsigned integer type.

INT64 

A scalar type representing a 64-bit signed integer type.

UINT64 

A scalar type representing a 64-bit unsigned integer type.

FLOAT16 

A scalar type representing an 16-bit floating-point type.

FLOAT32 

A scalar type representing a 32-bit floating-point type.

FLOAT64 

A scalar type representing a 64-bit floating-point type.

COMPLEX_FLOAT16 

A scalar type representing a 16-bit complex floating-point type.

COMPLEX_FLOAT32 

A scalar type representing a 32-bit complex floating-point type.

COMPLEX_FLOAT64 

A scalar type representing a 64-bit complex floating-point type.

COUNT 

The number of scalar type enum values.

Constructor & Destructor Documentation

om::math::ScalarType::ScalarType ( Enum  newType)
inline

Create a new scalar type with the specified scalar type enum value.

Member Function Documentation

template<typename T >
static ScalarType om::math::ScalarType::of ( )
inlinestatic

Get the scalar type of a templated type.

If the templated type is not a scalar type, an UNDEFINED scalar type is returned.

template<typename T >
static void om::math::ScalarType::check ( )
inlinestatic

Check to see if the templated type is a supported scalar type.

Calling this empty method will produce a compiler error if the templated type is not a supported scalar type.

om::math::ScalarType::operator Enum ( ) const
inline

Convert this scalar type to an enum value.

Size om::math::ScalarType::getSizeInBits ( ) const
inline

Return the size of this scalar type in bits.

Size om::math::ScalarType::getSizeInBytes ( ) const

Return the size of this scalar type in bytes.

Bool om::math::ScalarType::isSigned ( ) const

Return whether or not this scalar type can represent negative numbers.

Bool om::math::ScalarType::isInteger ( ) const

Return whether or not this scalar type is an integer type.

Bool om::math::ScalarType::isFloatingPoint ( ) const

Return whether or not this scalar type is a floating point type.

data::String om::math::ScalarType::toString ( ) const

Return a string representation of the scalar type.

om::math::ScalarType::operator data::String ( ) const
inline

Convert this scalar type into a string representation.

template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
ScalarType om::math::ScalarType::of ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline
template<>
void om::math::ScalarType::check ( )
inline

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