CE Item.h 1006 B

1234567891011121314151617181920212223242526272829303132333435
  1. /******************************************************************************/
  2. namespace Edit{
  3. /******************************************************************************/
  4. struct Item
  5. {
  6. enum TYPE : Byte
  7. {
  8. UNKNOWN,
  9. LIB ,
  10. APP ,
  11. FOLDER ,
  12. FILE ,
  13. };
  14. TYPE type;
  15. Str base_name, full_name;
  16. Memx<Item> children;
  17. #if EE_PRIVATE
  18. Item& set(TYPE type, C Str &base_name, C Str &full_name=S) {T.type=type; T.base_name=base_name; T.full_name=full_name; return T;}
  19. void replacePath(C Str &src, C Str &dest);
  20. Bool save(File &f, StrLibrary &sl)C;
  21. Bool load(File &f, StrLibrary &sl);
  22. #endif
  23. Item() {type=UNKNOWN;}
  24. };
  25. #if EE_PRIVATE
  26. Item& GetFolder(Memx<Item> &items, C Str &name);
  27. Item& GetFile (Memx<Item> &items, C Str &name, C Str &full_name);
  28. #endif
  29. /******************************************************************************/
  30. } // namespace
  31. /******************************************************************************/