use smart pointer when creating an object with an instance of the creator
This commit is contained in:
parent
a0060c8fa8
commit
f1ee437f04
6 changed files with 12 additions and 10 deletions
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "GnsPort.hpp"
|
||||
|
||||
#include <string>
|
||||
|
@ -18,7 +20,7 @@ class GnsProject;
|
|||
*/
|
||||
class GnsNode {
|
||||
public:
|
||||
GnsNode(const GnsProject* project, const std::string& uuid, const std::vector<GnsPort>& ports);
|
||||
GnsNode(const std::shared_ptr<const GnsProject>& project, const std::string& uuid, const std::vector<GnsPort>& ports);
|
||||
|
||||
/**
|
||||
* Get the base URL for the node API
|
||||
|
@ -44,7 +46,7 @@ public:
|
|||
void start() const;
|
||||
|
||||
private:
|
||||
const GnsProject* project;
|
||||
std::shared_ptr<const GnsProject> project;
|
||||
std::string uuid;
|
||||
std::vector<GnsPort> ports;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue