minid.types

This module contains a lot of type definitions for types used throughout the library. Not much in here is public.

License:
Copyright (c) 2008 Jarrett Billingsley


This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

alias word ;
The native signed integer type on this platform. This is the same as ptrdiff_t but with a better name.

alias uword ;
The native unsigned integer type on this platform. This is the same as size_t but with a better name.

alias mdint ;
The underlying D type used to store the MiniD 'int' type. Defaults to 'long' (64-bit signed integer). If you change it, you will end up with a (probably?) functional but nonstandard implementation.

alias mdfloat ;
The underlying D type used to store the MiniD 'float' type. Defaults to 'double'. If you change it, you will end up with a functional but nonstandard implementation.

const uint MiniDVersion ;
The current version of MiniD as a 32-bit integer. The upper 16 bits are the major, and the lower 16 are the minor.

alias NativeFunc ;
An alias for the type signature of a native function. It is defined as uword function(MDThread*, uword).

class MDException : object.Exception;
The MiniD exception type. This is the type that is thrown whenever you throw an exception from within MiniD, or when you use the throwException API call. You can't directly instantiate this class, though, since it would be bad if you did (the interpreter needs to keep track of some internal state, which throwException does). See throwException and catchException in minid.interpreter for more info on MiniD exception handling.

class MDHaltException : object.Exception;
This is a semi-internal exception type. Normally you won't need to know about it or catch it. This is thrown when a coroutine (thread) needs to be halted. It should never propagate out of the coroutine. The only time you might encounter it is if, in the middle of a native MiniD function, one of these is thrown, you might be able to catch it and clean up some resources, but you must rethrow it in that case, unless you want the interpreter to be in a horrible state.

Like the other exception types, you can't instantiate this directly, but you can halt threads with the "haltThread" function in minid.interpreter.

const char[] MDCoroSupport ;
A string constant indicating the level of coroutine support compiled in. Is either "Normal" or "Extended".

struct MDValue ;


enum Type ;
The enumeration of all the types of values in MiniD.

Null
Bool
Int
Float
Char
String
Table
Array
Function
Class
Instance
Namespace
Thread
NativeObj
WeakRef


Page was generated with on Thu Jul 16 22:47:50 2009