Commit 6d26dc23 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Remove implicitly-defined copy/move constructors/assignments in several classes

parent 7bb53824
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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
......
......@@ -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
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment