top | up | prev | next

Solution Class

Definition at line 54 of Solution.hpp

Constructors

Solution(const Solution&) delete
Solution(const std::u32string& name_, const std::string& filePath_)

Member Functions

Project* ActiveProject() const
const std::u32string& ActiveProjectName() const
void AddDeclaration(SolutionDeclaration* declaration)
void AddDependencies()
void AddProject(std::unique_ptr<Project>&& project)
const boost::filesystem::path& BasePath() const
std::vector<Project*> CreateBuildOrder()
const std::string& FilePath() const
bool HasProject(const std::u32string& projectName) const
const std::u32string& Name() const
const std::vector<std::string>& ProjectFilePaths() const
const std::vector<std::unique_ptr<Project>>& Projects() const
const std::vector<std::string>& RelativeProjectFilePaths() const
void RemoveProject(Project* project)
void ResolveDeclarations()
void Save()
void SetActiveProject(Project* activeProject_)
void SortByProjectName()
Solution& operator=(const Solution&) delete

Member Variables

Project* activeProject
std::u32string activeProjectName
std::vector<std::unique_ptr<ProjectDependencyDeclaration>> additionalDependencyDeclarations
boost::filesystem::path basePath
std::vector<std::unique_ptr<SolutionDeclaration>> declarations
std::unordered_map<std::u32string, ProjectDependencyDeclaration*> dependencyMap
std::string filePath
std::u32string name
std::vector<std::string> projectFilePaths
std::vector<std::unique_ptr<Project>> projects
std::vector<std::string> relativeProjectFilePaths

Constructor Details

Solution Constructor

sngcm::ast::Solution::Solution(const Solution &) delete

Definition at line 58 of Solution.hpp


Solution Constructor

sngcm::ast::Solution::Solution(const std::u32string& name_, const std::string& filePath_)

Definition at line 50 of Solution.cpp :
 50 : name(name_)filePath(filePath_)basePath(filePath)activeProject(nullptr)
 51 {
 52     basePath.remove_filename();
 53 }


Declaration at line 57 of Solution.hpp


Member Function Details

ActiveProject Member Function

Project * sngcm::ast::Solution::ActiveProject() const

Definition at line 72 of Solution.hpp :
72 { return activeProject; }


ActiveProjectName Member Function

const std::u32string& sngcm::ast::Solution::ActiveProjectName() const

Definition at line 66 of Solution.hpp :
66 { return activeProjectName; }


AddDeclaration Member Function

void sngcm::ast::Solution::AddDeclaration(SolutionDeclaration * declaration)

Definition at line 55 of Solution.cpp :
 56 {
 57     declarations.push_back(std::unique_ptr<SolutionDeclaration>(declaration));
 58 }


Declaration at line 70 of Solution.hpp


AddDependencies Member Function

void sngcm::ast::Solution::AddDependencies()

Definition at line 202 of Solution.cpp
Declaration at line 89 of Solution.hpp

Calls: sngcm::ast::ProjectDependencyDeclaration::AddDependency , sngcm::ast::ProjectDependencyDeclaration::DependsOnProjects , sngcm::ast::Solution::Name

Called by: sngcm::ast::Solution::CreateBuildOrder


AddProject Member Function

void sngcm::ast::Solution::AddProject(std::unique_ptr<Project >&& project)

Definition at line 151 of Solution.cpp :
152 {
153     projects.push_back(std::move(project));
154 }


Declaration at line 67 of Solution.hpp


BasePath Member Function

const boost::filesystem::path& sngcm::ast::Solution::BasePath() const

Definition at line 63 of Solution.hpp :
63 { return basePath; }


CreateBuildOrder Member Function

std::vector<Project *> sngcm::ast::Solution::CreateBuildOrder()

Definition at line 236 of Solution.cpp
Declaration at line 69 of Solution.hpp

Calls: sngcm::ast::Solution::AddDependencies , sngcm::ast::Solution::FilePath , sngcm::ast::Solution::Name


FilePath Member Function

const std::string& sngcm::ast::Solution::FilePath() const

Definition at line 61 of Solution.hpp :
61 { return filePath; }

Called by: sngcm::ast::Solution::CreateBuildOrder , sngcm::ast::Solution::Save


HasProject Member Function

bool sngcm::ast::Solution::HasProject(const std::u32string& projectName) const

Definition at line 156 of Solution.cpp :
157 {
158     for (const auto& project : projects)
159     {
160         if (project->Name() == projectName)
161         {
162             return true;
163         }
164     }
165     return false;
166 }


Declaration at line 68 of Solution.hpp

Calls: sngcm::ast::Solution::Name


Name Member Function

const std::u32string& sngcm::ast::Solution::Name() const

Definition at line 60 of Solution.hpp :
60 { return name; }

Called by: sngcm::ast::Solution::AddDependencies , sngcm::ast::Solution::CreateBuildOrder , sngcm::ast::Solution::HasProject


ProjectFilePaths Member Function

const std::vector<std::string>& sngcm::ast::Solution::ProjectFilePaths() const

Definition at line 64 of Solution.hpp :
64 { return projectFilePaths; }


Projects Member Function

const std::vector<std::unique_ptr<Project >>& sngcm::ast::Solution::Projects() const

Definition at line 62 of Solution.hpp :
62 { return projects; }


RelativeProjectFilePaths Member Function

const std::vector<std::string>& sngcm::ast::Solution::RelativeProjectFilePaths() const

Definition at line 65 of Solution.hpp :
65 { return relativeProjectFilePaths; }


RemoveProject Member Function

void sngcm::ast::Solution::RemoveProject(Project * project)

Definition at line 135 of Solution.cpp
Declaration at line 76 of Solution.hpp


ResolveDeclarations Member Function

void sngcm::ast::Solution::ResolveDeclarations()

Definition at line 60 of Solution.cpp
Declaration at line 71 of Solution.hpp

Calls: sngcm::ast::ProjectDependencyDeclaration::ProjectName , sngcm::ast::SolutionActiveProjectDeclaration::ActiveProjectName , sngcm::ast::SolutionProjectDeclaration::FilePath


Save Member Function

void sngcm::ast::Solution::Save()

Definition at line 106 of Solution.cpp
Declaration at line 75 of Solution.hpp

Calls: sngcm::ast::Project::Name , sngcm::ast::Solution::FilePath , sngcm::ast::Solution::Save , soulng::util::CodeFormatter::WriteLine , soulng::util::Path::Combine , soulng::util::Path::GetDirectoryName , soulng::util::Path::GetFileName

Called by: sngcm::ast::Solution::Save


SetActiveProject Member Function

void sngcm::ast::Solution::SetActiveProject(Project * activeProject_)

Definition at line 73 of Solution.hpp :
73 { activeProject = activeProject_; }


SortByProjectName Member Function

void sngcm::ast::Solution::SortByProjectName()

Definition at line 101 of Solution.cpp :
102 {
103     std::sort(projects.begin()projects.end()ByProjectName());
104 }


Declaration at line 74 of Solution.hpp


operator= Member Function

Solution & sngcm::ast::Solution::operator=(const Solution &) delete

Definition at line 59 of Solution.hpp


top | up | prev | next