ischeme.h 939 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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/iplugin.h>
  9. #include <klish/ientry.h>
  10. #include <klish/kscheme.h>
  11. #define ACTION_LIST .actions = &(iaction_t * []) {
  12. #define END_ACTION_LIST NULL }
  13. #define ACTION &(iaction_t)
  14. #define PLUGIN_LIST .plugins = &(iplugin_t * []) {
  15. #define END_PLUGIN_LIST NULL }
  16. #define PLUGIN &(iplugin_t)
  17. #define ENTRY_LIST .entrys = &(ientry_t * []) {
  18. #define END_ENTRY_LIST NULL }
  19. #define ENTRY &(ientry_t)
  20. typedef struct ischeme_s {
  21. char *name;
  22. ientry_t * (*entrys)[];
  23. iplugin_t * (*plugins)[];
  24. } ischeme_t;
  25. C_DECL_BEGIN
  26. bool_t ischeme_parse_nested(const ischeme_t *ischeme, kscheme_t *kscheme,
  27. faux_error_t *error);
  28. bool_t ischeme_load(const ischeme_t *ischeme, kscheme_t *kscheme,
  29. faux_error_t *error);
  30. char *ischeme_deploy(const kscheme_t *scheme, int level);
  31. C_DECL_END
  32. #endif // _klish_ischeme_h