bigpoint_dyntype.h 867 Bytes
#ifndef __BIGPOINT_DYNTYPE_H__
#define __BIGPOINT_DYNTYPE_H__

#include <sys/types.h>

#include "bigpoint_cclass.h"

struct BIGPOINT_DYNTYPE;

#include "bigpoint_hash.h"


enum BIGPOINT_DYNTYPE_TYPES {
    BIGPOINT_DYNTYPE_NULL = 0,
    BIGPOINT_DYNTYPE_BOOLEAN,
    BIGPOINT_DYNTYPE_INT,
    BIGPOINT_DYNTYPE_FLOAT,
    BIGPOINT_DYNTYPE_STRING,
    BIGPOINT_DYNTYPE_ARRAY,
    BIGPOINT_DYNTYPE_HASH
};


struct BIGPOINT_DYNTYPE {
    const struct BIGPOINT_CCLASS * const class;
    enum BIGPOINT_DYNTYPE_TYPES type;
    size_t size;
    union _data {
        unsigned char _boolean;
        int _int;
        double _float;
        char * _string;
        struct BIGPOINT_DYNTYPE ** _array;
        struct BIGPOINT_HASH * _hash;
    } data;
};

extern const struct BIGPOINT_CCLASS * const BIGPOINT_DYNTYPE;

#endif//__BIGPOINT_DYNTYPE_H__

// vim: set et ts=4 sw=4: