MirrorPath.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _MirrorPath_h_
  2. #define _MirrorPath_h_
  3. #include "..\..\common_h\FileService.h"
  4. //Зеркальный путь
  5. class MirrorPath : public IMirrorPath
  6. {
  7. public:
  8. MirrorPath(const char * _from, const char * _on, const char * _realPathFrom, const char * _realPathOn, const char * _cppFileName, long _cppFileLine);
  9. virtual ~MirrorPath();
  10. //Удалить объект, сообщив об ошибке
  11. void ErrorRelease();
  12. //Этот ли объект
  13. bool IsThis(const string & _from, const string & _on);
  14. //Увеличить счётчик объектов
  15. void AddRefCount();
  16. public:
  17. //Удалить объект, закончив отражать путь
  18. virtual void Release();
  19. //Получить путь который отражается
  20. virtual const char * From();
  21. //Получить путь на который отражается
  22. virtual const char * On();
  23. //Получить полный нормальизованый путь
  24. const char * GetPath();
  25. //Установить нод к которому привязан объект
  26. void SetNode(void * _node);
  27. //Получить нод к которому привязан объект
  28. void * GetNode();
  29. private:
  30. string from;
  31. string on;
  32. string pathFrom;
  33. string pathOn;
  34. void * node;
  35. long refCount;
  36. #ifndef STOP_DEBUG
  37. const char * cppFileName;
  38. long cppFileLine;
  39. #endif
  40. };
  41. //Получить полный нормальизованый путь
  42. __forceinline const char * MirrorPath::GetPath()
  43. {
  44. return pathFrom;
  45. }
  46. #endif