use smart pointer to avoid memory issue
This commit is contained in:
parent
9c413c0edd
commit
a0060c8fa8
5 changed files with 21 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "GnsProject.hpp"
|
||||
|
@ -27,13 +28,13 @@ public:
|
|||
* Get all the projects in the server
|
||||
* @return all the projects in the server
|
||||
*/
|
||||
[[nodiscard]] std::vector<GnsProject> getProjects() const;
|
||||
[[nodiscard]] std::vector<std::shared_ptr<GnsProject>> getProjects() const;
|
||||
|
||||
/**
|
||||
* Get all the nodes in the server
|
||||
* @return all the nodes in the server
|
||||
*/
|
||||
[[nodiscard]] std::vector<GnsNode> getNodes() const;
|
||||
[[nodiscard]] std::vector<std::shared_ptr<GnsNode>> getNodes() const;
|
||||
|
||||
private:
|
||||
std::string host;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue