#ifndef SQLDOCUMENTREGISTRY_H #define SQLDOCUMENTREGISTRY_H #include #include #include class SqlDocument; /** Keeps track of all SQL documents that are still in use, without * extending their lifetime. A document lives as long as at least one * query tool holds a shared pointer to it. */ class SqlDocumentRegistry { public: void add(const std::shared_ptr &document); /// All documents that are still alive. QList> documents() const; /// All documents that are alive and have unsaved changes. QList> modifiedDocuments() const; private: std::vector> m_documents; }; #endif // SQLDOCUMENTREGISTRY_H