00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ZEITGEIST_RUBYWRAPPER_H
00023 #define ZEITGEIST_RUBYWRAPPER_H
00024
00025
00026
00027
00028
00029
00030
00031 #undef PACKAGE_BUGREPORT
00032 #undef PACKAGE_NAME
00033 #undef PACKAGE_STRING
00034 #undef PACKAGE_TARNAME
00035 #undef PACKAGE_VERSION
00036
00037 #ifndef __GNUC__
00038 #define EXTERN extern __declspec(dllimport)
00039 #endif
00040 #include <ruby.h>
00041 #undef EXTERN
00042
00043 #undef PACKAGE_BUGREPORT
00044 #undef PACKAGE_NAME
00045 #undef PACKAGE_STRING
00046 #undef PACKAGE_TARNAME
00047 #undef PACKAGE_VERSION
00048
00049 #include <iostream>
00050
00051 namespace zeitgeist
00052 {
00061 struct RbArguments
00062 {
00063 VALUE recv;
00064 ID id;
00065 int n;
00066 VALUE *argv;
00067
00068 RbArguments(VALUE recv, ID id, int n, VALUE *argv) :
00069 recv(recv), id(id), n(n), argv(argv) {};
00070 };
00071
00074 VALUE RbFuncallWrap(VALUE arg);
00075
00079 VALUE RbEvalStringWrap(const std::string& str);
00080
00085 VALUE RbEvalStringWrap(const std::string& str, int& error);
00086
00088 std::string RbGetError();
00089
00091 void RbPrintError();
00092 };
00093
00094 #endif // ZEITGEIST_RUBYWRAPPER_H
00095