Import project/ code

This commit is contained in:
Joshua Granick
2013-11-25 23:32:25 -08:00
parent 5f258a833f
commit 9141d52836
313 changed files with 62693 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#ifndef EXTERNAL_INTERFACE
#define EXTERNAL_INTERFACE
#include <hx/CFFI.h>
#include <Object.h>
namespace nme
{
extern vkind gObjectKind;
value ObjectToAbstract(Object *inObject);
template<typename OBJ>
bool AbstractToObject(value inValue, OBJ *&outObj)
{
outObj = 0;
if ( ! val_is_kind(inValue,gObjectKind) )
return false;
Object *obj = (Object *)val_to_kind(inValue,gObjectKind);
outObj = dynamic_cast<OBJ *>(obj);
return outObj;
}
}
#endif