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.

120 lines
2.9 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1989-1999 Microsoft Corporation
  3. Module Name:
  4. ilxlat.hxx
  5. Abstract:
  6. The definitions for ilxlat module.
  7. Notes:
  8. History:
  9. VibhasC Aug-13-1993 Created.
  10. ----------------------------------------------------------------------------*/
  11. #ifndef __ILXLAT_HXX__
  12. #define __ILXLAT_HXX__
  13. #include "fldattr.hxx"
  14. #include "walkctxt.hxx"
  15. #include "optprop.hxx"
  16. class node_skl;
  17. class XLAT_CTXT;
  18. enum _IL_ANCESTOR_FLAGS
  19. {
  20. IL_IN_MULTIDIM_CONF = 0x00000001, // parent is multidimension conf arr
  21. IL_IN_MULTIDIM_VAR = 0x00000002, // parent is multidimension var arr
  22. IL_IN_LIBRARY = 0x00000004, // node is contained within a type library
  23. IL_CS_STAG = 0x00000008, // under a [cs_stag] param
  24. IL_CS_DRTAG = 0x00000010, // under a [cs_drtag] param
  25. IL_CS_RTAG = 0x00000020, // under a [cs_rtag] param
  26. IL_CS_HAS_TAG_RTN = 0x00000040, // proc has a tag routine
  27. };
  28. typedef unsigned long IL_ANCESTOR_FLAGS;
  29. class XLAT_CTXT: public WALK_CTXT, public XLAT_SIZE_INFO
  30. {
  31. private:
  32. unsigned long ILAncestorBits;
  33. void InitializeMustAlign( node_skl * pPar );
  34. public:
  35. // use this constructor to manufacture a context node without a parent context
  36. XLAT_CTXT( node_skl * pPar = NULL):
  37. WALK_CTXT( pPar )
  38. {
  39. ILAncestorBits = 0;
  40. InitializeMustAlign( pPar );
  41. }
  42. // use this constructor to build information from a parent context
  43. XLAT_CTXT( node_skl * pPar, XLAT_CTXT * pCtxt) :
  44. WALK_CTXT( pPar, pCtxt ),
  45. XLAT_SIZE_INFO( pCtxt )
  46. {
  47. InitializeMustAlign( pPar );
  48. ILAncestorBits = pCtxt->ILAncestorBits;
  49. }
  50. // use this to make one with info from a parent context
  51. // that also corresponds to this node
  52. XLAT_CTXT( XLAT_CTXT * pCtxt) :
  53. WALK_CTXT( pCtxt ),
  54. XLAT_SIZE_INFO( pCtxt )
  55. {
  56. ILAncestorBits = pCtxt->ILAncestorBits;
  57. }
  58. ~XLAT_CTXT();
  59. // ancestor bit manipulation
  60. IL_ANCESTOR_FLAGS& GetAncestorBits()
  61. {
  62. return ILAncestorBits;
  63. }
  64. IL_ANCESTOR_FLAGS& SetAncestorBits( IL_ANCESTOR_FLAGS f )
  65. {
  66. ILAncestorBits |= f;
  67. return ILAncestorBits;
  68. }
  69. IL_ANCESTOR_FLAGS& ClearAncestorBits( IL_ANCESTOR_FLAGS f )
  70. {
  71. ILAncestorBits &= ~f;
  72. return ILAncestorBits;
  73. }
  74. BOOL AnyAncestorBits( IL_ANCESTOR_FLAGS f )
  75. {
  76. return (ILAncestorBits & f);
  77. }
  78. BOOL AllAncestorBits( IL_ANCESTOR_FLAGS f )
  79. {
  80. return ((ILAncestorBits & f) == f);
  81. }
  82. };
  83. #endif // __ILXLAT_HXX__