Variables.h 474 B

123456789101112131415161718192021222324252627
  1. #ifndef STRINGINTMAP_H
  2. #define STRINGINTMAP_H
  3. #include <stdbool.h>
  4. #include "DataType.h"
  5. typedef struct {
  6. const char* name;
  7. DataType type;
  8. int address;
  9. bool initialized;
  10. } Variable;
  11. typedef struct {
  12. int capacity;
  13. int entries;
  14. int address;
  15. Variable* data;
  16. } Variables;
  17. void vInit(Variables* v);
  18. void vDelete(Variables* v);
  19. Variable* vSearch(Variables* v, const char* s);
  20. Variable* vAdd(Variables* v, const char* s, DataType type);
  21. #endif