Leaked source code of windows server 2003
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.

125 lines
3.0 KiB

  1. /***************************************************************************\
  2. *
  3. * File: MsgClass.inl
  4. *
  5. * Description:
  6. * MsgClass.inl implements the "Message Class" object that is created for each
  7. * different message object type. Each object has a corresponding MsgClass
  8. * that provides information about that object type.
  9. *
  10. *
  11. * History:
  12. * 8/05/2000: JStall: Created
  13. *
  14. * Copyright (C) 2000 by Microsoft Corporation. All rights reserved.
  15. *
  16. \***************************************************************************/
  17. #if !defined(MSG__MsgClass_inl__INCLUDED)
  18. #define MSG__MsgClass_inl__INCLUDED
  19. #pragma once
  20. /***************************************************************************\
  21. *****************************************************************************
  22. *
  23. * class MsgClass
  24. *
  25. *****************************************************************************
  26. \***************************************************************************/
  27. //------------------------------------------------------------------------------
  28. inline MsgClass *
  29. CastMsgClass(BaseObject * pbase)
  30. {
  31. if ((pbase != NULL) && (pbase->GetHandleType() == htMsgClass)) {
  32. return (MsgClass *) pbase;
  33. }
  34. return NULL;
  35. }
  36. //------------------------------------------------------------------------------
  37. inline const MsgClass *
  38. CastMsgClass(const BaseObject * pbase)
  39. {
  40. if ((pbase != NULL) && (pbase->GetHandleType() == htMsgClass)) {
  41. return (const MsgClass *) pbase;
  42. }
  43. return NULL;
  44. }
  45. //------------------------------------------------------------------------------
  46. inline MsgClass *
  47. ValidateMsgClass(HCLASS hgad)
  48. {
  49. return CastMsgClass(BaseObject::ValidateHandle(hgad));
  50. }
  51. //------------------------------------------------------------------------------
  52. inline
  53. MsgClass::MsgClass()
  54. {
  55. }
  56. //------------------------------------------------------------------------------
  57. inline HCLASS
  58. MsgClass::GetHandle() const
  59. {
  60. return (HCLASS) BaseObject::GetHandle();
  61. }
  62. //------------------------------------------------------------------------------
  63. inline ATOM
  64. MsgClass::GetName() const
  65. {
  66. return m_atomName;
  67. }
  68. //------------------------------------------------------------------------------
  69. inline const MsgTable *
  70. MsgClass::GetMsgTable() const
  71. {
  72. return m_pmt;
  73. }
  74. //------------------------------------------------------------------------------
  75. inline const MsgClass *
  76. MsgClass::GetSuper() const
  77. {
  78. return m_pmcSuper;
  79. }
  80. //------------------------------------------------------------------------------
  81. inline BOOL
  82. MsgClass::IsGutsRegistered() const
  83. {
  84. return m_pmt != NULL;
  85. }
  86. //------------------------------------------------------------------------------
  87. inline BOOL
  88. MsgClass::IsInternal() const
  89. {
  90. return m_fInternal;
  91. }
  92. //------------------------------------------------------------------------------
  93. inline void
  94. MsgClass::MarkInternal()
  95. {
  96. m_fInternal = TRUE;
  97. }
  98. #endif // MSG__MsgClass_inl__INCLUDED