BlitzMax Extended  0.8.18
Pushing Blitz to the Max.
Data Structures | Macros | Enumerations
blitz_debug.h File Reference

Additional information about BlitzMax code. More...

#include "_common.h"

Go to the source code of this file.

Data Structures

struct  BBDebugDecl
 A debug declaration containing information about a piece of user code. More...
struct  BBDebugScope
 A scope of information for a block of code. More...
struct  BBDebugStm
 A debug statement pointing to the location of the error. More...

Macros

#define BB_ASSERT(expr, msg,...)
 Runtime time assertion.

Enumerations

enum  BBDebugDeclKind {
  BBDEBUGDECL_END, BBDEBUGDECL_CONST, BBDEBUGDECL_LOCAL, BBDEBUGDECL_FIELD,
  BBDEBUGDECL_GLOBAL, BBDEBUGDECL_VARPARAM, BBDEBUGDECL_TYPEMETHOD, BBDEBUGDECL_TYPEFUNCTION
}
 All possible debug declarations. More...
enum  BBDebugScopeKind { BBDEBUGSCOPE_FUNCTION, BBDEBUGSCOPE_USERTYPE, BBDEBUGSCOPE_LOCALBLOCK }
 All valid debug scopes. More...

Detailed Description

Additional information about BlitzMax code.

Using the structs in this header allows for reading information from BlitzMax code from C/C++. Also the other way around, meaning filling out these data structures with the correct values allows you to write pure C code that can be seemlessly accessed from BlitzMax.

That includes everything from extending classes to accessing meta data and methods via the reflection functionality of BlitzMax.

Author:
Mark Sibly

Macro Definition Documentation

#define BB_ASSERT (   expr,
  msg,
  ... 
)

Runtime time assertion.

This ensures that the expr statement is always true at run time. If it fails a BBRuntimeException describing the problem is thrown.

Warning:
Asserts are only evaluated in debug mode (BB_DEBUG).
See also:
BBRuntimeException
Parameters:
exprThe expression that must always be true.
msgAn error message describing what went wrong

Referenced by bbArrayNew(), bbArrayNew1D(), bbClassRegister(), bbIncbinAdd(), bbStringFindLast(), bbStringFromBytes(), bbStringFromInts(), bbStringFromShorts(), bbStringFromUTF8String(), bbStringNew(), and bbStringReplace().


Enumeration Type Documentation

All possible debug declarations.

See also:
BBDebugDecl
Enumerator:
BBDEBUGDECL_END 

Marks the end of a scopes debug declarations.

BBDEBUGDECL_CONST 

Declares a constant.

BBDEBUGDECL_LOCAL 

Declares a local variable.

BBDEBUGDECL_FIELD 

Declares a class member variable.

BBDEBUGDECL_GLOBAL 

Declares a static class member variable.

BBDEBUGDECL_VARPARAM 

Declares a variable pointer.

BBDEBUGDECL_TYPEMETHOD 

Declares a class virtual function.

Virtual functions are stored in a BBClass struct's vfns member.

BBDEBUGDECL_TYPEFUNCTION 

Declares a static class function.

All valid debug scopes.

See also:
BBDebugScope
Enumerator:
BBDEBUGSCOPE_FUNCTION 

Declares a function.

BBDEBUGSCOPE_USERTYPE 

Declares a user-defined type.

BBDEBUGSCOPE_LOCALBLOCK 

Declares a local block.