feisty meow concerns codebase  2.140
definitions.h File Reference

Constants and objects used throughout HOOPLE. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 basis
 The guards collection helps in testing preconditions and reporting errors.
 

Macros

#define NULL_POINTER   0
 The value representing a pointer to nothing. More...
 
#define BITS_PER_BYTE   8
 A fundamental constant measuring the number of bits in a byte. More...
 
#define PI_APPROX   3.14159265358
 An approximation of the fundamental circular constant. More...
 
#define formal(parameter)
 This macro just eats what it's passed; it marks unused formal parameters. More...
 
#define MAXINT32   0x7fffffff
 Maximum 32-bit integer value. More...
 
#define MININT32   0x80000000
 Minimum 32-bit integer value. More...
 
#define MAXINT16   0x7fff
 Maximum 32-bit integer value. More...
 
#define MININT16   0x8000
 Minimum 32-bit integer value. More...
 
#define MAXCHAR   0x7f
 Maximum byte-based character value. More...
 
#define MINCHAR   0x80
 Minimum byte-based character value. More...
 
#define MAXBYTE   0xff
 Maximum unsigned byte value. More...
 
#define MINBYTE   0x00
 Minimum unsigned byte value. More...
 

Typedefs

typedef unsigned char basis::abyte
 A fairly important unit which is seldom defined... More...
 
typedef char basis::flexichar
 
typedef unsigned int basis::un_int
 Abbreviated name for unsigned integers. More...
 
typedef unsigned short basis::un_short
 Abbreviated name for unsigned short integers. More...
 
typedef unsigned long basis::un_long
 Abbreviated name for unsigned long integers. More...
 
typedef long int basis::signed_long
 Abbreviated name for signed long integers. More...
 
typedef long long basis::signed_long_long
 Abbreviated name for signed long long integers. More...
 
typedef char basis::int8
 
typedef unsigned char basis::uint8
 
typedef signed short basis::int16
 
typedef unsigned short basis::uint16
 
typedef signed int basis::int32
 
typedef unsigned int basis::uint32
 

Variables

const int basis::SECOND_ms = 1000
 Number of milliseconds in a second. More...
 
const int basis::MINUTE_ms = 60 * SECOND_ms
 Number of milliseconds in a minute. More...
 
const int basis::HOUR_ms = 60 * MINUTE_ms
 Number of milliseconds in an hour. More...
 
const int basis::DAY_ms = 24 * HOUR_ms
 Number of milliseconds in a day. More...
 
const int basis::MINUTE_s = 60
 Number of seconds in a minute. More...
 
const int basis::HOUR_s = 60 * MINUTE_s
 Number of seconds in an hour. More...
 
const int basis::DAY_s = 24 * HOUR_s
 Number of seconds in a day. More...
 
const int basis::KILOBYTE = 1024
 Number of bytes in a kilobyte. More...
 
const int basis::MEGABYTE = KILOBYTE * KILOBYTE
 Number of bytes in a megabyte. More...
 
const int basis::GIGABYTE = MEGABYTE * KILOBYTE
 Number of bytes in a gigabyte. More...
 
const double basis::TERABYTE = double(GIGABYTE) * double(KILOBYTE)
 

Detailed Description

Constants and objects used throughout HOOPLE.

Defines a set of useful universal constants (for our chosen universe) and a set of aliases for convenient abstract and concrete data types. This is the lowest-level header in hoople and should not include any others.

Definition in file definitions.h.

Macro Definition Documentation

◆ BITS_PER_BYTE

#define BITS_PER_BYTE   8

A fundamental constant measuring the number of bits in a byte.

Definition at line 38 of file definitions.h.

◆ formal

#define formal (   parameter)

This macro just eats what it's passed; it marks unused formal parameters.

Definition at line 48 of file definitions.h.

◆ MAXBYTE

#define MAXBYTE   0xff

Maximum unsigned byte value.

Definition at line 99 of file definitions.h.

◆ MAXCHAR

#define MAXCHAR   0x7f

Maximum byte-based character value.

Definition at line 91 of file definitions.h.

◆ MAXINT16

#define MAXINT16   0x7fff

Maximum 32-bit integer value.

Definition at line 83 of file definitions.h.

◆ MAXINT32

#define MAXINT32   0x7fffffff

Maximum 32-bit integer value.

Definition at line 75 of file definitions.h.

◆ MINBYTE

#define MINBYTE   0x00

Minimum unsigned byte value.

Definition at line 103 of file definitions.h.

◆ MINCHAR

#define MINCHAR   0x80

Minimum byte-based character value.

Definition at line 95 of file definitions.h.

◆ MININT16

#define MININT16   0x8000

Minimum 32-bit integer value.

Definition at line 87 of file definitions.h.

◆ MININT32

#define MININT32   0x80000000

Minimum 32-bit integer value.

Definition at line 79 of file definitions.h.

◆ NULL_POINTER

#define NULL_POINTER   0

The value representing a pointer to nothing.

Definition at line 32 of file definitions.h.

◆ PI_APPROX

#define PI_APPROX   3.14159265358

An approximation of the fundamental circular constant.

Definition at line 41 of file definitions.h.