ischeme.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /** @file ischeme.h
  2. *
  3. * @brief Klish Scheme
  4. */
  5. #ifndef _klish_ischeme_h
  6. #define _klish_ischeme_h
  7. #include <faux/error.h>
  8. #include <klish/iptype.h>
  9. #include <klish/iplugin.h>
  10. #include <klish/iview.h>
  11. #include <klish/inspace.h>
  12. #include <klish/ientry.h>
  13. #include <klish/kscheme.h>
  14. #define VIEW_LIST .views = &(iview_t * []) {
  15. #define END_VIEW_LIST NULL }
  16. #define VIEW &(iview_t)
  17. #define PTYPE_LIST .ptypes = &(iptype_t * []) {
  18. #define END_PTYPE_LIST NULL }
  19. #define PTYPE &(iptype_t)
  20. #define COMMAND_LIST .commands = &(icommand_t * []) {
  21. #define END_COMMAND_LIST NULL }
  22. #define COMMAND &(icommand_t)
  23. #define PARAM_LIST .params = &(iparam_t * []) {
  24. #define END_PARAM_LIST NULL }
  25. #define PARAM &(iparam_t)
  26. #define ACTION_LIST .actions = &(iaction_t * []) {
  27. #define END_ACTION_LIST NULL }
  28. #define ACTION &(iaction_t)
  29. #define PLUGIN_LIST .plugins = &(iplugin_t * []) {
  30. #define END_PLUGIN_LIST NULL }
  31. #define PLUGIN &(iplugin_t)
  32. #define NSPACE_LIST .nspaces = &(inspace_t * []) {
  33. #define END_NSPACE_LIST NULL }
  34. #define NSPACE &(inspace_t)
  35. #define ENTRY_LIST .entrys = &(ientry_t * []) {
  36. #define END_ENTRY_LIST NULL }
  37. #define ENTRY &(ientry_t)
  38. typedef struct ischeme_s {
  39. char *name;
  40. ientry_t * (*entrys)[];
  41. iplugin_t * (*plugins)[];
  42. iptype_t * (*ptypes)[];
  43. iview_t * (*views)[];
  44. } ischeme_t;
  45. C_DECL_BEGIN
  46. bool_t ischeme_parse_nested(const ischeme_t *ischeme, kscheme_t *kscheme,
  47. faux_error_t *error);
  48. bool_t ischeme_load(const ischeme_t *ischeme, kscheme_t *kscheme,
  49. faux_error_t *error);
  50. char *ischeme_deploy(const kscheme_t *scheme, int level);
  51. C_DECL_END
  52. #endif // _klish_ischeme_h