ofunc.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. #include "struct_.h"
  23. struct Argument;
  24. struct VarList;
  25. struct Inherit;
  26. struct Inter;
  27. struct NameFunc{
  28. wchar_t *name;
  29. OfficialFunction of;
  30. enum FunctionPtType type;
  31. enum NameFuncVar {
  32. nfv_inline,
  33. nfv_notpush,
  34. nfv_default,
  35. } var;
  36. };
  37. typedef struct NameFunc NameFunc;
  38. void registeredBaseFunction(struct LinkValue *belong, Inter *inter);
  39. void registeredFunctionName(LinkValue *belong, Inter *inter);
  40. // 普通模式函数
  41. LinkValue *intCore(LinkValue *belong, LinkValue *class, Inter *inter);
  42. LinkValue *strCore(LinkValue *belong, LinkValue *class, Inter *inter);
  43. LinkValue *boolCore(LinkValue *belong, LinkValue *class, Inter *inter);
  44. LinkValue *structCore(LinkValue *belong, LinkValue *class, Inter *inter);
  45. LinkValue *douCore(LinkValue *belong, LinkValue *class, Inter *inter);
  46. LinkValue *passCore(LinkValue *belong, LinkValue *class, Inter *inter);
  47. #define SET_DECLARATION(NAME) void vobject_##NAME##_base(FUNC_VOBJ)
  48. SET_DECLARATION(add);
  49. SET_DECLARATION(sub);
  50. SET_DECLARATION(mul);
  51. SET_DECLARATION(div);
  52. SET_DECLARATION(intdiv);
  53. SET_DECLARATION(mod);
  54. SET_DECLARATION(pow);
  55. SET_DECLARATION(eq);
  56. SET_DECLARATION(noteq);
  57. SET_DECLARATION(moreeq);
  58. SET_DECLARATION(lesseq);
  59. SET_DECLARATION(more);
  60. SET_DECLARATION(less);
  61. SET_DECLARATION(band);
  62. SET_DECLARATION(bor);
  63. SET_DECLARATION(bxor);
  64. SET_DECLARATION(bl);
  65. SET_DECLARATION(br);
  66. void vobject_bnot_base(FUNC_VOBJR);
  67. void vobject_negate_base(FUNC_VOBJR);
  68. #undef SET_DECLARATION
  69. #endif //VIRTUALMATH_OFUNC_H