From 025bb6738d47ccbd9093b90bc22b9710c41227c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cl=C3=A9ment=20DAVID?= Date: Wed, 6 Nov 2019 11:39:34 +0100 Subject: [PATCH] fix missing-override warnings on Scilab types Change-Id: I94bd9ad3a002247cfd140d259a1b0572c3a2c4c1 --- scilab/modules/ast/includes/exps/memfillexp.hxx | 4 +- scilab/modules/ast/includes/types/arrayof.hxx | 40 ++++++------- scilab/modules/ast/includes/types/bool.hxx | 34 +++++------ scilab/modules/ast/includes/types/callable.hxx | 18 +++--- scilab/modules/ast/includes/types/cell.hxx | 50 ++++++++-------- scilab/modules/ast/includes/types/double.hxx | 54 +++++++++--------- scilab/modules/ast/includes/types/function.hxx | 26 ++++----- .../modules/ast/includes/types/graphichandle.hxx | 44 +++++++------- scilab/modules/ast/includes/types/implicitlist.hxx | 28 ++++----- scilab/modules/ast/includes/types/int.hxx | 50 ++++++++-------- scilab/modules/ast/includes/types/list.hxx | 38 ++++++------- scilab/modules/ast/includes/types/macro.hxx | 24 ++++---- scilab/modules/ast/includes/types/macrofile.hxx | 26 ++++----- scilab/modules/ast/includes/types/mlist.hxx | 12 ++-- scilab/modules/ast/includes/types/polynom.hxx | 54 +++++++++--------- scilab/modules/ast/includes/types/singlepoly.hxx | 38 ++++++------- scilab/modules/ast/includes/types/string.hxx | 42 +++++++------- scilab/modules/ast/includes/types/struct.hxx | 60 ++++++++++---------- scilab/modules/ast/includes/types/tlist.hxx | 22 +++---- scilab/modules/ast/includes/types/user.hxx | 32 +++++------ .../coverage/includes/CovHTMLCodePrinter.hxx | 8 +-- scilab/modules/external_objects/src/cpp/EOType.hxx | 16 +++--- scilab/modules/mpi/includes/sciMpiComm.hxx | 4 +- .../scicos/src/cpp/view_scilab/BaseAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/BlockAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/CprAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/DiagramAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/GraphicsAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/LinkAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/ModelAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/ParamsAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/ScsAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/StateAdapter.hxx | 4 +- .../scicos/src/cpp/view_scilab/TextAdapter.hxx | 4 +- 34 files changed, 384 insertions(+), 384 deletions(-) diff --git a/scilab/modules/ast/includes/exps/memfillexp.hxx b/scilab/modules/ast/includes/exps/memfillexp.hxx index ce51aed..fda0120 100644 --- a/scilab/modules/ast/includes/exps/memfillexp.hxx +++ b/scilab/modules/ast/includes/exps/memfillexp.hxx @@ -88,12 +88,12 @@ public: return exps_t(std::next(_exps.begin()), _exps.end()); } - inline bool isMemfillExp() const + inline bool isMemfillExp() const override { return true; } - virtual ExpType getType() const + virtual ExpType getType() const override { return MEMFILLEXP; } diff --git a/scilab/modules/ast/includes/types/arrayof.hxx b/scilab/modules/ast/includes/types/arrayof.hxx index 7ffe6b8..726880d 100644 --- a/scilab/modules/ast/includes/types/arrayof.hxx +++ b/scilab/modules/ast/includes/types/arrayof.hxx @@ -177,16 +177,16 @@ protected : virtual void deleteImg() = 0; public : - bool isArrayOf() + bool isArrayOf() override { return true; } - bool isTrue(); + bool isTrue() override; // The function is not write here because we needs to create a Bool which inherits from ArrayOf // so it will create a cyclic dependency... so the body of the function is in bool.hxx after the Bool definition. - virtual bool neg(InternalType *& out); + virtual bool neg(InternalType *& out) override; virtual bool isVector() //only one dim must be != 1 { @@ -209,7 +209,7 @@ public : return true; } - virtual bool isComplex() + virtual bool isComplex() override { return m_pImgData != NULL; } @@ -455,31 +455,31 @@ public : return getImg(getIndex(piIndexes)); } - virtual ArrayOf* insert(typed_list* _pArgs, InternalType* _pSource); + virtual ArrayOf* insert(typed_list* _pArgs, InternalType* _pSource) override; virtual ArrayOf* append(int _iRows, int _iCols, InternalType* _poSource); - virtual ArrayOf* resize(int* _piDims, int _iDims); + virtual ArrayOf* resize(int* _piDims, int _iDims) override; // return a GenericType because of [] wich is a types::Double (can't be a ArrayOf) - virtual GenericType* remove(typed_list* _pArgs); - virtual GenericType* extract(typed_list* _pArgs); - virtual GenericType* insertNew(typed_list* _pArgs); + virtual GenericType* remove(typed_list* _pArgs) override; + virtual GenericType* extract(typed_list* _pArgs) override; + virtual GenericType* insertNew(typed_list* _pArgs) override; virtual bool invoke(typed_list & in, optional_list & /*opt*/, int /*_iRetCount*/, typed_list & out, const ast::Exp & e) override; - virtual bool isInvokable() const; - virtual bool hasInvokeOption() const; - virtual int getInvokeNbIn(); - virtual int getInvokeNbOut(); + virtual bool isInvokable() const override; + virtual bool hasInvokeOption() const override; + virtual int getInvokeNbIn() override; + virtual int getInvokeNbOut() override; - virtual ArrayOf* reshape(int _iNewRows, int _iNewCols) + virtual ArrayOf* reshape(int _iNewRows, int _iNewCols) override { int piDims[2] = {_iNewRows, _iNewCols}; return reshape(piDims, 2); } - virtual ArrayOf* reshape(int* _piDims, int _iDims); + virtual ArrayOf* reshape(int* _piDims, int _iDims) override; - virtual ArrayOf* resize(int _iNewRows, int _iNewCols) + virtual ArrayOf* resize(int _iNewRows, int _iNewCols) override { int piDims[2] = {_iNewRows, _iNewCols}; return resize(piDims, 2); @@ -504,11 +504,11 @@ public : void getIndexes(int _iIndex, int* _piIndexes); - virtual bool getMemory(long long* _piSize, long long* _piSizePlusType); + virtual bool getMemory(long long* _piSize, long long* _piSizePlusType) override; void humanReadableByteCount(size_t n, char (&str)[9]); - ArrayOf* getColumnValues(int _iPos) + ArrayOf* getColumnValues(int _iPos) override { ArrayOf* pOut = NULL; if (_iPos < m_iCols) @@ -533,7 +533,7 @@ public : return pOut; } - virtual bool toString(std::wostringstream& ostr) + virtual bool toString(std::wostringstream& ostr) override { int* piDims = new int[m_iDims]; bool bFinish = parseSubMatrix(ostr, piDims, m_iDims, m_iDims - 1); @@ -598,7 +598,7 @@ public : virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) = 0; - virtual std::wstring toStringInLine() + virtual std::wstring toStringInLine() override { std::wostringstream ostr; ostr << L"["; diff --git a/scilab/modules/ast/includes/types/bool.hxx b/scilab/modules/ast/includes/types/bool.hxx index bf65f6a..387eb36 100644 --- a/scilab/modules/ast/includes/types/bool.hxx +++ b/scilab/modules/ast/includes/types/bool.hxx @@ -49,7 +49,7 @@ public: Bool(int _iRows, int _iCols, int **_piData); ~Bool(); - Bool* clone(); + Bool* clone() override; /*zero or one set filler*/ @@ -57,28 +57,28 @@ public: Bool* setTrue(); /*Config management*/ - void whoAmI(); + void whoAmI() override; - bool isBool() + bool isBool() override { return true; } - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"boolean"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"b"; } - virtual bool transpose(InternalType *& out); + virtual bool transpose(InternalType *& out) override; virtual bool isNativeType() override { @@ -92,26 +92,26 @@ public: } protected : - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabBool; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return isScalar() ? IdScalarBool : IdBool; } - virtual ast::Exp* getExp(const Location& loc); + virtual ast::Exp* getExp(const Location& loc) override; private : virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; - virtual int getNullValue(); - virtual Bool* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual int copyValue(int _iData); - virtual void deleteAll(); - virtual void deleteImg(); - virtual int* allocData(int _iSize); + virtual int getNullValue() override; + virtual Bool* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual int copyValue(int _iData) override; + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual int* allocData(int _iSize) override; }; } diff --git a/scilab/modules/ast/includes/types/callable.hxx b/scilab/modules/ast/includes/types/callable.hxx index 1a1e6e9..02c5189 100644 --- a/scilab/modules/ast/includes/types/callable.hxx +++ b/scilab/modules/ast/includes/types/callable.hxx @@ -46,7 +46,7 @@ public : } virtual ~Callable() {} - bool isCallable() + bool isCallable() override { return true; } @@ -55,22 +55,22 @@ public : virtual bool invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e) override; - virtual bool isInvokable() const + virtual bool isInvokable() const override { return true; } - virtual bool hasInvokeOption() const + virtual bool hasInvokeOption() const override { return true; } - virtual int getInvokeNbIn() + virtual int getInvokeNbIn() override { return getNbInputArgument(); } - virtual int getInvokeNbOut() + virtual int getInvokeNbOut() override { return getNbOutputArgument(); } @@ -93,15 +93,15 @@ public : } /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"callable"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const = 0; - virtual InternalType* clone(void) = 0; + virtual std::wstring getShortTypeStr() const override = 0; + virtual InternalType* clone(void) override = 0; - virtual bool isAssignable(void) + virtual bool isAssignable(void) override { return true; } diff --git a/scilab/modules/ast/includes/types/cell.hxx b/scilab/modules/ast/includes/types/cell.hxx index fb826b2..f7ecb1d 100644 --- a/scilab/modules/ast/includes/types/cell.hxx +++ b/scilab/modules/ast/includes/types/cell.hxx @@ -42,20 +42,20 @@ private : void createCell(int _iDims, const int* _piDims, InternalType** data); public : - void whoAmI(void) + void whoAmI(void) override { std::cout << "types::Cell"; }; - ScilabType getType(void) + ScilabType getType(void) override { return ScilabCell; } - ScilabId getId(void) + ScilabId getId(void) override { return IdCell; } - bool isCell() + bool isCell() override { return true; } @@ -66,60 +66,60 @@ public : ** Clone ** Create a new List and Copy all values. */ - Cell* clone(); + Cell* clone() override; - Cell* set(int _iRows, int _iCols, InternalType* _pIT); + Cell* set(int _iRows, int _iCols, InternalType* _pIT) override; Cell* set(int _iRows, int _iCols, const InternalType* _pIT); - Cell* set(int _iIndex, InternalType* _pIT); + Cell* set(int _iIndex, InternalType* _pIT) override; Cell* set(int _iIndex, const InternalType* _pIT); - Cell* set(InternalType** _pIT); + Cell* set(InternalType** _pIT) override; - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; Cell* insertCell(typed_list* _pArgs, InternalType* _pSource); static Cell* insertNewCell(typed_list* _pArgs, InternalType* _pSource); List* extractCell(typed_list* _pArgs); /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"cell"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"ce"; }; - virtual bool isContainer(void) + virtual bool isContainer(void) override { return true; } bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; - bool isTrue() + bool isTrue() override { return false; } - virtual bool neg(InternalType *& /*out*/) + virtual bool neg(InternalType *& /*out*/) override { return false; } - virtual bool transpose(InternalType *& out); + virtual bool transpose(InternalType *& out) override; - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; private : - virtual InternalType* getNullValue(); - virtual Cell* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual Cell* createEmpty(); - virtual InternalType* copyValue(InternalType* _pData); - virtual void deleteAll(); - virtual void deleteImg(); - virtual InternalType** allocData(int _iSize); - virtual void deleteData(InternalType* _pData); + virtual InternalType* getNullValue() override; + virtual Cell* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual Cell* createEmpty() override; + virtual InternalType* copyValue(InternalType* _pData) override; + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual InternalType** allocData(int _iSize) override; + virtual void deleteData(InternalType* _pData) override; }; } diff --git a/scilab/modules/ast/includes/types/double.hxx b/scilab/modules/ast/includes/types/double.hxx index a620860..d6f82a1 100644 --- a/scilab/modules/ast/includes/types/double.hxx +++ b/scilab/modules/ast/includes/types/double.hxx @@ -60,25 +60,25 @@ public : bool setOnes(); /*Config management*/ - void whoAmI(); + void whoAmI() override; bool isEmpty(); - Double* clone(); + Double* clone() override; bool fillFromCol(int _iCols, Double *_poSource); bool fillFromRow(int _iRows, Double *_poSource); - Double* append(int _iRows, int _iCols, InternalType* _poSource); + Double* append(int _iRows, int _iCols, InternalType* _poSource) override; //bool append(int _iRows, int _iCols, Double *_poSource); - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; - bool isDouble() + bool isDouble() override { return true; } - bool isComplex() + bool isComplex() override { return (m_pImgData != NULL) || isViewAsZComplex(); } @@ -100,9 +100,9 @@ public : return true; } - bool isTrue(); + bool isTrue() override; - bool neg(InternalType *& out) + bool neg(InternalType *& out) override { if (isEmpty()) { @@ -138,21 +138,21 @@ public : void convertFromZComplex(); /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"constant"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"s"; } - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabDouble; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return isIdentity() ? isComplex() ? IdIdentityComplex : IdIdentity : isEmpty() ? IdEmpty @@ -189,7 +189,7 @@ public : } - virtual bool adjoint(InternalType *& out) + virtual bool adjoint(InternalType *& out) override { if (isEmpty()) { @@ -236,7 +236,7 @@ public : return false; } - virtual bool transpose(InternalType *& out) + virtual bool transpose(InternalType *& out) override { if (isEmpty()) { @@ -269,9 +269,9 @@ public : return false; } - virtual ast::Exp* getExp(const Location& loc); + virtual ast::Exp* getExp(const Location& loc) override; - virtual Double* set(int _iPos, const double _data) + virtual Double* set(int _iPos, const double _data) override { if (_iPos >= m_iSize) { @@ -289,12 +289,12 @@ public : return this; } - virtual Double* set(int _iRows, int _iCols, const double _data) + virtual Double* set(int _iRows, int _iCols, const double _data) override { return set(_iCols * getRows() + _iRows, _data); } - virtual Double* set(double* _pdata) + virtual Double* set(double* _pdata) override { if (m_pRealData == NULL) { @@ -316,7 +316,7 @@ public : return this; } - virtual Double* set(const double* _pdata) + virtual Double* set(const double* _pdata) override { if (m_pRealData == NULL) { @@ -356,13 +356,13 @@ public : private: virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; - virtual double getNullValue(); - virtual Double* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual double copyValue(double _dblData); - virtual void deleteAll(); - virtual void deleteImg(); - virtual double* allocData(int _iSize); - virtual void deleteData(double /*data*/) { } + virtual double getNullValue() override; + virtual Double* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual double copyValue(double _dblData) override; + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual double* allocData(int _iSize) override; + virtual void deleteData(double /*data*/) override { } bool m_bViewAsInteger; bool m_bViewAsZComplex; diff --git a/scilab/modules/ast/includes/types/function.hxx b/scilab/modules/ast/includes/types/function.hxx index 524fa2e..648f059 100644 --- a/scilab/modules/ast/includes/types/function.hxx +++ b/scilab/modules/ast/includes/types/function.hxx @@ -62,8 +62,8 @@ public : ~Function(); //FIXME : Should not return NULL - virtual Function* clone(); - virtual bool operator==(const InternalType& it); + virtual Function* clone() override; + virtual bool operator==(const InternalType& it) override; static Function* createFunction(const std::wstring& _wstName, GW_FUNC _pFunc, const std::wstring& _wstModule); static Function* createFunction(const std::wstring& _wstName, GW_FUNC_OPT _pFunc, const std::wstring& _wstModule); @@ -80,33 +80,33 @@ public : static Function* createFunction(const std::wstring& _wstFunctionName, const std::wstring& _wstEntryPointName, const std::wstring& _wstLibName, FunctionType _iType, LOAD_DEPS _pLoadDeps, const std::wstring& _wstModule, bool _bCloseLibAfterCall = false); static Function* createFunction(const std::wstring& _wstFunctionName, const std::wstring& _wstEntryPointName, const std::wstring& _wstLibName, FunctionType _iType, const std::wstring& _wstLoadDepsName, const std::wstring& _wstModule, bool _bCloseLibAfterCall = false); - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabFunction; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdFunction; } - bool isFunction() + bool isFunction() override { return true; } - void whoAmI(); + void whoAmI() override; - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; virtual ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"fptr"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"fptr"; } @@ -136,7 +136,7 @@ public : OptFunction(const std::wstring& _wstName, GW_FUNC_OPT _pFunc, LOAD_DEPS _pLoadDeps, const std::wstring& _wstModule); Callable::ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; - OptFunction* clone(); + OptFunction* clone() override; GW_FUNC_OPT getFunc() { @@ -156,7 +156,7 @@ public: WrapFunction(const std::wstring& _wstName, OLDGW_FUNC _pFunc, LOAD_DEPS _pLoadDeps, const std::wstring& _wstModule); Callable::ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; - WrapFunction* clone(); + WrapFunction* clone() override; OLDGW_FUNC getFunc() { @@ -175,7 +175,7 @@ public: WrapCFunction(const std::wstring& _wstName, GW_C_FUNC _pFunc, LOAD_DEPS _pLoadDeps, const std::wstring& _wstModule); Callable::ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; - WrapCFunction* clone(); + WrapCFunction* clone() override; GW_C_FUNC getFunc() { @@ -194,7 +194,7 @@ public : WrapMexFunction(const std::wstring& _wstName, MEXGW_FUNC _pFunc, LOAD_DEPS _pLoadDeps, const std::wstring& _wstModule); Callable::ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; - WrapMexFunction* clone(); + WrapMexFunction* clone() override; MEXGW_FUNC getFunc() { diff --git a/scilab/modules/ast/includes/types/graphichandle.hxx b/scilab/modules/ast/includes/types/graphichandle.hxx index 1e28441..f3f7fa8 100644 --- a/scilab/modules/ast/includes/types/graphichandle.hxx +++ b/scilab/modules/ast/includes/types/graphichandle.hxx @@ -30,66 +30,66 @@ public : virtual ~GraphicHandle(); - GraphicHandle* clone(); + GraphicHandle* clone() override; - void whoAmI(); + void whoAmI() override; - bool isHandle() + bool isHandle() override { return true; } - bool isContainer() + bool isContainer() override { return true; } - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"handle"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"h"; } - bool hasToString() + bool hasToString() override { return false; } - bool isTrue() + bool isTrue() override { return false; } - virtual bool neg(InternalType *& /*out*/) + virtual bool neg(InternalType *& /*out*/) override { return false; } - virtual bool transpose(InternalType *& out); + virtual bool transpose(InternalType *& out) override; - virtual bool isFieldExtractionOverloadable() const + virtual bool isFieldExtractionOverloadable() const override { return true; } virtual bool invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e) override ; - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; protected : - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabHandle; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return isScalar() ? IdScalarHandle : IdHandle; } @@ -97,12 +97,12 @@ protected : private : virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; - virtual long long getNullValue(); - virtual GraphicHandle* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual long long copyValue(long long _handle); - virtual void deleteAll(); - virtual void deleteImg(); - virtual long long* allocData(int _iSize); + virtual long long getNullValue() override; + virtual GraphicHandle* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual long long copyValue(long long _handle) override; + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual long long* allocData(int _iSize) override; }; } diff --git a/scilab/modules/ast/includes/types/implicitlist.hxx b/scilab/modules/ast/includes/types/implicitlist.hxx index 3d85e22..ceaf9d6 100644 --- a/scilab/modules/ast/includes/types/implicitlist.hxx +++ b/scilab/modules/ast/includes/types/implicitlist.hxx @@ -58,28 +58,28 @@ public : virtual ~ImplicitList(); ImplicitList(InternalType* _poStart, InternalType* _poStep, InternalType* _poEnd); - ImplicitList* clone(); + ImplicitList* clone() override; - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabImplicitList; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdImplicitList; } - bool isImplicitList() + bool isImplicitList() override { return true; } - virtual bool isAssignable(void) + virtual bool isAssignable(void) override { return true; } - inline virtual bool isInvokable() const + inline virtual bool isInvokable() const override { return true; } @@ -108,7 +108,7 @@ public : bool compute(); bool isComputable(); - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; InternalType::ScilabType getStartType(); @@ -137,12 +137,12 @@ public : /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"implicitlist"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"ip"; } @@ -153,13 +153,13 @@ public : void extractFullMatrix(T *_pT); void extractFullMatrix(Double *_pdbl); - virtual bool isTrue(); + virtual bool isTrue() override; - virtual bool transpose(InternalType *& out); - virtual bool neg(InternalType *& out); - virtual ast::Exp * getExp(const Location & loc); + virtual bool transpose(InternalType *& out) override; + virtual bool neg(InternalType *& out) override; + virtual ast::Exp * getExp(const Location & loc) override; - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; }; } diff --git a/scilab/modules/ast/includes/types/int.hxx b/scilab/modules/ast/includes/types/int.hxx index e15ef66..95dff8e 100644 --- a/scilab/modules/ast/includes/types/int.hxx +++ b/scilab/modules/ast/includes/types/int.hxx @@ -90,7 +90,7 @@ public : #endif } - Int* clone() + Int* clone() override { Int *pbClone = new Int(GenericType::getDims(), GenericType::getDimsArray()); pbClone->set(ArrayOf::get()); @@ -98,14 +98,14 @@ public : } /*Config management*/ - void whoAmI(); + void whoAmI() override; - bool isInt() + bool isInt() override { return true; } - bool neg(InternalType *& out) + bool neg(InternalType *& out) override { out = new Int(this->getDims(), this->getDimsArray()); type_traits::bin_neg(this->m_iSize, this->m_pRealData, static_cast *>(out)->get()); @@ -113,12 +113,12 @@ public : return true; } - virtual bool transpose(InternalType *& out) + virtual bool transpose(InternalType *& out) override { return type_traits::transpose(*this, out); } - bool operator==(const InternalType& it) + bool operator==(const InternalType& it) override { if (const_cast(it).getType() != getType()) { @@ -147,16 +147,16 @@ public : return true; } - bool operator!=(const InternalType& it) + bool operator!=(const InternalType& it) override { return !(*this == it); } /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const; + virtual std::wstring getTypeStr() const override; /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"i"; } @@ -186,8 +186,8 @@ public : } protected : - inline InternalType::ScilabType getType(void); - inline InternalType::ScilabId getId(void); + inline InternalType::ScilabType getType(void) override; + inline InternalType::ScilabId getId(void) override; private : virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int /*_iDims*/) override @@ -473,31 +473,31 @@ private : return true; } - virtual T getNullValue() + virtual T getNullValue() override { return T(0); } - virtual Int* createEmpty(int _iDims, int* _piDims, bool /*_bComplex*/) + virtual Int* createEmpty(int _iDims, int* _piDims, bool /*_bComplex*/) override { return new Int(_iDims, _piDims); } - virtual T copyValue(T _data) + virtual T copyValue(T _data) override { return _data; } - virtual void deleteAll() + virtual void deleteAll() override { delete[] ArrayOf::m_pRealData; ArrayOf::m_pRealData = NULL; deleteImg(); } - virtual void deleteImg() { } + virtual void deleteImg() override { } - virtual T* allocData(int _iSize) + virtual T* allocData(int _iSize) override { return new T[_iSize]; } @@ -512,35 +512,35 @@ private : }; public: - bool isInt8() + bool isInt8() override { return is_same_int::value; } - bool isInt16() + bool isInt16() override { return is_same_int::value; } - bool isInt32() + bool isInt32() override { return is_same_int::value; } - bool isInt64() + bool isInt64() override { return is_same_int::value; } - bool isUInt8() + bool isUInt8() override { return is_same_int::value; } - bool isUInt16() + bool isUInt16() override { return is_same_int::value; } - bool isUInt32() + bool isUInt32() override { return is_same_int::value; } - bool isUInt64() + bool isUInt64() override { return is_same_int::value; } diff --git a/scilab/modules/ast/includes/types/list.hxx b/scilab/modules/ast/includes/types/list.hxx index 1576d9e..cd91f29 100644 --- a/scilab/modules/ast/includes/types/list.hxx +++ b/scilab/modules/ast/includes/types/list.hxx @@ -31,24 +31,24 @@ protected : std::vector* getData(); List(List *_oListCopyMe); public : - int getSize() const; + int getSize() const override; - void whoAmI(void) + void whoAmI(void) override { std::cout << "types::List"; }; - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabList; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdList; } - - bool getMemory(long long* _piSize, long long* _piSizePlusType); - + + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; + /** ** append(InternalType *_typedValue) ** Append the given value to the end of the List @@ -59,17 +59,17 @@ public : ** Clone ** Create a new List and Copy all values. */ - virtual List* clone(); + virtual List* clone() override; - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; - bool isList() + bool isList() override { return true; } - List* insert(typed_list* _pArgs, InternalType* _pSource); - InternalType* extract(typed_list* _pArgs); + List* insert(typed_list* _pArgs, InternalType* _pSource) override; + InternalType* extract(typed_list* _pArgs) override; virtual bool invoke(typed_list & in, optional_list & /*opt*/, int /*_iRetCount*/, typed_list & out, const ast::Exp & /*e*/) override { @@ -97,22 +97,22 @@ public : return true; } - virtual bool isInvokable() const + virtual bool isInvokable() const override { return true; } - virtual bool hasInvokeOption() const + virtual bool hasInvokeOption() const override { return false; } - virtual int getInvokeNbIn() + virtual int getInvokeNbIn() override { return -1; } - virtual int getInvokeNbOut() + virtual int getInvokeNbOut() override { return -1; } @@ -121,17 +121,17 @@ public : virtual List* set(const int _iIndex, InternalType* _pIT); /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"list"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"l"; } - virtual bool operator==(const InternalType& it); + virtual bool operator==(const InternalType& it) override; protected : std::vector* m_plData; diff --git a/scilab/modules/ast/includes/types/macro.hxx b/scilab/modules/ast/includes/types/macro.hxx index f7423e4..fbc676b 100644 --- a/scilab/modules/ast/includes/types/macro.hxx +++ b/scilab/modules/ast/includes/types/macro.hxx @@ -41,24 +41,24 @@ public : virtual ~Macro(); // FIXME : Should not return NULL; - Macro* clone(); + Macro* clone() override; - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabMacro; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdMacro; } - bool isMacro() + bool isMacro() override { return true; } - void whoAmI(); + void whoAmI() override; - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; Callable::ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; @@ -66,15 +66,15 @@ public : ast::SeqExp* getBody(); - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"function"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"function"; } @@ -92,10 +92,10 @@ public : std::list* getInputs(); std::list* getOutputs(); - virtual int getNbInputArgument(void); - virtual int getNbOutputArgument(void); + virtual int getNbInputArgument(void) override; + virtual int getNbOutputArgument(void) override; - bool operator==(const InternalType& it); + bool operator==(const InternalType& it) override; void add_submacro(const symbol::Symbol& s, Macro* macro); diff --git a/scilab/modules/ast/includes/types/macrofile.hxx b/scilab/modules/ast/includes/types/macrofile.hxx index 66450db..a057e26 100644 --- a/scilab/modules/ast/includes/types/macrofile.hxx +++ b/scilab/modules/ast/includes/types/macrofile.hxx @@ -31,42 +31,42 @@ public : virtual ~MacroFile(); //FIXME : Should not return NULL - MacroFile* clone(); + MacroFile* clone() override; - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabMacroFile; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdMacroFile; } - bool isMacroFile() + bool isMacroFile() override { return true; } - void whoAmI(); + void whoAmI() override; - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; Callable::ReturnValue call(typed_list &in, optional_list &opt, int _iRetCount, typed_list &out) override; bool parse(void); Macro* getMacro(void); - void setLines(int _iFirstLine, int _iLastLine); + void setLines(int _iFirstLine, int _iLastLine) override; - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"function"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"function"; } @@ -76,10 +76,10 @@ public : return m_stPath; } - virtual int getNbInputArgument(void); - virtual int getNbOutputArgument(void); + virtual int getNbInputArgument(void) override; + virtual int getNbOutputArgument(void) override; - bool operator==(const InternalType& it); + bool operator==(const InternalType& it) override; private : std::wstring m_stPath; diff --git a/scilab/modules/ast/includes/types/mlist.hxx b/scilab/modules/ast/includes/types/mlist.hxx index df15a72..f2c2fc4 100644 --- a/scilab/modules/ast/includes/types/mlist.hxx +++ b/scilab/modules/ast/includes/types/mlist.hxx @@ -27,29 +27,29 @@ public : MList() : TList() {} //Destructor uses ~TList() - virtual MList* clone() + virtual MList* clone() override { return new MList(this); } - void whoAmI(void) + void whoAmI(void) override { std::cout << "types::MList"; }; - ScilabType getType(void) + ScilabType getType(void) override { return ScilabMList; } - bool isMList() + bool isMList() override { return true; } - bool isTList() + bool isTList() override { return false; } - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; virtual bool invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e) override; diff --git a/scilab/modules/ast/includes/types/polynom.hxx b/scilab/modules/ast/includes/types/polynom.hxx index 880eda8..d3653a4 100644 --- a/scilab/modules/ast/includes/types/polynom.hxx +++ b/scilab/modules/ast/includes/types/polynom.hxx @@ -48,19 +48,19 @@ public : virtual ~Polynom(); // FIXME : Should not return NULL - Polynom* clone(); + Polynom* clone() override; Polynom* setCoef(int _iRows, int _iCols, Double *_pdblCoef); Polynom* setCoef(int _iIdx, Double *_pdblCoef); - virtual Polynom* setComplex(bool _bComplex); + virtual Polynom* setComplex(bool _bComplex) override; - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabPolynom; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return isScalar() ? isComplex() ? IdScalarPolynomComplex : IdScalarPolynom @@ -68,15 +68,15 @@ public : : IdPolynom; } - bool isComplex(void); + bool isComplex(void) override; - bool isDollar(); - inline bool isPoly() + bool isDollar() override; + inline bool isPoly() override { return true; } - void whoAmI(void); + void whoAmI(void) override; std::wstring& getVariableName(); void setVariableName(const std::wstring&); bool getSizes(int *_piSizes); @@ -89,40 +89,40 @@ public : Double* extractCoef(int _iRank); bool insertCoef(int _iRank, Double* _pCoef); void setZeros(); - Polynom* insert(typed_list* _pArgs, InternalType* _pSource); + Polynom* insert(typed_list* _pArgs, InternalType* _pSource) override; - Polynom* set(int _iPos, SinglePoly* _pS); - Polynom* set(int _iRows, int _iCols, SinglePoly* _pS); - Polynom* set(SinglePoly** _pS); + Polynom* set(int _iPos, SinglePoly* _pS) override; + Polynom* set(int _iRows, int _iCols, SinglePoly* _pS) override; + Polynom* set(SinglePoly** _pS) override; std::wstring getRowString(int* _piDims, int _iDims, bool _bComplex); std::wstring getColString(int* _piDims, int _iDims, bool _bComplex); std::wstring getMatrixString(int* _piDims, int _iDims, bool _bComplex); - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"polynomial"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"p"; } - bool isTrue() + bool isTrue() override { return false; } - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; - bool transpose(InternalType *& out); - bool adjoint(InternalType *& out); + bool transpose(InternalType *& out) override; + bool adjoint(InternalType *& out) override; static Polynom* Dollar(); @@ -133,13 +133,13 @@ protected : private : virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; - virtual SinglePoly* getNullValue(); - virtual Polynom* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual SinglePoly* copyValue(SinglePoly* _pData); - virtual void deleteAll(); - virtual void deleteImg(); - virtual SinglePoly** allocData(int _iSize); - virtual void deleteData(SinglePoly* data); + virtual SinglePoly* getNullValue() override; + virtual Polynom* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual SinglePoly* copyValue(SinglePoly* _pData) override; + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual SinglePoly** allocData(int _iSize) override; + virtual void deleteData(SinglePoly* data) override; }; } diff --git a/scilab/modules/ast/includes/types/singlepoly.hxx b/scilab/modules/ast/includes/types/singlepoly.hxx index 226d356..1a9a50f 100644 --- a/scilab/modules/ast/includes/types/singlepoly.hxx +++ b/scilab/modules/ast/includes/types/singlepoly.hxx @@ -30,24 +30,24 @@ public : SinglePoly(double** _pdblCoefR, double** _pdblcoefI, int _iRank); virtual ~SinglePoly(); - virtual void deleteAll(); - virtual void deleteImg(); + virtual void deleteAll() override; + virtual void deleteImg() override; // FIXME : Should not return NULL; - SinglePoly* clone(); + SinglePoly* clone() override; SinglePoly* conjugate(); - bool isSinglePoly() + bool isSinglePoly() override { return true; } /*Config management*/ - void whoAmI(); + void whoAmI() override; - virtual double getNullValue(); - virtual SinglePoly* createEmpty(int _iDims, int* _piDims, bool _bComplex); - virtual double* allocData(int _iSize); - virtual double copyValue(double _dblData); + virtual double getNullValue() override; + virtual SinglePoly* createEmpty(int _iDims, int* _piDims, bool _bComplex) override; + virtual double* allocData(int _iSize) override; + virtual double copyValue(double _dblData) override; virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; bool setZeros(); @@ -59,36 +59,36 @@ public : bool evaluate(double _dblInR, double _dblInI, double *_pdblOutR, double *_pdblOutI); void updateRank(void); - void toStringReal(const std::wstring& _szVar, std::list* _pListExp , std::list* _pListCoef); - void toStringImg(const std::wstring& _szVar, std::list* _pListExp , std::list* _pListCoef); + void toStringReal(const std::wstring& _szVar, std::list* _pListExp, std::list* _pListCoef); + void toStringImg(const std::wstring& _szVar, std::list* _pListExp, std::list* _pListCoef); - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"poly"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"p"; } protected : - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabSinglePolynom; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdSinglePolynom; } private : - void toStringInternal(double *_pdblVal, const std::wstring& _szVar, std::list* _pListExp , std::list* _pListCoef); + void toStringInternal(double *_pdblVal, const std::wstring& _szVar, std::list* _pListExp, std::list* _pListCoef); }; diff --git a/scilab/modules/ast/includes/types/string.hxx b/scilab/modules/ast/includes/types/string.hxx index 52f075f..8321005 100644 --- a/scilab/modules/ast/includes/types/string.hxx +++ b/scilab/modules/ast/includes/types/string.hxx @@ -46,7 +46,7 @@ public : static wchar_t* nullValue(); - void whoAmI(); + void whoAmI() override; virtual String* set(int _iPos, const wchar_t* _pwstData); virtual String* set(int _iRows, int _iCols, const wchar_t* _pwstData); @@ -56,67 +56,67 @@ public : virtual String* set(int _iRows, int _iCols, const char* _pcData); virtual String* set(const char* const* _pstrData); - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"string"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"c"; } - String* clone(); + String* clone() override; - inline ScilabType getType() + inline ScilabType getType() override { return ScilabString; } - inline ScilabId getId() + inline ScilabId getId() override { return isScalar() ? IdScalarString : IdString; } - bool isString() + bool isString() override { return true; } - bool isTrue() + bool isTrue() override { return false; } - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; - virtual bool neg(InternalType *& /*out*/) + virtual bool neg(InternalType *& /*out*/) override { return false; } - virtual bool transpose(InternalType *& out); + virtual bool transpose(InternalType *& out) override; - virtual ast::Exp* getExp(const Location& loc); + virtual ast::Exp* getExp(const Location& loc) override; private : void deleteString(int _iRows, int _iCols); void deleteString(int _iPos); void createString(int _iDims, int* _piDims); - virtual wchar_t* copyValue(wchar_t* _pwstData); + virtual wchar_t* copyValue(wchar_t* _pwstData) override; virtual wchar_t* copyValue(const wchar_t* _pwstData); - virtual String* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual wchar_t* getNullValue() + virtual String* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual wchar_t* getNullValue() override { return nullValue(); }; - virtual void deleteAll(); - virtual void deleteImg(); - virtual wchar_t** allocData(int _iSize); - void deleteData(wchar_t* data); + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual wchar_t** allocData(int _iSize) override; + void deleteData(wchar_t* data) override; }; } diff --git a/scilab/modules/ast/includes/types/struct.hxx b/scilab/modules/ast/includes/types/struct.hxx index 8c8dd2e..edf3714 100644 --- a/scilab/modules/ast/includes/types/struct.hxx +++ b/scilab/modules/ast/includes/types/struct.hxx @@ -40,65 +40,65 @@ private : public : - void whoAmI(void) + void whoAmI(void) override { std::cout << "types::Struct"; }; - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabStruct; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdStruct; } - bool isStruct() + bool isStruct() override { return true; } bool isEmpty(); - bool transpose(InternalType *& out); + bool transpose(InternalType *& out) override; /** ** Clone ** Create a new List and Copy all values. */ - Struct* clone(); + Struct* clone() override; - Struct* set(int _iRows, int _iCols, SingleStruct* _pIT); + Struct* set(int _iRows, int _iCols, SingleStruct* _pIT) override; Struct* set(int _iRows, int _iCols, const SingleStruct* _pIT); - Struct* set(int _iIndex, SingleStruct* _pIT); + Struct* set(int _iIndex, SingleStruct* _pIT) override; Struct* set(int _iIndex, const SingleStruct* _pIT); - Struct* set(SingleStruct** _pIT); + Struct* set(SingleStruct** _pIT) override; - bool operator==(const InternalType& it); - bool operator!=(const InternalType& it); + bool operator==(const InternalType& it) override; + bool operator!=(const InternalType& it) override; /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const + virtual std::wstring getTypeStr() const override { return L"struct"; } /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const + virtual std::wstring getShortTypeStr() const override { return L"st"; } - virtual bool isContainer(void) + virtual bool isContainer(void) override { return true; } - bool isTrue() + bool isTrue() override { return false; } - virtual bool neg(InternalType *& /*out*/) + virtual bool neg(InternalType *& /*out*/) override { return false; } @@ -109,14 +109,14 @@ public : Struct* addField(const std::wstring& _sKey); Struct* addFieldFront(const std::wstring& _sKey); Struct* removeField(const std::wstring& _sKey); - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; List* extractFieldWithoutClone(const std::wstring& _wstField); typed_list extractFields(std::vector _wstFields); typed_list extractFields(typed_list* _pArgs); InternalType * extractField(const std::wstring& wstField); - Struct* resize(int* _piDims, int _iDims); - Struct* resize(int _iNewRows, int _iNewCols); + Struct* resize(int* _piDims, int _iDims) override; + Struct* resize(int _iNewRows, int _iNewCols) override; /*specials functions to disable clone operation during copydata*/ InternalType* insertWithoutClone(typed_list* _pArgs, InternalType* _pSource); @@ -124,26 +124,26 @@ public : void setCloneInCopyValue(bool _val); using ArrayOf::extract; - bool extract(const std::wstring& name, InternalType *& out); + bool extract(const std::wstring& name, InternalType *& out) override; virtual bool invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e) override; - virtual int getInvokeNbOut() + virtual int getInvokeNbOut() override { return -1; } - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; private : - virtual SingleStruct* getNullValue(); - virtual Struct* createEmpty(int _iDims, int* _piDims, bool _bComplex = false); - virtual Struct* createEmpty(); - virtual SingleStruct* copyValue(SingleStruct* _pData); - virtual void deleteAll(); - virtual void deleteImg(); - virtual SingleStruct** allocData(int _iSize); - virtual void deleteData(SingleStruct* data); + virtual SingleStruct* getNullValue() override; + virtual Struct* createEmpty(int _iDims, int* _piDims, bool _bComplex = false) override; + virtual Struct* createEmpty() override; + virtual SingleStruct* copyValue(SingleStruct* _pData) override; + virtual void deleteAll() override; + virtual void deleteImg() override; + virtual SingleStruct** allocData(int _iSize) override; + virtual void deleteData(SingleStruct* data) override; bool m_bDisableCloneInCopyValue; diff --git a/scilab/modules/ast/includes/types/tlist.hxx b/scilab/modules/ast/includes/types/tlist.hxx index 17e2a65..3ac7aaf 100644 --- a/scilab/modules/ast/includes/types/tlist.hxx +++ b/scilab/modules/ast/includes/types/tlist.hxx @@ -32,35 +32,35 @@ protected : TList(TList *_oTListCopyMe) : List(_oTListCopyMe) {} public : - void whoAmI(void) + void whoAmI(void) override { std::cout << "types::TList"; } - ScilabType getType(void) + ScilabType getType(void) override { return ScilabTList; } - bool isTList() + bool isTList() override { return true; } - virtual TList* clone(); + virtual TList* clone() override; bool exists(const std::wstring& _sKey); InternalType* getField(const std::wstring& _sKey); int getIndexFromString(const std::wstring& _sKey); TList* set(const std::wstring& _sKey, InternalType* _pIT); - TList* set(const int _iIndex, InternalType* _pIT); + TList* set(const int _iIndex, InternalType* _pIT) override; using List::extract; // to avoid this extract to hide extract in list - bool extract(const std::wstring& name, InternalType *& out); + bool extract(const std::wstring& name, InternalType *& out) override; virtual bool invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e) override; - bool isFieldExtractionOverloadable() const + bool isFieldExtractionOverloadable() const override { return true; } @@ -68,15 +68,15 @@ public : InternalType* extractStrings(const std::list& _stFields); /* return type as string ( double, int, cell, list, ... )*/ - virtual std::wstring getTypeStr() const; + virtual std::wstring getTypeStr() const override; /* return type as short string ( s, i, ce, l, ... )*/ - virtual std::wstring getShortTypeStr() const; + virtual std::wstring getShortTypeStr() const override; String* getFieldNames() const; - bool toString(std::wostringstream& ostr); + bool toString(std::wostringstream& ostr) override; - bool getMemory(long long* _piSize, long long* _piSizePlusType); + bool getMemory(long long* _piSize, long long* _piSizePlusType) override; private : }; diff --git a/scilab/modules/ast/includes/types/user.hxx b/scilab/modules/ast/includes/types/user.hxx index b368d30..2f70eba 100644 --- a/scilab/modules/ast/includes/types/user.hxx +++ b/scilab/modules/ast/includes/types/user.hxx @@ -30,22 +30,22 @@ public : /*** non virtual function to prevent overriding in user derived class ***/ - inline ScilabType getType(void) + inline ScilabType getType(void) override { return ScilabUserType; } - inline ScilabId getId(void) + inline ScilabId getId(void) override { return IdUserType; } - bool isUserType(void) + bool isUserType(void) override { return true; } - inline bool isGenericType() + inline bool isGenericType() override { return false; } @@ -54,9 +54,9 @@ public : /*** User will be asked to implement the following methods ***/ /*** in order Scilab engine to manage correctly this user type ***/ - virtual std::wstring getTypeStr() const = 0; - virtual std::wstring getShortTypeStr() const = 0; - virtual UserType* clone() = 0; + virtual std::wstring getTypeStr() const override = 0; + virtual std::wstring getShortTypeStr() const override = 0; + virtual UserType* clone() override = 0; public : /*** User can overload these methods ***/ @@ -76,13 +76,13 @@ public : // and toString method is useless // if user overload hasToString for return true, he must overload toString method // bool toString(std::wostringstream& ostr) - virtual bool hasToString() + virtual bool hasToString() override { return false; } // overload this method if hasToString method return true - virtual bool toString(std::wostringstream& /*ostr*/) + virtual bool toString(std::wostringstream& /*ostr*/) override { return false; } @@ -90,7 +90,7 @@ public : // insertion by value // _pArs is a list of scilab types:: of where we want to extract // _pSource is what we wan to insert - virtual UserType* insert(typed_list* /*_pArgs*/, InternalType* /*_pSource*/) + virtual UserType* insert(typed_list* /*_pArgs*/, InternalType* /*_pSource*/) override { return NULL; } @@ -98,7 +98,7 @@ public : // this method is called to perform an extraction by field. ie : a = myUserType.myfield // name is the field name // out contain extraction of field - virtual bool extract(const std::wstring& /*name*/, InternalType *& /*out*/) + virtual bool extract(const std::wstring& /*name*/, InternalType *& /*out*/) override { return false; } @@ -107,13 +107,13 @@ public : // _pArs is a list of scilab types:: of where we want to extract // return all element extracted, in case when multiple elements returned // these elements must be stored in a types::List - virtual InternalType* extract(typed_list* /*_pArgs*/) + virtual InternalType* extract(typed_list* /*_pArgs*/) override { return NULL; } // if return false , Scilab will never call "invoke" method - virtual bool isInvokable() const + virtual bool isInvokable() const override { return true; } @@ -122,7 +122,7 @@ public : // ie : myUserType(a,b, opt=value, opt2=value2,...) // in this case, "types::optional_list& opt" will contain opt and opt2. // by default this method return false, the optional list is empty and the input list contains all arguments. - virtual bool hasInvokeOption() const + virtual bool hasInvokeOption() const override { return false; } @@ -154,7 +154,7 @@ public : // used to compute the iterator in scilab loop "for" // when type is a two dimensions array // _iPos is the column position - virtual GenericType* getColumnValues(int /*_iPos*/) + virtual GenericType* getColumnValues(int /*_iPos*/) override { return NULL; } @@ -168,7 +168,7 @@ public : //load must be done by overload %yourtype_load and must returns a pointer on your UserType - bool getMemory(long long* _piSize, long long* _piSizePlusType) + bool getMemory(long long* _piSize, long long* _piSizePlusType) override { *_piSize = sizeof(UserType); *_piSizePlusType = *_piSize; diff --git a/scilab/modules/coverage/includes/CovHTMLCodePrinter.hxx b/scilab/modules/coverage/includes/CovHTMLCodePrinter.hxx index f00f11d..f174f18 100644 --- a/scilab/modules/coverage/includes/CovHTMLCodePrinter.hxx +++ b/scilab/modules/coverage/includes/CovHTMLCodePrinter.hxx @@ -78,22 +78,22 @@ public: void handleExpStart(const ast::Exp * e) override; void handleExpEnd(const ast::Exp * e) override; - inline std::size_t getIndentSize() const + inline std::size_t getIndentSize() const override { return indentLevel * 4; } - inline void incIndent() + inline void incIndent() override { ++indentLevel; } - inline void decIndent() + inline void decIndent() override { --indentLevel; } - inline unsigned int getLineCharCount() const + inline unsigned int getLineCharCount() const override { return counter; } diff --git a/scilab/modules/external_objects/src/cpp/EOType.hxx b/scilab/modules/external_objects/src/cpp/EOType.hxx index f182fab..a20e105 100644 --- a/scilab/modules/external_objects/src/cpp/EOType.hxx +++ b/scilab/modules/external_objects/src/cpp/EOType.hxx @@ -37,43 +37,43 @@ public : } virtual ~EOType() {} - inline std::wstring getTypeStr() const + inline std::wstring getTypeStr() const override { return L"eotype"; } - inline std::wstring getShortTypeStr() const + inline std::wstring getShortTypeStr() const override { return L"eo"; } - EOType* clone() + EOType* clone() override { return new EOType(id, isNew); } - inline bool hasToString() + inline bool hasToString() override { return true; } - inline bool toString(std::wostringstream& ostr) + inline bool toString(std::wostringstream& ostr) override { ostr << "eotype" << std::endl; return true; } - inline bool isInvokable() const + inline bool isInvokable() const override { return true; } - inline bool isAssignable() + inline bool isAssignable() override { return false; } - inline bool isCallable() + inline bool isCallable() override { return true; } diff --git a/scilab/modules/mpi/includes/sciMpiComm.hxx b/scilab/modules/mpi/includes/sciMpiComm.hxx index 511658c..c0ed5f1 100644 --- a/scilab/modules/mpi/includes/sciMpiComm.hxx +++ b/scilab/modules/mpi/includes/sciMpiComm.hxx @@ -48,12 +48,12 @@ public : return new SciMpiComm(m_piWorldIndex, m_iGroupSize); } - std::wstring getTypeStr() const + std::wstring getTypeStr() const override { return L"SciMpiComm"; } - std::wstring getShortTypeStr() const + std::wstring getShortTypeStr() const override { return L"smc"; } diff --git a/scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx index ccf9f19..6db39d7 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx @@ -442,8 +442,8 @@ public: * All following methods should be implemented by each template instance */ - virtual std::wstring getTypeStr() const = 0; - virtual std::wstring getShortTypeStr() const = 0; + virtual std::wstring getTypeStr() const override = 0; + virtual std::wstring getShortTypeStr() const override = 0; private: virtual UserType* clone() override final diff --git a/scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.hxx index d1821c7..fa2fe95 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/BlockAdapter.hxx @@ -40,8 +40,8 @@ public: return L"Block"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; types::InternalType* getDocContent() const; void setDocContent(types::InternalType* v); diff --git a/scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.hxx index 47733be..989a03d 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/CprAdapter.hxx @@ -38,8 +38,8 @@ public: return L"cpr"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; }; } /* namespace view_scilab */ diff --git a/scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx index 4da0b2d..f549e1e 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/DiagramAdapter.hxx @@ -39,8 +39,8 @@ public: return L"diagram"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; types::InternalType* getContribContent() const; void setContribContent(types::InternalType* v); diff --git a/scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.hxx index aab7525..09248f1 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/GraphicsAdapter.hxx @@ -43,8 +43,8 @@ public: return L"graphics"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; types::InternalType* getGrIContent() const; void setGrIContent(types::InternalType* v); diff --git a/scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx index 35613e1..6c1a425 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.hxx @@ -41,8 +41,8 @@ public: return L"Link"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; // move (if possible) the partial informations to the model static void relink(Controller& controller, model::Link* adaptee, const std::vector& children); diff --git a/scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.hxx index e9b851a..295b994 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.hxx @@ -38,8 +38,8 @@ public: return L"model"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; }; } /* namespace view_scilab */ diff --git a/scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.hxx index 089af9b..db51cbb 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/ParamsAdapter.hxx @@ -39,8 +39,8 @@ public: return L"params"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; types::InternalType* getDocContent() const; void setDocContent(types::InternalType* v); diff --git a/scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.hxx index 2cce04b..a868cb5 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/ScsAdapter.hxx @@ -38,8 +38,8 @@ public: return L"scs"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; }; } /* namespace view_scilab */ diff --git a/scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.hxx index 0c709cd..9a81303 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/StateAdapter.hxx @@ -38,8 +38,8 @@ public: return L"xcs"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; }; } /* namespace view_scilab */ diff --git a/scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx b/scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx index e710633..65878b4 100644 --- a/scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx +++ b/scilab/modules/scicos/src/cpp/view_scilab/TextAdapter.hxx @@ -38,8 +38,8 @@ public: return L"Text"; } - std::wstring getTypeStr() const; - std::wstring getShortTypeStr() const; + std::wstring getTypeStr() const override; + std::wstring getShortTypeStr() const override; }; } /* namespace view_scilab */ -- 1.7.9.5