2012-11-22 12:30:02 +00:00
|
|
|
#ifndef CSM_DOC_DOCUMENTMGR_H
|
|
|
|
#define CSM_DOC_DOCUMENTMGR_H
|
2012-11-21 16:31:18 +00:00
|
|
|
|
|
|
|
#include <vector>
|
2012-11-23 13:05:49 +00:00
|
|
|
#include <string>
|
2012-11-21 16:31:18 +00:00
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
|
|
|
|
|
|
|
class DocumentManager
|
|
|
|
{
|
|
|
|
std::vector<Document *> mDocuments;
|
|
|
|
|
|
|
|
DocumentManager (const DocumentManager&);
|
|
|
|
DocumentManager& operator= (const DocumentManager&);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
DocumentManager();
|
|
|
|
|
|
|
|
~DocumentManager();
|
|
|
|
|
2012-11-23 13:05:49 +00:00
|
|
|
Document *addDocument (const std::string& name);
|
2012-11-21 16:31:18 +00:00
|
|
|
///< The ownership of the returned document is not transferred to the caller.
|
|
|
|
|
|
|
|
bool removeDocument (Document *document);
|
|
|
|
///< \return last document removed?
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|