ATActionMgr.h 722 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // ATActionMgr.h
  3. // ATrack
  4. //
  5. // Created by 卡迩 on 2018/4/26.
  6. // Copyright © 2018年 Alipay. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @class ATAction;
  10. /**
  11. * 操作管理器
  12. */
  13. @interface ATActionMgr : NSObject
  14. @property (nonatomic, readonly, strong) NSOperationQueue *actionQueue; /**< 操作队列*/
  15. /**
  16. * 入队一个操作
  17. */
  18. - (void)enqueueAction:(ATAction *)action;
  19. @end
  20. ////////////////////////////////////////////////////////////////////////////////
  21. /**
  22. * 操作对象基类
  23. */
  24. @interface ATAction : NSOperation
  25. @property (nonatomic, copy) NSString *actionName; /**< 操作名*/
  26. /**
  27. * 是否可用. 不可用时不执行. 默认返回 \c YES.
  28. */
  29. - (BOOL)validate;
  30. @end