#ifndef __LUXINIA_REFERENCE_H__
#define __LUXINIA_REFERENCE_H__

#ifdef __cplusplus
extern "C" {
#endif
	typedef struct Reference_s {
		void *value;
		ClassType_t type;
	} Reference_t ;

	typedef Reference_t* Reference;

	#define Reference_get(ref,ptr) ((*((void**)&(ptr)) = (ref)!=NULL?((Reference)(ref))->value:0)!=0 && ((ref)!=NULL && ((Reference)(ref))->type!=0))
	#define Reference_reset(ptr) ((ptr) = NULL)

#ifdef __cplusplus
}
#endif

#endif

