#ifndef EVAL_H
#define EVAL_H

#include <v_lib.h>
#include "decomp.h"
#include "util.h"
#include "state.h"

#define ARG_MATRIX          1
#define ARG_VECTOR          2
#define ARG_DECOMPOSITION   3

typedef struct arg_s
{
    char    *id;    /* result of strDup() */
    u32_t   type;   /* ARG_MATRIX | ARG_VECTOR | ARG_DECOMPOSITION */
    eval_state_t state;
    union
    {
        void_p      any;
        matrix_p    matrix;
        vector_p    vector;
        bt_decomp_p decomposition;
    } data;
    void    (*destroy)(void_p data_any);
}   arg_t, *arg_p;

arg_p evalArgument(char *name,u32_t type,vhandle_t script);
arg_p evalNextArgument(vhandle_t script,int type);

vboolean evalGlobals(vhandle_t script);
vboolean evalTargets(vhandle_t script);

void evalCollectGarbage(void);

void evalListClasses(void);
void evalListClassOperations(void);

#endif /* EVAL_H */
