Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::Value16 Union Reference

Union of all 16 bit value types used within the Bond compiler, the CBO file format, and the Bond Virtual Machine. More...

#include <bond/types/value.h>

Public Member Functions

 Value16 ()
 Constructs a Value16 object whose value is 0.
 Value16 (int16_t value)
 Constructs a Value16 object holding an int16_t.
 Value16 (uint16_t value)
 Constructs a Value16 object holding a uint16_t.
 Value16 (int32_t value)
 Constructs a Value16 object holding an int32_t truncated to 16 bits.
 Value16 (uint32_t value)
 Constructs a Value16 object holding a uint32_t truncated to 16 bits.
 Value16 (const uint8_t value[])
 Constructs a Value16 object from the first 2 bytes of the given array, in memory order.

Public Attributes

int16_t mShort
 The value as a signed 16-bit integer.
uint16_t mUShort
 The value as an unsigned 16-bit integer.
unsigned char mBytes [2]
 The bytes of the value in memory order.

Detailed Description

Union of all 16 bit value types used within the Bond compiler, the CBO file format, and the Bond Virtual Machine.

Constructor & Destructor Documentation

◆ Value16() [1/6]

Bond::Value16::Value16 ( )
inline

Constructs a Value16 object whose value is 0.

◆ Value16() [2/6]

Bond::Value16::Value16 ( int16_t value)
inlineexplicit

Constructs a Value16 object holding an int16_t.

◆ Value16() [3/6]

Bond::Value16::Value16 ( uint16_t value)
inlineexplicit

Constructs a Value16 object holding a uint16_t.

◆ Value16() [4/6]

Bond::Value16::Value16 ( int32_t value)
inlineexplicit

Constructs a Value16 object holding an int32_t truncated to 16 bits.

◆ Value16() [5/6]

Bond::Value16::Value16 ( uint32_t value)
inlineexplicit

Constructs a Value16 object holding a uint32_t truncated to 16 bits.

◆ Value16() [6/6]

Bond::Value16::Value16 ( const uint8_t value[])
inlineexplicit

Constructs a Value16 object from the first 2 bytes of the given array, in memory order.

Member Data Documentation

◆ mBytes

unsigned char Bond::Value16::mBytes[2]

The bytes of the value in memory order.

◆ mShort

int16_t Bond::Value16::mShort

The value as a signed 16-bit integer.

◆ mUShort

uint16_t Bond::Value16::mUShort

The value as an unsigned 16-bit integer.


The documentation for this union was generated from the following file:
  • include/bond/types/value.h