ofunc.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef VIRTUALMATH_OFUNC_H
  2. #define VIRTUALMATH_OFUNC_H
  3. #include "__macro.h"
  4. #include "io.h"
  5. #include "object.h"
  6. #include "vobject.h"
  7. #include "sys.h"
  8. #include "int.h"
  9. #include "dou.h"
  10. #include "str.h"
  11. #include "bool.h"
  12. #include "pass.h"
  13. #include "list.h"
  14. #include "dict.h"
  15. #include "function.h"
  16. #include "listiter.h"
  17. #include "dictiter.h"
  18. #include "error_.h"
  19. #include "file_.h"
  20. #include "lib_.h"
  21. #include "pointer.h"
  22. struct Argument;
  23. struct VarList;
  24. struct Inherit;
  25. struct Inter;
  26. struct NameFunc{
  27. wchar_t *name;
  28. OfficialFunction of;
  29. enum FunctionPtType type;
  30. enum NameFuncVar {
  31. nfv_inline,
  32. nfv_notpush,
  33. nfv_default,
  34. } var;
  35. };
  36. typedef struct NameFunc NameFunc;
  37. void registeredBaseFunction(struct LinkValue *belong, Inter *inter);
  38. void registeredFunctionName(LinkValue *belong, Inter *inter);
  39. // 普通模式函数
  40. LinkValue *intCore(LinkValue *belong, LinkValue *class, Inter *inter);
  41. LinkValue *strCore(LinkValue *belong, LinkValue *class, Inter *inter);
  42. LinkValue *boolCore(LinkValue *belong, LinkValue *class, Inter *inter);
  43. LinkValue *douCore(LinkValue *belong, LinkValue *class, Inter *inter);
  44. LinkValue *passCore(LinkValue *belong, LinkValue *class, Inter *inter);
  45. #define SET_DECLARATION(NAME) void vobject_##NAME##_base(FUNC_VOBJ)
  46. SET_DECLARATION(add);
  47. SET_DECLARATION(sub);
  48. SET_DECLARATION(mul);
  49. SET_DECLARATION(div);
  50. SET_DECLARATION(intdiv);
  51. SET_DECLARATION(mod);
  52. SET_DECLARATION(pow);
  53. SET_DECLARATION(eq);
  54. SET_DECLARATION(noteq);
  55. SET_DECLARATION(moreeq);
  56. SET_DECLARATION(lesseq);
  57. SET_DECLARATION(more);
  58. SET_DECLARATION(less);
  59. SET_DECLARATION(band);
  60. SET_DECLARATION(bor);
  61. SET_DECLARATION(bxor);
  62. SET_DECLARATION(bl);
  63. SET_DECLARATION(br);
  64. void vobject_bnot_base(FUNC_VOBJR);
  65. void vobject_negate_base(FUNC_VOBJR);
  66. #undef SET_DECLARATION
  67. #endif //VIRTUALMATH_OFUNC_H