FARGOS/VISTA Object Management Environment Core  ..
FARGOS/VISTA Object Management Environment Core Table of Contents
OME_TypeCheck Class Reference

Utility class for type check operations on OMEtype interactions. More...

#include <OMEbaseType.h>

Public Types

enum  TypeCompatibility_t {
  IDENTICAL_TYPES = (1 << 0), CAN_ASSIGN = (1 << 1), SAME_BASE_TYPE = (1 << 2), DISSIMILAR_SIGN = (1 << 3),
  CAN_PROMOTE = (1 << 4), CAN_DEMOTE = (1 << 5), INCOMPATIBLE_TYPES = (1 << 6), UNKNOWN_COMPATIBILITY = (1 << 7),
  ASSUME_COMPATIBLE = CAN_ASSIGN | UNKNOWN_COMPATIBILITY, TYPE_MASK = 255, OPTIONAL_TYPE_FLAG = 256, OME_CONST_POINTER = OME_POINTER | 0x1000
}
 

Static Public Member Functions

static uint32_t baseType (uint32_t t) OME_CONST_FUNCTION
 
static bool isTypeANY (uint32_t t) OME_CONST_FUNCTION
 
static constexpr bool is32BitInteger (uint32_t t) OME_CONST_FUNCTION
 
static constexpr bool isHeldBy32BitInteger (uint32_t t) OME_CONST_FUNCTION
 
static constexpr bool is64BitInteger (uint32_t t) OME_CONST_FUNCTION
 
static constexpr bool isInteger (uint32_t t) OME_CONST_FUNCTION
 
static constexpr bool isContainer (uint32_t t) OME_CONST_FUNCTION
 
static uint32_t typesAreAssignable (uint32_t srcType, uint32_t targetType) OME_CONST_FUNCTION
 

Detailed Description

Utility class for type check operations on OMEtype interactions.

Member Enumeration Documentation

◆ TypeCompatibility_t

Enumerator
IDENTICAL_TYPES 

same exact types

CAN_ASSIGN 

can assign into type

SAME_BASE_TYPE 

exact same basic type

DISSIMILAR_SIGN 

signed vs. unsigned

CAN_PROMOTE 

small size convertable to larger

CAN_DEMOTE 

large size to small

INCOMPATIBLE_TYPES 

no conversion possible

UNKNOWN_COMPATIBILITY 

right side is ANY

ASSUME_COMPATIBLE 

left side is ANY

TYPE_MASK 
OPTIONAL_TYPE_FLAG 
OME_CONST_POINTER 

Member Function Documentation

◆ baseType()

static uint32_t OME_TypeCheck::baseType ( uint32_t  t)
inlinestatic

References OMEfundamentalType.

◆ is32BitInteger()

static constexpr bool OME_TypeCheck::is32BitInteger ( uint32_t  t)
inlinestaticconstexpr

References OME_INT32, and OME_UINT32.

Referenced by debugDisplay(), debugDisplayAsHex(), and logOutput().

◆ is64BitInteger()

static constexpr bool OME_TypeCheck::is64BitInteger ( uint32_t  t)
inlinestaticconstexpr

References OME_INT64, and OME_UINT64.

Referenced by isInteger().

◆ isContainer()

static constexpr bool OME_TypeCheck::isContainer ( uint32_t  t)
inlinestaticconstexpr

References OME_ARRAY, OME_ASSOC, and OME_SET.

Referenced by skipAndOutputSetToStream().

◆ isHeldBy32BitInteger()

static constexpr bool OME_TypeCheck::isHeldBy32BitInteger ( uint32_t  t)
inlinestaticconstexpr

References OME_INT32, OME_UINT16, OME_UINT32, and OME_UINT8.

Referenced by isInteger().

◆ isInteger()

static constexpr bool OME_TypeCheck::isInteger ( uint32_t  t)
inlinestaticconstexpr

◆ isTypeANY()

static bool OME_TypeCheck::isTypeANY ( uint32_t  t)
inlinestatic

◆ typesAreAssignable()

static uint32_t OME_TypeCheck::typesAreAssignable ( uint32_t  srcType,
uint32_t  targetType 
)
inlinestatic

The documentation for this class was generated from the following file:
Generated: Fri Jul 31 2020 18:19:16
Support Information