Lolly 1.4.28
|
#include "classdef.hpp"
#include "fast_alloc.hpp"
#include "minmax.hpp"
#include "tm_ostream.hpp"
#include <math.h>
Go to the source code of this file.
Classes | |
struct | type_helper< T > |
Helper struct for type identification and initialization. More... | |
Macros | |
#define | LESSGTR <> |
Macro used for template specialization of less than and greater than operators. | |
#define | MAX_SI 0x7fffffff |
#define | MIN_SI 0x80000000 |
Macro defining the minimum value of a signed integer. | |
#define | STACK_NEW_ARRAY(name, T, size) T name[size] |
#define | STACK_DELETE_ARRAY(name) |
#define | USE_EXCEPTIONS |
Macro used to enable or disable the use of exceptions. | |
#define | ASSERT(cond, msg) |
Macro used to assert that a condition is true, and throw an exception with an error message if the condition is false. | |
#define | TM_FAILED(msg) { tm_throw (msg); } |
Macro used to throw an exception with a specified error message. | |
Typedefs | |
typedef void * | pointer |
typedef unsigned int | color |
Enumerations | |
enum | display_control { INDENT , UNINDENT , HRULE , LF } |
Enumeration of display control options. More... | |
Functions | |
void | tm_failure (const char *msg) |
Function used to handle a TM failure by displaying an error message and exiting the program. | |
void | tm_throw (const char *msg) |
Function used to throw an exception with a specified error message. | |
void | handle_exceptions () |
Function used to handle exceptions by displaying and clearing the exception message. | |
int | hash (int i) |
Hashes an integer. | |
int | hash (long int i) |
Hashes a long integer. | |
int | hash (DI i) |
Hashes a double integer. | |
int | hash (unsigned int i) |
Hashes an unsigned integer. | |
int | hash (unsigned long int i) |
Hashes an unsigned long integer. | |
int | hash (DN i) |
Hashes a double number. | |
int | hash (float x) |
Hashes a float number. | |
int | hash (double x) |
Hashes a double number. | |
int | copy (int x) |
Returns a copy of an integer. | |
SI | as_int (double x) |
Converts a double to a signed integer, rounding to the nearest integer. | |
double | tm_round (double x) |
Rounds a double to the nearest integer. | |
int | hash (pointer ptr) |
Computes a hash value for a pointer. | |
tm_ostream & | operator<< (tm_ostream &out, display_control ctrl) |
Output operator for display control options. | |
int | new_type_identifier () |
Generates a new type identifier. | |
Variables | |
string | the_exception |
Global variable used to store the current exception message. | |
defines basic types and macros used throughout the kernel.
Definition in file basic.hpp.
#define LESSGTR <> |
#define MIN_SI 0x80000000 |
#define USE_EXCEPTIONS |
Macro used to assert that a condition is true, and throw an exception with an error message if the condition is false.
Definition at line 85 of file basic.hpp.
Function used to handle a TM failure by displaying an error message and exiting the program.
msg | The error message to display. |
Function used to throw an exception with a specified error message.
msg | The error message to throw with the exception. |
Definition at line 27 of file basic.cpp.
void handle_exceptions | ( | ) |
Function used to handle exceptions by displaying and clearing the exception message.
Definition at line 38 of file basic.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
int hash | ( | pointer | ptr | ) |
tm_ostream & operator<< | ( | tm_ostream & | out, |
display_control | ctrl ) |
Output operator for display control options.
out | The output stream to write to. |
ctrl | The display control option. |
Definition at line 61 of file basic.cpp.
int new_type_identifier | ( | ) |