gns3-wol-emulator/source/gns3/GnsProject.hpp

46 lines
893 B
C++

#pragma once
#include <memory>
#include <string>
#include <vector>
#include "GnsNode.hpp"
namespace gns {
class GnsServer;
/**
* Represent a GNS3 project.
*/
class GnsProject : public std::enable_shared_from_this<GnsProject> {
public:
GnsProject(const std::shared_ptr<const GnsServer>& server, const std::string& uuid);
/**
* Get the base prefix for an API request
* @return the base prefix for an API request
*/
[[nodiscard]] std::string getApiBase() const;
/**
* Get the uuid of the project
* @return the uuid of the project
*/
[[nodiscard]] std::string getUuid() const;
/**
* Get all the nodes of the project
* @return all the nodes of the project
*/
[[nodiscard]] std::vector<std::shared_ptr<GnsNode>> getNodes() const;
private:
std::shared_ptr<const GnsServer> server;
std::string uuid;
};
}