diff --git a/src/DataTree.hh b/src/DataTree.hh index fffb57fcc587edf0a8744e7fd266066573716d55..cea53af2f373b2c3f86b71dcffa4903215b3c9e1 100644 --- a/src/DataTree.hh +++ b/src/DataTree.hh @@ -123,6 +123,11 @@ public: virtual ~DataTree(); + DataTree(const DataTree &) = delete; + DataTree(DataTree &&) = delete; + DataTree & operator=(const DataTree &) = delete; + DataTree & operator=(DataTree &&) = delete; + //! Some predefined constants expr_t Zero, One, Two, MinusOne, NaN, Infinity, MinusInfinity, Pi; diff --git a/src/ExprNode.hh b/src/ExprNode.hh index 207bb1a9471015e50d0a389f822e5e24fb4bb053..ce91ad12da70dff88e0f29edd3c5d01538d05557 100644 --- a/src/ExprNode.hh +++ b/src/ExprNode.hh @@ -210,6 +210,11 @@ class ExprNode virtual ~ExprNode(); + ExprNode(const ExprNode &) = delete; + ExprNode(ExprNode &&) = delete; + ExprNode & operator=(const ExprNode &) = delete; + ExprNode & operator=(ExprNode &&) = delete; + //! Initializes data member non_null_derivatives virtual void prepareForDerivation() = 0; diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index 985c3e8d17b038aee767d8b2bada4dc2f7e2ffaf..597f41e40579bba4c7a08ed3cb6e0f0eea572940 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -60,6 +60,11 @@ class DynareFlex : public DynareFlexLexer public: DynareFlex(istream *in = nullptr, ostream *out = nullptr); + DynareFlex(const DynareFlex &) = delete; + DynareFlex(DynareFlex &&) = delete; + DynareFlex & operator=(const DynareFlex &) = delete; + DynareFlex & operator=(DynareFlex &&) = delete; + //! The main lexing function Dynare::parser::token_type lex(Dynare::parser::semantic_type *yylval, Dynare::parser::location_type *yylloc, @@ -266,6 +271,11 @@ public: ParsingDriver(WarningConsolidation &warnings_arg, bool nostrict_arg) : warnings{warnings_arg}, nostrict{nostrict_arg} { }; + ParsingDriver(const ParsingDriver &) = delete; + ParsingDriver(ParsingDriver &&) = delete; + ParsingDriver & operator=(const ParsingDriver &) = delete; + ParsingDriver & operator=(ParsingDriver &&) = delete; + //! Starts parsing, and constructs the MOD file representation unique_ptr<ModFile> parse(istream &in, bool debug); diff --git a/src/Statement.hh b/src/Statement.hh index 543baa8fc34ce582b0609989a270994fc2c62620..a410c7d8e7873131d138392d207767ea2609c195 100644 --- a/src/Statement.hh +++ b/src/Statement.hh @@ -132,8 +132,15 @@ public: class Statement { public: + Statement() = default; virtual ~Statement(); + + Statement(const Statement &) = delete; + Statement(Statement &&) = delete; + Statement & operator=(const Statement &) = delete; + Statement & operator=(Statement &&) = delete; + //! Do some internal check, and fill the ModFileStructure class /*! Don't forget to update ComputingTasks.hh, Shocks.hh and NumericalInitialization.hh if you modify the signature of this diff --git a/src/macro/MacroDriver.hh b/src/macro/MacroDriver.hh index 097fad31daeb888027b7a94254362aefbc0cb1b1..1d1e9d288c74d351e4610b328335ea0ffb0e3b49 100644 --- a/src/macro/MacroDriver.hh +++ b/src/macro/MacroDriver.hh @@ -175,6 +175,11 @@ private: public: MacroFlex(istream *in, ostream *out, bool no_line_macro_arg, vector<string> path_arg); + MacroFlex(const MacroFlex &) = delete; + MacroFlex(MacroFlex &&) = delete; + MacroFlex & operator=(const MacroFlex &) = delete; + MacroFlex & operator=(MacroFlex &&) = delete; + //! The main lexing function Macro::parser::token_type lex(Macro::parser::semantic_type *yylval, Macro::parser::location_type *yylloc, @@ -203,6 +208,12 @@ private: stack<tuple<vector<string>, shared_ptr<ArrayMV>, int>> comprehension_stack; public: + MacroDriver() = default; + MacroDriver(const MacroDriver &) = delete; + MacroDriver(MacroDriver &&) = delete; + MacroDriver & operator=(const MacroDriver &) = delete; + MacroDriver & operator=(MacroDriver &&) = delete; + //! Exception thrown when value of an unknown variable is requested class UnknownVariable {