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.

71 lines
1.2 KiB

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #ifndef __LINENUM_HXX__
  3. #define __LINENUM_HXX__
  4. #include "midlnode.hxx"
  5. #include "errors.hxx"
  6. extern short FileIndex; // index of current input file (0 if none)
  7. extern short AddFileToDB( char * pFile );
  8. extern char * FetchFileFromDB( short Index );
  9. /***
  10. *** tracked nodes - with stored file position info
  11. ***
  12. *** These nodes may be constructed
  13. ***/
  14. // nodes with file position information
  15. class tracked_node
  16. {
  17. private:
  18. short FIndex; // file name index
  19. short FLine; // line number
  20. void SetLine();
  21. public:
  22. // constructor for use by derived classes
  23. tracked_node()
  24. {
  25. if ( FIndex = FileIndex )
  26. {
  27. SetLine();
  28. }
  29. };
  30. // really lightweight constructor
  31. tracked_node( node_skl * )
  32. {
  33. }
  34. // clear constructor -- extra param just to force different
  35. tracked_node( void * )
  36. {
  37. Init();
  38. }
  39. void Init()
  40. {
  41. FIndex = 0;
  42. FLine = 0;
  43. };
  44. STATUS_T GetLineInfo( char * & pName,
  45. short & Line );
  46. BOOL HasTracking()
  47. {
  48. return (FIndex != 0 );
  49. }
  50. }; // end of class tracked_node
  51. #endif // __LINENUM_HXX__