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.

149 lines
2.9 KiB

  1. /*****************************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1987-1999 **/
  4. /*****************************************************************************/
  5. /*****************************************************************************
  6. File : control.hxx
  7. Title : compiler controller object
  8. History :
  9. 05-Aug-1991 VibhasC Created
  10. *****************************************************************************/
  11. #ifndef __CONTROL_HXX__
  12. #define __CONTROL_HXX__
  13. #include "listhndl.hxx"
  14. #include "idict.hxx"
  15. #include "nodeskl.hxx"
  16. #define IDL_PASS (1)
  17. #define ACF_PASS (2)
  18. #define SEMANTIC_PASS (3)
  19. #define ILXLAT_PASS (4)
  20. #define CODEGEN_PASS (5)
  21. #define NDR64_ILXLAT_PASS (6)
  22. #define NDR64_CODEGEN_PASS (7)
  23. /***
  24. *** The pass 1 controller.
  25. ***/
  26. typedef class _pass1
  27. {
  28. private:
  29. public:
  30. STATUS_T Go();
  31. _pass1();
  32. ~_pass1() { };
  33. } PASS_1;
  34. /***
  35. *** The pass 2 controller.
  36. ***/
  37. typedef class _pass2
  38. {
  39. private:
  40. node_file * pFileNode;
  41. MEMLIST AcfIncludeList;
  42. public:
  43. STATUS_T Go();
  44. _pass2();
  45. ~_pass2() { };
  46. void InsertAcfIncludeFile( node_file *pFile )
  47. {
  48. AcfIncludeList.AddLastMember( pFile );
  49. }
  50. node_file * GetFileNode()
  51. {
  52. return pFileNode;
  53. }
  54. } PASS_2;
  55. /***
  56. *** The pass 3 controller.
  57. ***/
  58. typedef class _pass3
  59. {
  60. public:
  61. STATUS_T Go();
  62. _pass3();
  63. ~_pass3() { };
  64. } PASS_3;
  65. /***
  66. *** The pass 4 controller.
  67. ***/
  68. typedef class _pass4
  69. {
  70. public:
  71. STATUS_T Go();
  72. _pass4() { };
  73. ~_pass4() { };
  74. } PASS_4;
  75. /***
  76. *** The compiler controller class
  77. ***/
  78. typedef class ccontrol
  79. {
  80. private:
  81. short PassNumber;
  82. class _cmd_arg * pCommandProcessor;
  83. class _nfa_info * pImportController;
  84. PASS_1 * pPass1Controller;
  85. PASS_2 * pPass2Controller;
  86. PASS_3 * pPass3Controller;
  87. PASS_4 * pPass4Controller;
  88. short ErrorCount;
  89. public:
  90. ccontrol( class _cmd_arg* pCommand );
  91. ~ccontrol();
  92. class _cmd_arg * GetCommandProcessor()
  93. {
  94. return pCommandProcessor;
  95. }
  96. class _cmd_arg * SetCommandProcessor( class _cmd_arg *p )
  97. {
  98. return pCommandProcessor = p;
  99. }
  100. class _nfa_info * GetImportController()
  101. {
  102. return pImportController;
  103. }
  104. class _nfa_info * SetImportController( class _nfa_info *p )
  105. {
  106. return pImportController = p;
  107. }
  108. STATUS_T Go();
  109. void IncrementErrorCount()
  110. {
  111. ErrorCount++;
  112. }
  113. short GetErrorCount()
  114. {
  115. return ErrorCount;
  116. }
  117. void SetPassNumber( short PN )
  118. {
  119. PassNumber = PN;
  120. }
  121. short GetPassNumber()
  122. {
  123. return PassNumber;
  124. }
  125. } CCONTROL;
  126. #endif // __CONTROL_HXX__