@@ -46,6 +46,7 @@ class Stream : public std::enable_shared_from_this<Stream> {
4646 Transport::Method transport_method_ = Transport::Method::Undefined;
4747 bool metadata_export_ = false ;
4848 sg4::MutexPtr mutex_ = sg4::Mutex::create();
49+ sg4::ConditionVariablePtr engine_created_ = sg4::ConditionVariable::create();
4950 Mode access_mode_;
5051
5152 std::unordered_map<std::string, std::shared_ptr<Variable>> variables_;
@@ -59,7 +60,7 @@ class Stream : public std::enable_shared_from_this<Stream> {
5960 }
6061 [[nodiscard]] const char * mode_to_str (Mode mode) const
6162 {
62- return (mode == Mode::Publish) ? " Mode::Publish" : " Mode::Suscribe " ;
63+ return (mode == Mode::Publish) ? " Mode::Publish" : " Mode::Subscribe " ;
6364 }
6465 void close () { engine_ = nullptr ; }
6566 // / \endcond
@@ -115,7 +116,7 @@ class Stream : public std::enable_shared_from_this<Stream> {
115116 // / @param name name of the Engine created when opening the Stream.
116117 // / @param mode either Stream::Mode::Publish or Stream::Mode::Subscribe.
117118 // / @return A shared pointer on the corresponding Engine.
118- std::shared_ptr<Engine> open (const std::string& name, Mode mode);
119+ [[nodiscard]] std::shared_ptr<Engine> open (const std::string& name, Mode mode);
119120
120121 // / @brief Helper function to obtain the number of actors connected to Stream in Mode::Publish.
121122 // / @return The number of publishers for that Stream.
@@ -130,7 +131,7 @@ class Stream : public std::enable_shared_from_this<Stream> {
130131 // / @param name The name of the new Variable.
131132 // / @param element_size The size of the elements in the Variable.
132133 // / @return A shared pointer on the newly created Variable.
133- std::shared_ptr<Variable> define_variable (const std::string& name, size_t element_size);
134+ [[nodiscard]] std::shared_ptr<Variable> define_variable (const std::string& name, size_t element_size);
134135
135136 // / @brief Define a Variable for this Stream.
136137 // / @param name The name of the new variable.
@@ -139,18 +140,18 @@ class Stream : public std::enable_shared_from_this<Stream> {
139140 // / @param count A vector that specifies how many elements the calling Actor owns in each dimension.
140141 // / @param element_size The size of the elements in the Variable.
141142 // / @return A shared pointer on the newly created Variable
142- std::shared_ptr<Variable> define_variable (const std::string& name, const std::vector<size_t >& shape,
143- const std::vector< size_t >& start, const std::vector<size_t >& count ,
144- size_t element_size);
143+ [[nodiscard]] std::shared_ptr<Variable> define_variable (const std::string& name, const std::vector<size_t >& shape,
144+ const std::vector<size_t >& start ,
145+ const std::vector< size_t >& count, size_t element_size);
145146
146147 // / @brief Retrieve the list of Variables defined on this stream
147148 // / @return the list of Variable names
148- std::vector<std::string> get_all_variables () const ;
149+ [[nodiscard]] std::vector<std::string> get_all_variables () const ;
149150
150151 // / @brief Retrieve a Variable information by name.
151152 // / @param name The name of desired Variable.
152153 // / @return Either a shared pointer on the Variable object if known, nullptr otherwise.
153- std::shared_ptr<Variable> inquire_variable (const std::string& name) const ;
154+ [[nodiscard]] std::shared_ptr<Variable> inquire_variable (const std::string& name) const ;
154155
155156 // / @brief Remove a Variable of the list of variables known by the Stream.
156157 // / @param name The name of the variable to remove.
0 commit comments