tornavis/source/blender/makesdna/DNA_listBase.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
826 B
C
Raw Normal View History

/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */
2002-10-12 13:37:38 +02:00
/** \file
* \ingroup DNA
* \brief These structs are the foundation for all linked lists in the library system.
*
* Doubly-linked lists start from a ListBase and contain elements beginning
* with Link.
*/
#pragma once
2011-12-30 08:25:49 +01:00
/** Generic - all structs which are put into linked lists begin with this. */
2012-06-07 00:38:39 +02:00
typedef struct Link {
2012-04-29 17:47:02 +02:00
struct Link *next, *prev;
2002-10-12 13:37:38 +02:00
} Link;
/** Simple subclass of Link. Use this when it is not worth defining a custom one. */
2012-06-07 00:38:39 +02:00
typedef struct LinkData {
struct LinkData *next, *prev;
void *data;
} LinkData;
/** Never change the size of this! dna_genfile.cc detects pointer_size with it. */
2012-06-07 00:38:39 +02:00
typedef struct ListBase {
2002-10-12 13:37:38 +02:00
void *first, *last;
} ListBase;
/* 8 byte alignment! */