solution_model.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2013 The ClanLib Team
4 **
5 ** This software is provided 'as-is', without any express or implied
6 ** warranty. In no event will the authors be held liable for any damages
7 ** arising from the use of this software.
8 **
9 ** Permission is granted to anyone to use this software for any purpose,
10 ** including commercial applications, and to alter it and redistribute it
11 ** freely, subject to the following restrictions:
12 **
13 ** 1. The origin of this software must not be misrepresented; you must not
14 ** claim that you wrote the original software. If you use this software
15 ** in a product, an acknowledgment in the product documentation would be
16 ** appreciated but is not required.
17 ** 2. Altered source versions must be plainly marked as such, and must not be
18 ** misrepresented as being the original software.
19 ** 3. This notice may not be removed or altered from any source distribution.
20 **
21 ** Note: Some of the libraries ClanLib may link to may have additional
22 ** requirements or restrictions.
23 **
24 ** File Author(s):
25 **
26 ** Magnus Norddahl
27 */
28 
29 
30 #pragma once
31 
32 #include "Solution/solution.h"
33 #include "Project/project.h"
34 #include "UserOptions/user_options.h"
35 
36 namespace clan
37 {
40 
42 {
43 public:
44  void create_solution(std::string folder, std::string name);
45  void open_solution(std::string filename);
46  void close_solution();
48  void add_file(ProjectItem *parent, std::string filename);
49  void add_folder(ProjectItem *parent, std::string filename);
50  void remove_item(ProjectItem *item);
51  void save_all();
52  bool is_open(ProjectItem *item);
53  void set_open(ProjectItem *item, bool open);
54  std::vector<std::string> get_files_with_extension(const std::string &extension);
55  std::vector<std::string> get_files_with_extension(ProjectItem *item, const std::string &extension);
56 
58  std::vector<ProjectPtr> projects;
60 
62 };
63 
64 }
65 
std::vector< std::string > get_files_with_extension(const std::string &extension)
void add_file(ProjectItem *parent, std::string filename)
Definition: project_item.h:39
ProjectPtr get_project(ProjectReference reference)
void set_open(ProjectItem *item, bool open)
Signal_v0 sig_model_updated
Definition: solution_model.h:61
UserOptions user_options
Definition: solution_model.h:59
bool is_open(ProjectItem *item)
Definition: project_reference.h:37
Definition: solution.h:39
std::vector< ProjectPtr > projects
Definition: solution_model.h:58
Definition: solution_model.h:41
std::shared_ptr< Project > ProjectPtr
Definition: project.h:66
void create_solution(std::string folder, std::string name)
void remove_item(ProjectItem *item)
Solution solution
Definition: solution_model.h:57
Signal_v0.
Definition: signal_v0.h:107
Definition: user_options.h:40
void add_folder(ProjectItem *parent, std::string filename)
void open_solution(std::string filename)