Guest User

Untitled

a guest
Jan 24th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1.  
  2. #include <iostream>
  3.  
  4. #include <QString>
  5. #include <QVector>
  6.  
  7. #ifndef _DEBUG_
  8.  
  9. template <class T>
  10. class Profile {
  11.  
  12.     //! Identify this profile
  13.     QString mId;
  14.  
  15.     // Store the type
  16.     QVector <T> mData;
  17.  
  18.     //! Just in case we're logging things really fast, we want to have a delta
  19.     //  time to make sure we don't have data points "lining up"
  20.     float mDelta;
  21.  
  22.     public:
  23.  
  24.         // Setup a profile object
  25.         explicit Profile (const QString &id) : mId (id) {
  26.  
  27.             mData.clear();
  28.         }
  29.  
  30.         //! Pass a value to the profiler
  31.         Profile & operator << (T &value);
  32.         Profile & operator << (const T &value);
  33. };
  34.  
  35. class Profiler {
  36. };
  37.  
  38. #endif
  39.  
  40. int main (int argc, char *argv[]) {
  41.  
  42.     return 0;
  43. }
Add Comment
Please, Sign In to add comment