bigpoint_dyntype.h 759 Bytes
#ifndef __BIGPOINT_DYNTYPE_H__
#define __BIGPOINT_DYNTYPE_H__

#include <sys/types.h>

#include "bigpoint_cclass.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_OBJECT
};


struct BIGPOINT_DYNTYPE {
    const struct BIGPOINT_CCLASS * const class;
    enum BIGPOINT_DYNTYPE_TYPES type;
    size_t size;
    union _data {
        unsigned char _boolean;
        long _int;
        double _float;
        char * _string;
        void * _object;
    } data;
};

extern const struct BIGPOINT_CCLASS * const BIGPOINT_DYNTYPE;

#endif//__BIGPOINT_DYNTYPE_H__

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