character.c File Reference

Plugin that provides a Character service. More...

#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "boris.h"

Include dependency graph for character.c:

Go to the source code of this file.

Data Structures

struct  character
struct  plugin_character_class

Functions

static const char * character_attr_get (struct character *ch, const char *name)
static int character_attr_set (struct character *ch, const char *name, const char *value)
static struct charactercharacter_get (unsigned character_id)
 load character into active list, if not already loaded, then increase reference count of character.
static struct charactercharacter_ll_alloc (void)
 allocate an empty character.
static void character_ll_free (struct character *ch)
 deallocate a character structure immediately.
static struct charactercharacter_load (unsigned character_id)
 load a character from fdb.
static struct charactercharacter_new (void)
static int character_preflight (void)
 preflight all of the characters by loading every one of them.
static void character_put (struct character *ch)
 reduce reference count of character.
static int character_save (struct character *ch)
 save a character record, but only if the dirty_fl is set.
static int initialize (void)
 LIST_HEAD (struct character_cache, struct character)
static int shutdown (void)

Variables

struct {
   char *   name
   size_t   ofs
   enum value_type   type
attrinfo []
 definition of every attribute in character record.
static struct character_cache character_cache
 list of all loaded characters.
static struct freelist character_id_freelist
struct plugin_character_class plugin_class


Detailed Description

Plugin that provides a Character service.

Author:
Jon Mayo <jon.mayo@gmail.com>
Date:
2009 Dec 27
Copyright 2009 Jon Mayo Ms-RL : See COPYING.txt for complete license text.

Definition in file character.c.


Function Documentation

static const char* character_attr_get ( struct character ch,
const char *  name 
) [static]

Definition at line 144 of file character.c.

Here is the call graph for this function:

static int character_attr_set ( struct character ch,
const char *  name,
const char *  value 
) [static]

Definition at line 121 of file character.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static struct character* character_get ( unsigned  character_id  )  [static, read]

load character into active list, if not already loaded, then increase reference count of character.

Definition at line 249 of file character.c.

Here is the call graph for this function:

static struct character* character_ll_alloc ( void   )  [static, read]

allocate an empty character.

Definition at line 109 of file character.c.

Here is the caller graph for this function:

static void character_ll_free ( struct character ch  )  [static]

deallocate a character structure immediately.

Definition at line 84 of file character.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static struct character* character_load ( unsigned  character_id  )  [static, read]

load a character from fdb.

Definition at line 163 of file character.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static struct character* character_new ( void   )  [static, read]

Definition at line 286 of file character.c.

Here is the call graph for this function:

static int character_preflight ( void   )  [static]

preflight all of the characters by loading every one of them.

Definition at line 315 of file character.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void character_put ( struct character ch  )  [static]

reduce reference count of character.

Definition at line 275 of file character.c.

Here is the call graph for this function:

static int character_save ( struct character ch  )  [static]

save a character record, but only if the dirty_fl is set.

Definition at line 205 of file character.c.

Here is the caller graph for this function:

static int initialize ( void   )  [static]

Definition at line 363 of file character.c.

Here is the call graph for this function:

LIST_HEAD ( struct character_cache  ,
struct character   
)

static int shutdown ( void   )  [static]

Definition at line 381 of file character.c.

Here is the call graph for this function:


Variable Documentation

struct { ... } attrinfo[] [static]

definition of every attribute in character record.

list of all loaded characters.

Definition at line 74 of file character.c.

Definition at line 76 of file character.c.

char* name

Definition at line 58 of file character.c.

size_t ofs

Definition at line 60 of file character.c.

Initial value:

 {
    .base_class = { PLUGIN_API, "character", initialize, shutdown },
    .character_interface = {
        character_get, character_put, character_new,
        character_attr_set, character_attr_get,
        character_save
    },
}

Definition at line 396 of file character.c.

Definition at line 59 of file character.c.


Generated on Mon Dec 28 09:03:34 2009 for boris by  doxygen 1.5.8