naev 0.10.4
Data Structures | Macros | Functions | Variables
slots.c File Reference

Handles the slot properties. More...

#include "slots.h"
#include "array.h"
#include "log.h"
#include "nxml.h"
#include "ndata.h"

Go to the source code of this file.

Data Structures

struct  SlotProperty_t
 Representation of a slot property. More...
 

Macros

#define SP_XML_ID   "slot"
 

Functions

static int sp_check (unsigned int spid)
 Checks to see if in bound of array. More...
 
int sp_load (void)
 Initializes the slot properties. More...
 
void sp_cleanup (void)
 Cleans up after the slot properties. More...
 
unsigned int sp_get (const char *name)
 Gets the id of a slot property. More...
 
const char * sp_display (unsigned int spid)
 Gets the display name of a slot property (in English). More...
 
const char * sp_description (unsigned int spid)
 Gets the description of a slot property (in English). More...
 
int sp_required (unsigned int spid)
 Gets whether or not a slot property is required. More...
 
int sp_exclusive (unsigned int spid)
 Gets whether or not a slot property is exclusive. More...
 
int sp_locked (unsigned int spid)
 Gets whether or not a slot property is locked. More...
 

Variables

static SlotProperty_tsp_array = NULL
 

Detailed Description

Handles the slot properties.

Definition in file slots.c.

Macro Definition Documentation

◆ SP_XML_ID

#define SP_XML_ID   "slot"

SP XML node tag.

Definition at line 20 of file slots.c.

Function Documentation

◆ sp_check()

static int sp_check ( unsigned int  spid)
static

Checks to see if in bound of array.

Definition at line 140 of file slots.c.

◆ sp_cleanup()

void sp_cleanup ( void  )

Cleans up after the slot properties.

Definition at line 106 of file slots.c.

◆ sp_description()

const char * sp_description ( unsigned int  spid)

Gets the description of a slot property (in English).

Definition at line 160 of file slots.c.

◆ sp_display()

const char * sp_display ( unsigned int  spid)

Gets the display name of a slot property (in English).

Definition at line 150 of file slots.c.

◆ sp_exclusive()

int sp_exclusive ( unsigned int  spid)

Gets whether or not a slot property is exclusive.

Definition at line 180 of file slots.c.

◆ sp_get()

unsigned int sp_get ( const char *  name)

Gets the id of a slot property.

Parameters
nameName to match.
Returns
ID of the slot property.

Definition at line 124 of file slots.c.

◆ sp_load()

int sp_load ( void  )

Initializes the slot properties.

Definition at line 44 of file slots.c.

◆ sp_locked()

int sp_locked ( unsigned int  spid)

Gets whether or not a slot property is locked.

Definition at line 190 of file slots.c.

◆ sp_required()

int sp_required ( unsigned int  spid)

Gets whether or not a slot property is required.

Definition at line 170 of file slots.c.

Variable Documentation

◆ sp_array

SlotProperty_t* sp_array = NULL
static

Slot property array.

Definition at line 34 of file slots.c.