Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.3 KiB

  1. // Retainable.h -- Retainable class declaration
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #if !defined(SLBCSP_RETAINABLE_H)
  8. #define SLBCSP_RETAINABLE_H
  9. // Abstract base class mixin (interface) used by derived classes to
  10. // define the interface to retain an object (block all other
  11. // applications from access until interactions with that resource are
  12. // complete). See the companion Retained template class to manage the
  13. // resources derived from Retainable.
  14. class Retainable
  15. {
  16. public:
  17. // Types
  18. // C'tors/D'tors
  19. Retainable();
  20. virtual
  21. ~Retainable() = 0;
  22. // Operators
  23. // Operations
  24. // Give up control of the resource.
  25. virtual void
  26. Relinquish() = 0;
  27. // Obtain control of the resource, blocking all others from use.
  28. virtual void
  29. Retain() = 0;
  30. // Access
  31. // Predicates
  32. protected:
  33. // Types
  34. // C'tors/D'tors
  35. // Operators
  36. // Operations
  37. // Access
  38. // Predicates
  39. // Variables
  40. private:
  41. // Types
  42. // C'tors/D'tors
  43. // Operators
  44. // Operations
  45. // Access
  46. // Predicates
  47. // Variables
  48. };
  49. #endif // SLBCSP_RETAINABLE_H