3 #include "../FileModel/Design/FileArchive.h"
4 #include "../ProductModel/Design.h"
5 #include "../odbdesign_export.h"
6 #include "StringVector.h"
9 namespace Odb::Lib::App
17 std::shared_ptr<ProductModel::Design> GetDesign(
const std::string& designName);
18 std::shared_ptr<FileModel::Design::FileArchive> GetFileArchive(
const std::string& designName);
20 std::vector<std::string> getLoadedDesignNames(
const std::string& filter =
"")
const;
21 std::vector<std::string> getLoadedFileArchiveNames(
const std::string& filter =
"")
const;
22 std::vector<std::string> getUnloadedDesignNames(
const std::string& filter =
"")
const;
24 int loadAllFileArchives(
bool stopOnError);
25 int loadAllDesigns(
bool stopOnError);
26 int loadFileArchives(
const Utils::StringVector& names);
27 int loadDesigns(
const Utils::StringVector& names);
29 void setDirectory(
const std::string& directory);
30 const std::string& getDirectory()
const;
37 std::string m_directory;
39 FileModel::Design::FileArchive::StringMap m_fileArchivesByName;
40 ProductModel::Design::StringMap m_designsByName;
42 std::shared_ptr<ProductModel::Design> LoadDesign(
const std::string& designName);
43 std::shared_ptr<FileModel::Design::FileArchive> LoadFileArchive(
const std::string& designName);
45 constexpr
inline static const char* DESIGN_EXTENSIONS[] = {
"zip",
"tgz",
"tar.gz",
"tar",
"gzip" ,
"gz" };