AWE Core 8.D.12 Documentation
Data Structures | Typedefs | Functions
Module Descriptor List

Mutate the list of available module classes at runtime. More...

Data Structures

struct  _ModuleDescriptorListEntry
 Element of _ModuleDescriptorList. More...
 
struct  _ModuleDescriptorList
 Linked list containing module descriptor entries. More...
 

Typedefs

typedef struct _ModuleDescriptorListEntry ModuleDescriptorListEntry
 Element of _ModuleDescriptorList. More...
 
typedef struct _ModuleDescriptorList ModuleDescriptorList
 Linked list containing module descriptor entries. More...
 

Functions

bool _ModuleDescriptorList::awe_moduleDescriptorList_prepend (ModuleDescriptorList *list, ModuleDescriptorListEntry *entry)
 Insert an entry at the beginning of the list. More...
 
bool _ModuleDescriptorList::awe_moduleDescriptorList_append (ModuleDescriptorList *list, ModuleDescriptorListEntry *entry)
 Insert an entry at the end of the list. More...
 
ModuleDescriptorListEntry_ModuleDescriptorList::awe_moduleDescriptorList_removeHead (ModuleDescriptorList *list)
 Remove the first entry of the module descriptor list. More...
 

Detailed Description

Mutate the list of available module classes at runtime.

Typedef Documentation

◆ ModuleDescriptorListEntry

Element of _ModuleDescriptorList.

Contains a pointer to an array of module descriptors (used by awe_moduleDescriptorList_* API functions).

See also
ModuleDescriptorList

◆ ModuleDescriptorList

Linked list containing module descriptor entries.

Should be initialized to zeros and manipulated with mutator functions.

Function Documentation

◆ awe_moduleDescriptorList_prepend()

bool awe_moduleDescriptorList_prepend ( ModuleDescriptorList list,
ModuleDescriptorListEntry entry 
)

Insert an entry at the beginning of the list.

Parameters
[in]listModuleDescriptorList to mutate.
[in]entryEntry to prepend. Note that the list does not take ownership of the entry. If it was dynamically allocated, the caller is responsible for freeing it.
Returns
True if the operation was successful, false otherwise.

◆ awe_moduleDescriptorList_append()

bool awe_moduleDescriptorList_append ( ModuleDescriptorList list,
ModuleDescriptorListEntry entry 
)

Insert an entry at the end of the list.

Parameters
[in]listModuleDescriptorList to mutate.
[in]entryEntry to append. Note that the list does not take ownership of the entry. If it was dynamically allocated, the caller is responsible for freeing it.
Returns
True if the operation was successful, false otherwise.

◆ awe_moduleDescriptorList_removeHead()

ModuleDescriptorListEntry * awe_moduleDescriptorList_removeHead ( ModuleDescriptorList list)

Remove the first entry of the module descriptor list.

Parameters
[in]listModuleDescriptorList to mutate.
Returns
The entry which was removed, or NULL if the list is empty/invalid. If the entry was dynamically allocated, then it is now safe to free it.