VPTissue Reference Manual
CliWorkspaceManager.h
Go to the documentation of this file.
1 #ifndef CLI_WORKSPACE_MANAGER_H_
2 #define CLI_WORKSPACE_MANAGER_H_
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "../workspace/CliWorkspace.h"
23 
24 #include <memory>
25 #include <string>
26 
27 namespace SimPT_Shell {
28 
29 using namespace SimShell;
30 using namespace SimPT_Shell;
31 using namespace SimPT_Shell::Ws;
32 
37 {
38 public:
46  static SimShell::Ws::IProject::FileIterator OpenLeaf(
47  std::shared_ptr<SimShell::Ws::IProject> project, const std::string& input_file,
48  bool create_if_not_exists, std::shared_ptr<SimShell::Ws::IFile> ref_input_file);
49 
59  static SimShell::Ws::IProject::FileIterator OpenLeaf(
60  std::shared_ptr<SimShell::Ws::IProject> project, const std::string& file_name,
61  bool create_if_not_exist = true,
62  const std::string& ref_ws_path = "", const std::string& ref_project = "",
63  const std::string& ref_file_name = "");
64 
71  static SimShell::Ws::IWorkspace::ProjectIterator OpenProject(
72  std::shared_ptr<CliWorkspace> workspace, const std::string& project,
73  bool create_if_not_exist = true);
74 
81  static std::shared_ptr<CliWorkspace> OpenWorkspace(
82  const std::string& base_path, const std::string& workspace,
83  bool create_if_not_exist = true);
84 
85 private:
92  static SimShell::Ws::IProject::FileIterator
93  CreateLeaf(const std::shared_ptr<SimShell::Ws::IProject>& project,
94  const std::string& from_path, const std::string& to);
95 
101  static SimShell::Ws::IWorkspace::ProjectIterator
102  CreateProject(const std::shared_ptr<SimShell::Ws::IWorkspace>& workspace, const std::string& project);
103 
109  static std::shared_ptr<Ws::CliWorkspace>
110  CreateWorkspace(const std::string& base_path, const std::string& workspace);
111 };
112 
113 } // namespace
114 
115 #endif // end-of-include-guard
Workspace manager for cli applications.
Namespace for SimPT shell package.
Definition: Client.cpp:50
Namespace for generic graphical shell for simulators.
Definition: SimSession.h:32
Namespace for SimPT specific workspace classes.
Definition: Client.cpp:50