IDL compiler front-end library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
AST::Fixed Class Reference

A fixed point constant. More...

#include <Fixed.h>

Public Member Functions

uint16_t digits () const noexcept
 
int16_t scale () const noexcept
 
std::string to_string () const
 
std::vector< uint8_t > to_BCD () const
 

Detailed Description

A fixed point constant.

Definition at line 43 of file Fixed.h.

Member Function Documentation

◆ digits()

uint16_t AST::Fixed::digits ( ) const
inlinenoexcept
Returns
Number of digits.
Invariant
digits () <= 31

Definition at line 49 of file Fixed.h.

◆ scale()

int16_t AST::Fixed::scale ( ) const
inlinenoexcept
Returns
Number of digits after decimal point.
Invariant
scale () <= digits () Note that scale may be negative due to removeing the trailing zeros. For example, 1000D will have digits() == 1 and scale() == -3.

Definition at line 59 of file Fixed.h.

◆ to_string()

std::string AST::Fixed::to_string ( ) const
Returns
Fixed point as a character string.

◆ to_BCD()

std::vector< uint8_t > AST::Fixed::to_BCD ( ) const

Converts fixed to binary-coded decimal. Returned array is CORBA fixed point CDR compatible.

Returns
The BCD bytes.

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