2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * WvLink is one element of a linked list.
6 * Used by wvlinklist.h.
11 #include <stdlib.h> // for 'NULL'
14 * WvLink is one element of a WvList<T>.
16 * Note that WvLink itself is untyped to minimize the amount of
17 * generated code. This means that WvLink cannot handle the
18 * autofree behaviour itself which would require static type
19 * information. Instead, it defers this behaviour to the
20 * template instantiation of WvList<T> that uses it.
34 WvLink(void *_data
, bool _autofree
, const char *_id
= NULL
):
35 data(_data
), next(NULL
), id(_id
), autofree(_autofree
)
38 WvLink(void *_data
, WvLink
*prev
, WvLink
*&tail
, bool _autofree
,
39 const char *_id
= NULL
);
46 void set_autofree(bool _autofree
)
51 void unlink(WvLink
*prev
)
58 #define WvIterStuff(_type_) \
59 /*! @brief Returns a reference to the current element. */ \
60 _type_ &operator () () const \
62 /*! @brief Returns a pointer to the current element. */ \
63 _type_ *operator -> () const \
65 /*! @brief Returns a reference to the current element. */ \
66 _type_ &operator* () const \