Structs.h 553 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef STRUCTS_H
  2. #define STRUCTS_H
  3. #include "DataType.h"
  4. typedef struct {
  5. const char* name;
  6. DataType type;
  7. } StructVariable;
  8. typedef struct {
  9. const char* name;
  10. int id;
  11. int amount;
  12. StructVariable* vars;
  13. } Struct;
  14. typedef struct {
  15. int capacity;
  16. int entries;
  17. Struct* data;
  18. } Structs;
  19. void stAddVariable(Struct* st, const char* name, DataType type);
  20. void stsInit(Structs* sts);
  21. void stsDelete(Structs* sts);
  22. Struct* stsSearch(Structs* sts, const char* name);
  23. Struct* stsAdd(Structs* sts, const char* name);
  24. #endif