@ElmObjClass.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /******************************************************************************/
  2. /******************************************************************************/
  3. class ElmObjClass : ElmData
  4. {
  5. enum FLAG // !! these enums are saved !!
  6. {
  7. OVR_ACCESS=1<<0,
  8. OVR_PATH =1<<1,
  9. TERRAIN =1<<2,
  10. PATH_SHIFT= 3,
  11. PATH_MASK = 1|2, // use 2 bits for mask to store up to 4 path modes
  12. };
  13. byte flag; // FLAG, this should not be synced, it is set only from data
  14. // get
  15. bool ovrAccess()C; void ovrAccess(bool on );
  16. bool terrain ()C; void terrain (bool on );
  17. bool ovrPath ()C; void ovrPath (bool on );
  18. OBJ_PATH pathSelf ()C; void pathSelf (OBJ_PATH path);
  19. // operations
  20. void from(C EditObject &params);
  21. uint undo(C ElmObjClass &src); // don't adjust 'ver' here because it also relies on 'EditObject', because of that this is included in 'ElmFileInShort'
  22. uint sync(C ElmObjClass &src); // don't adjust 'ver' here because it also relies on 'EditObject', because of that this is included in 'ElmFileInShort'
  23. // io
  24. virtual bool save(File &f)C override;
  25. virtual bool load(File &f)override;
  26. virtual void save(MemPtr<TextNode> nodes)C override;
  27. virtual void load(C MemPtr<TextNode> &nodes)override;
  28. public:
  29. ElmObjClass();
  30. };
  31. /******************************************************************************/
  32. /******************************************************************************/
  33. /******************************************************************************/