1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2013 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmVisualStudioSlnData_h
13 #define cmVisualStudioSlnData_h
15 #include "cmStandardIncludes.h"
17 class cmSlnProjectEntry
20 cmSlnProjectEntry() {}
21 cmSlnProjectEntry(const std::string& guid,
22 const std::string& name,
23 const std::string& relativePath)
24 : Guid(guid), Name(name), RelativePath(relativePath)
27 std::string GetGUID() const { return Guid; }
28 std::string GetName() const { return Name; }
29 std::string GetRelativePath() const { return RelativePath; }
32 std::string Guid, Name, RelativePath;
39 const cmSlnProjectEntry*
40 GetProjectByGUID(const std::string& projectGUID) const;
42 const cmSlnProjectEntry*
43 GetProjectByName(const std::string& projectName) const;
45 std::vector<cmSlnProjectEntry> GetProjects() const;
47 cmSlnProjectEntry* AddProject(const std::string& projectGUID,
48 const std::string& projectName,
49 const std::string& projectRelativePath);
52 typedef std::map<std::string, cmSlnProjectEntry> ProjectStorage;
53 ProjectStorage ProjectsByGUID;
54 typedef std::map<std::string, ProjectStorage::iterator> ProjectStringIndex;
55 ProjectStringIndex ProjectNameIndex;