File indexing completed on 2024-05-05 05:44:19

0001 /*
0002     This file is part of KCachegrind.
0003 
0004     SPDX-FileCopyrightText: 2003 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
0005 
0006     SPDX-License-Identifier: GPL-2.0-only
0007 */
0008 
0009 /*
0010  * DumpManager
0011  *
0012  * DumpManager is a Singleton.
0013  * - Has List of current loaded dumps / loadable dumps
0014  * - Does "communication" with current running profiles
0015  *   for dump selection dockable
0016  */
0017 
0018 #ifndef DUMPMANAGER_H
0019 #define DUMPMANAGER_H
0020 
0021 #include <qstring.h>
0022 #include <qlist.h>
0023 
0024 class Dump;
0025 class TraceData;
0026 
0027 typedef QList<Dump*> DumpList;
0028 
0029 
0030 /**
0031  * A loadable profile Dump
0032  */
0033 class Dump
0034 {
0035 public:
0036   Dump(QString);
0037 
0038   QString filename() const { return _filename; }
0039 
0040 private:
0041   QString _filename;
0042 };
0043 
0044 
0045 /*
0046  * TODO:
0047  * - Everything
0048  *
0049  */
0050 
0051 class DumpManager
0052 {
0053 public:
0054   DumpManager();
0055 
0056   DumpManager* self();
0057 
0058   DumpList loadableDumps();
0059   TraceData* load(Dump*);
0060 
0061 private:
0062   static DumpManager* _self;
0063 };
0064 
0065 #endif