store.cc File Reference

#include "AppHdr.h"
#include "store.h"
#include "dlua.h"
#include "externs.h"
#include "libutil.h"
#include "monster.h"
#include "tags.h"
#include "travel.h"
#include <algorithm>

Include dependency graph for store.cc:


Defines

#define COPY_PTR(ptr_type)
#define GET_VAL(x, _type, field, value)
#define GET_VAL_PTR(x, _type, value)
#define GET_CONST_SETUP(x)
#define CONST_INT_CAST()
#define INT_OPERATOR_UNARY(op)

Define Documentation

 
#define CONST_INT_CAST (  ) 

Value:

switch (type) \
    { \
    case SV_BYTE: \
        return get_byte(); \
    case SV_SHORT: \
        return get_short(); \
    case SV_INT: \
        return get_int(); \
    default: \
        die("unknown stored value type"); \
    }

#define COPY_PTR ( ptr_type   ) 

Value:

{ \
        ptr_type *ptr = static_cast<ptr_type*>(val.ptr); \
        if (ptr != NULL) \
            delete ptr; \
        ptr = static_cast<ptr_type*>(other.val.ptr); \
        val.ptr = (void*) new ptr_type (*ptr);  \
    }

#define GET_CONST_SETUP (  ) 

Value:

ASSERT(!(flags & SFLAG_UNSET)); \
    ASSERT(type == (x));

#define GET_VAL ( x,
_type,
field,
value   ) 

#define GET_VAL_PTR ( x,
_type,
value   ) 

Value:

ASSERT((flags & SFLAG_UNSET) || !(flags & SFLAG_CONST_VAL)); \
    if (type != (x) || (flags & SFLAG_UNSET)) \
    { \
        if (type == SV_NONE) \
        { \
            type    = (x); \
            val.ptr = (value); \
        } \
        else \
        { \
            unset(); \
            val.ptr = (value); \
            type    = (x); \
        } \
    } \
    else \
        delete (value); \
    flags &= ~SFLAG_UNSET; \
    return *((_type) val.ptr);

#define INT_OPERATOR_UNARY ( op   ) 

Value:

switch (type) \
    { \
    case SV_BYTE: \
    { \
        char &temp = get_byte(); \
        temp op; \
        return temp; \
    } \
 \
    case SV_SHORT: \
    { \
        short &temp = get_short(); \
        temp op; \
        return temp; \
    } \
    case SV_INT: \
    { \
        int &temp = get_int(); \
        temp op; \
        return temp; \
    } \
 \
    default: \
        die("unknown stored value type"); \
        return 0; \
    }


Generated on Thu Jan 13 13:26:47 2011 by  doxygen 1.5.6