MyGUI 3.5.3
MyGUI_DataManager.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_DATA_MANAGER_H_
8#define MYGUI_DATA_MANAGER_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Singleton.h"
12#include "MyGUI_IDataStream.h"
13#include "MyGUI_Types.h"
14
15namespace MyGUI
16{
17
18 class DataStreamHolder;
19
20 class MYGUI_EXPORT DataManager
21 {
22 MYGUI_SINGLETON_DECLARATION(DataManager);
23
24 public:
25 DataManager();
26 virtual ~DataManager() = default;
27
31 virtual IDataStream* getData(const std::string& _name) const = 0;
32
36 [[nodiscard]] DataStreamHolder getDataHolder(const std::string& _name) const;
37
41 virtual void freeData(IDataStream* _data) = 0;
42
46 virtual bool isDataExist(const std::string& _name) const = 0;
47
52 virtual VectorString getDataListNames(const std::string& _pattern) const
53 {
54 return {};
55 }
56
63 virtual std::string getDataPath(const std::string& _name) const
64 {
65 return {};
66 }
67 };
68
69} // namespace MyGUI
70
71#endif // MYGUI_DATA_MANAGER_H_
#define MYGUI_EXPORT
#define MYGUI_SINGLETON_DECLARATION(ClassName)
std::vector< std::string > VectorString
Definition MyGUI_Types.h:40