#define MXDEBUG_ALLOCTAG(p)
Tag an allocation (debug)
This macro tags a pointer to memory with the current filename and source line.
If the pointer does not exist the the current allocation list then this macro does nothing.
If memory debugging is off (MXMODULE_ALLOC undefined or NDEBUG is defined) then
this macro compiles to nothing.
(deds/alloc.h)
#define MXDEBUG_ALLOCCHECK()
Check all allocations
This macro causes all allocations to be checked for over/under writing.
If memory debugging is off (MXMODULE_ALLOC undefined or NDEBUG is defined) then
this macro compiles to nothing.
(deds/alloc.h)
#define MXATOM(v)
Convert to MX_ATOM
This macro return the base MX_ATOM for an object derived from MX_ATOM.
(deds/atom.h)
#define mx_atom(a,d,s)
Construct an MX_ATOM
This macro constructs a MX_ATOM which is a base object for reference counting.
(deds/atom.h)
#define mx_delete(a)
Destroy an MX_ATOM
This macro causes an object to be marked for destruction. If no locks (MX_LOCK)
or references (MX_REF) exist for this object then the object is destroyed and
if appropitae the memory is released.
(deds/atom.h)
#define mx_locked(a)
Find out if an object is locked or not
#define mx_lock(l,a)
Construct a MX_LOCK
This macro creates a lock for an object derived from MX_ATOM. The locked
MX_ATOM is guaranteed not to be deleted while a valid lock exists.
(deds/atom.h)
#define MX_REF(type)
A reference type, a typed MX_LOCK
This macro defines a MX_LOCK where the target is of some defined type.
A reference functions the same way as a MX_LOCK except the locked (i.e. referenced)
object is available in a typesafe way. A pointer to the reference target is
available with the MXREF macro.
(deds/atom.h)
#define mx_ref(r,t)
Construct a MX_REF
The macro constructs a MX_REF to an object.
(deds/atom.h)
#define mx_unref(r)
Destruct a MX_REF
The macro destroys a MX_REF to an object. The object may
be deleted in the dereference, see the mx_unlock() macro.
(deds/atom.h)
#define MXREF(r)
Return the object behind a MX_REF
Return the object behind the MX_REF to an object.
(deds/atom.h)
#define MX_DLLIST(type)
Double linked list
This macro declares a double linked list structure. The list
surrounding type can then be manipulated by the other mx_dllist_* and
MX_DLLIST_* macros. The type should be initialized with all zeros.
(deds/dllist.h)
#define MX_DLLIST_ELEM(type)
Elements for a double linked list
This macro declares elements for a double linked list structure.
This delcaration must be included in a struct with an appropriate type. The
surrounding type can then be manipulated by the other mx_dllist_* and
MX_DLLIST_* macros. The surrounding type should be initialized with all
zeros.
(deds/dllist.h)
#define MX_DLLIST_NODE(type,list)
Elements for a double linked list node
This macro declares elements for a double linked list node
structure. This delcaration must be included in a struct with an appropriate
type. The surrounding type can then be manipulated by the other mx_dllist_*
and MX_DLLIST_* macros. The surrounding type should be initialized with all
zeros.
(deds/dllist.h)
#define MX_DLLIST_APPEND(o,p)
Insert a double linked element into a double linked list
The inserted element is placed at the end of the list.
(deds/dllist.h)
#define MX_DLLIST_PREPEND(o,p)
Insert a double linked element into a double linked list
The inserted element is placed at the beginning of the list.
(deds/dllist.h)
#define MX_DLLIST_INSERT_AFTER(o,e)
Insert a double linked element after another element
#define MX_DLLIST_REMOVE(o)
Remove a double linked list element from its list
#define mx_dllist_first(o)
First element of a double linked list.
#define mx_dllist_last(o)
Last element of a double linked list.
#define mx_dllist_next(o)
Next element in the double linked list.
#define mx_dllist_prev(o)
Previous element in the double linked list.
#define mx_dllist_list(o)
List that an element is contained in.
#define mx_dllist_size(o)
Number of elements in the double linked list.
#define MX_MAX(x,y)
The maximum of two values.
#define MX_MIN(x,y)
The minimum of two values.
#define MX_MID(x,y,z)
The middle of three values.
# define MXRECT_VALID(A)
Is MX_RECT valid?
This macro returns non-zero if the upper-left of the rectangle is
above and to the right of the lower-left of the rectangle, zero otherwise.
(deds/rect.h)
# define MXRECT_INTERSECT(A, B, R)
Find intersection of two rectangles
This macro finds the intersection of two rectangles.
(deds/rect.h)
# define MXRECT_UNION(A, B, R)
Union of two rectangles.
# define MXRECT_CONTAINS(R, X, Y)
Point contained in MX_RECT
This macro return non-zero if a given x,y point is indose the
rectangel error, zero otherwise.
(deds/rect.h)
# define MXRECTS_OVERLAP(A, B)
Do MX_RECT overlap?
This macro return non-zero if two rectangels overlap, zero otherwise.
(deds/rect.h)
#define MXRECT(b)
Typesafe conversion between a class derived from MX_RECTATOM to a MX_RECT.
#define mx_rectatom(r,d,s)
Construct a MX_RECTATOM
#define mx_rectatom_place(r, rect)
Place a MX_RECTAOM at some specific rectangle.
#define mx_x1(r)
MX_RECTATOM x1 value.
#define mx_y1(r)
MX_RECTATOM y1 value.
#define mx_x2(r)
MX_RECTATOM x2 value.
#define mx_y2(r)
MX_RECTATOM y2 value.
#define mx_w(r)
MX_RECTATOM width.
#define mx_h(r)
MX_RECTATOM height.
#define MX_TREE(type)
Declare elements for a tree structure
This macro declares elements for a tree structure. This
delcaration must be included in a struct with an appropriate type. The
surrounding type can then be manupulated by the other mx_tree_* functions.
(deds/tree.h)
#define MX_TREE_INSERT(o,p)
Insert a tree element into a parent.
The inserted element is placed after the existing children of the parent. An tree element
cannot be inserted into itself.
(deds/tree.h)
#define MX_TREE_REMOVE(o)
Remove a tree element from a parent.
#define mx_tree_first(o)
The first child element of a parent.
#define mx_tree_last(o)
The last child element of a parent.
#define mx_tree_next(o)
The next child element with the same parent.
#define mx_tree_prev(o)
The previous child element with the same parent.
#define mx_tree_parent(o)
The parent tree element.
#define MX_VECTOR(type)
A 100% typesafe generic vector for C
This macro functions as a type delaration for a vector of user-defined
type.
(deds/vector.h)
#define MX_VECTOR_ITERATOR(type)
An iterator for a MX_VECTOR
This macro functions as a type declaration for an iterator for a
similarly typed MX_VECTOR.
(deds/vector.h)
#define mx_vector(mxvect)
Construct a MX_VECTOR
This macro constructs a MX_VECTOR object. This must be called first before any other mx_vector_* functions are called.
MX_VECTOR is correctly initialized with a 0 bit pattern. So static
MX_VECTOR are correctly initialized and dont necessarily need a call to the
constructor.
(deds/vector.h)
#define mx_vector_free(mxvect)
Destruct a MX_VECTOR
This macro destroys an MX_VECTOR object by releasing any memory
that has been allocated. It should be the last call to any mx_vector_*
functions. Access of the MX_VECTOR object after destruction should not be done.
(deds/vector.h)
#define mx_vector_at(mxvect, mxn)
Return an element from a MX_VECTOR at a specific index
This macro returns elements from a MX_VECTOR at a specific index.
It is safer than accessing the underlying pointer because it wont allow
access outside the correct range for the vector.
(deds/vector.h)
#define mx_vector_back(mxvect)
Return the last element from a MX_VECTOR
This macro returns the last element from a MX_VECTOR.
(deds/vector.h)
#define mx_vector_begin(mxvect)
Pointer to first element
This macro returns a pointer to the first data element in the MX_VECTOR object.
If the MX_VECTOR contains no data elements then 0 is returned.
(deds/vector.h)
#define mx_vector_capacity(mxvect)
Capacity
This macro returns the capacity of an MX_VECTOR object. This is the
number of elements that the vector can contain without reqriring any internal
memory management.
(deds/vector.h)
#define mx_vector_clear(mxvect)
Clear
This macro deletes all the objects from a MX_VECTOR
(deds/vector.h)
#define mx_vector_empty(mxvect)
Empty
This macro deletes all the objects from a MX_VECTOR
(deds/vector.h)
#define mx_vector_end(mxvect)
Pointer one-past last element
This macro returns a pointer one-past the last data element in the MX_VECTOR object.
If the MX_VECTOR contains no data elements then 0 is returned.
(deds/vector.h)
#define mx_vector_erase(mxvect, mxiter)
Erase an element
This macro removes a data element from an MX_VECTOR object.
If there are data elements at indicies higher than those removed then they
are are moved to lower indicies.
(deds/vector.h)
#define mx_vector_push_back(mxvect, mxdat)
Push an element onto the back of the MX_VECTOR
This macro makes a bitwise copy of a single data element and appends
the copy onto an existing MX_VECTOR object. The size of the vector is expanded
to hold the new data elements.
(deds/vector.h)
#define mx_vector_size(mxvect)
Number of elements
This macro returns the size of an MX_VECTOR object. This is the number
of data elements that can be safely accessed.
(deds/vector.h)
#define mx_vector_resize(mxvect, n)
Resize
This macro resizes a MX_VECTOR object. If the MX_VECTOR does not have
sufficient capacity to hold the new number of elements then new space is
reserved using mx_vector_reserve().
(deds/vector.h)
#define mx_vector_reserve(mxvect, n)
Set capacity
This macro reserves space in a MX_VECTOR object for later copying or
appending of data elements. If enough space is reserved the insertion or appending
of elements does not require memory management (realloc of internal buffer) and
will be fast. If enough space is already reserved this macro does nothing.
(deds/vector.h)
#define mx_vector_extend(mxvect, n)
Increase capacity
This macro reserves space for additional data elements in a MX_VECTOR object.
If enough space is reserved then future insertion or appending may not require memory
management (realloc of internal buffer) and will therefore be fast. If enough space
is already reserved this macro does nothing.
(deds/vector.h)
#define mx_vector_contract(mxvect)
Reduce capacity to minimum
This macro reduces the memory used by a MX_VECTOR object to the
minimum required to safely contain the data elements contained. This function can
cause memory management (realloc of internal buffer) to occur.
(deds/vector.h)
#define mx_vector_append1(mxvect, dat)
Append 1 element (bitwise copy)
This macro makes a bitwise copy of a single data element and appends
the copy onto an existing MX_VECTOR object. The size of the vector is expanded
to hold the new data elements.
(deds/vector.h)
#define mx_vector_append(mxvect, dat, n)
Append a number of elements (bitwise copy)
This macro makes a bitwise copy of a number of data elements and appends the copies
onto an existing MX_VECTOR object. More than one data element can be appended at once.
If necessary the size of the vector is expanded to hold the new data elements.
(deds/vector.h)
#define mx_vector_insert1(mxvect, dat, ind)
Insert 1 element (bitwise copy)
This macro makes a bitwise copy of one data element and inserts the
copy into an existing MX_VECTOR object. If necessary the size of the vector
is expanded to hold the new data element.
(deds/vector.h)
#define mx_vector_insert(mxvect, dat, n, ind)
Insert a number of elements (bitwise copy)
This macro makes a bitwise copy of a number of data elements and inserts the
copies into an existing MX_VECTOR object at sepcific indicies. More than one data
element can be inserted at once. If necessary the size of the vector is expanded
to hold the new data elements.
(deds/vector.h)
#define mx_vector_remove_last(mxvect)
Remove last element
This macro removes only the last object from a vector. The size of the MX_VECTOR
is reduced by one.
(deds/vector.h)
Generated by MXDOC 2.6 on Wed Apr 25 21:43:00 2007