home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / bprof-1.1 / bprof-1 / bprof / sources.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-31  |  1.0 KB  |  47 lines

  1. /* -*- c++ -*-
  2.    Map source file and line number to counters */
  3.  
  4. #ifndef _BPROF_SOURCES_H
  5. #define _BPROF_SOURCES_H
  6.  
  7. #pragma interface
  8.  
  9. #include <std.h>
  10. #include <String.h>
  11.  
  12. class sourcefile {
  13.     String filename;
  14.     int numlines;        // Number of lines in file + 1
  15.     int* lines;            // Array of number of ticks
  16.     int dummy;
  17.     time_t _mtime;
  18. public:
  19.     sourcefile(String, int);
  20.     ~sourcefile(void);
  21.     int& operator[](unsigned int);
  22.     void paste(const char* = ".bprof");
  23.     time_t mtime(void) const;
  24.  
  25.     // Make sure no default assignment/copy constructor exists
  26.     sourcefile& operator=(const sourcefile &) { abort(); } // Not possible
  27.     sourcefile(const sourcefile &) { abort(); } // Not possible
  28. };
  29.  
  30. typedef sourcefile* sfpnt;
  31.  
  32. class dirset {
  33.     struct dirlink {        // Linked list of dirs
  34.     dev_t dev;
  35.     ino_t ino;
  36.     dirlink* next;
  37.     };
  38.     dirlink* first;
  39. public:
  40.     dirset(void);
  41.     ~dirset(void);
  42.     void operator+=(const char *); // Add a directory
  43.     int contains(const char *);       // Look if a directory is in there
  44. };
  45.  
  46. #endif // _BPROF_SOURCES_H
  47.