Commit 2d176ae4 authored by Ben Boeckel's avatar Ben Boeckel

vtkIOMySQL: use override where necessary

parent 2c90a032
......@@ -51,7 +51,7 @@ class VTKIOMYSQL_EXPORT vtkMySQLDatabase : public vtkSQLDatabase
public:
vtkTypeMacro(vtkMySQLDatabase, vtkSQLDatabase);
void PrintSelf(ostream& os, vtkIndent indent);
void PrintSelf(ostream& os, vtkIndent indent) override;
static vtkMySQLDatabase *New();
/**
......@@ -59,47 +59,47 @@ public:
* filename before calling this function. Returns true if the
* database was opened successfully; false otherwise.
*/
bool Open( const char* password = 0 );
bool Open( const char* password = 0 ) override;
/**
* Close the connection to the database.
*/
void Close();
void Close() override;
/**
* Return whether the database has an open connection
*/
bool IsOpen();
bool IsOpen() override;
/**
* Return an empty query on this database.
*/
vtkSQLQuery* GetQueryInstance();
vtkSQLQuery* GetQueryInstance() override;
/**
* Get the list of tables from the database
*/
vtkStringArray* GetTables();
vtkStringArray* GetTables() override;
/**
* Get the list of fields for a particular table
*/
vtkStringArray* GetRecord(const char *table);
vtkStringArray* GetRecord(const char *table) override;
/**
* Return whether a feature is supported by the database.
*/
bool IsSupported(int feature);
bool IsSupported(int feature) override;
/**
* Did the last operation generate an error
*/
bool HasError();
bool HasError() override;
/**
* Get the last error text from the database
*/
const char* GetLastErrorText();
const char* GetLastErrorText() override;
//@{
/**
......@@ -164,7 +164,7 @@ public:
/**
* Get the URL of the database.
*/
virtual vtkStdString GetURL();
vtkStdString GetURL() override;
/**
* Return the SQL string with the syntax of the preamble following a
......@@ -172,7 +172,7 @@ public:
* NB: this method implements the MySQL-specific IF NOT EXISTS syntax,
* used when b = false.
*/
virtual vtkStdString GetTablePreamble( bool b ) { return b ? vtkStdString() :"IF NOT EXISTS "; }
vtkStdString GetTablePreamble( bool b ) override { return b ? vtkStdString() :"IF NOT EXISTS "; }
/**
* Return the SQL string with the syntax to create a column inside a
......@@ -185,9 +185,9 @@ public:
* into INT NOT nullptr AUTO_INCREMENT. Therefore, one should not pass
* NOT nullptr as an attribute of a column whose type is SERIAL.
*/
virtual vtkStdString GetColumnSpecification( vtkSQLDatabaseSchema* schema,
int tblHandle,
int colHandle );
vtkStdString GetColumnSpecification( vtkSQLDatabaseSchema* schema,
int tblHandle,
int colHandle ) override;
/**
* Return the SQL string with the syntax to create an index inside a
......@@ -199,10 +199,10 @@ public:
* NB2: since MySQL supports INDEX creation within a CREATE TABLE statement,
* skipped is always returned false.
*/
virtual vtkStdString GetIndexSpecification( vtkSQLDatabaseSchema* schema,
int tblHandle,
int idxHandle,
bool& skipped );
vtkStdString GetIndexSpecification( vtkSQLDatabaseSchema* schema,
int tblHandle,
int idxHandle,
bool& skipped ) override;
/**
* Create a new database, optionally dropping any existing database of the same name.
......@@ -221,7 +221,7 @@ public:
* This is called by CreateFromURL() to initialize the instance.
* Look at CreateFromURL() for details about the URL format.
*/
virtual bool ParseURL(const char* url);
bool ParseURL(const char* url) override;
protected:
vtkMySQLDatabase();
......
......@@ -51,21 +51,21 @@ class VTKIOMYSQL_EXPORT vtkMySQLQuery : public vtkSQLQuery
public:
vtkTypeMacro(vtkMySQLQuery, vtkSQLQuery);
void PrintSelf(ostream& os, vtkIndent indent);
void PrintSelf(ostream& os, vtkIndent indent) override;
static vtkMySQLQuery *New();
/**
* Set the SQL query string. This must be performed before
* Execute() or BindParameter() can be called.
*/
bool SetQuery(const char *query);
bool SetQuery(const char *query) override;
/**
* Execute the query. This must be performed
* before any field name or data access functions
* are used.
*/
bool Execute();
bool Execute() override;
//@{
/**
......@@ -74,45 +74,45 @@ public:
* Calling any of these methods will overwrite the current query text
* and call Execute() so any previous query text and results will be lost.
*/
virtual bool BeginTransaction();
virtual bool CommitTransaction();
virtual bool RollbackTransaction();
bool BeginTransaction() override;
bool CommitTransaction() override;
bool RollbackTransaction() override;
//@}
/**
* The number of fields in the query result.
*/
int GetNumberOfFields();
int GetNumberOfFields() override;
/**
* Return the name of the specified query field.
*/
const char* GetFieldName(int i);
const char* GetFieldName(int i) override;
/**
* Return the type of the field, using the constants defined in vtkType.h.
*/
int GetFieldType(int i);
int GetFieldType(int i) override;
/**
* Advance row, return false if past end.
*/
bool NextRow();
bool NextRow() override;
/**
* Return true if there is an error on the current query.
*/
bool HasError();
bool HasError() override;
/**
* Return data in current row, field c
*/
vtkVariant DataValue(vtkIdType c);
vtkVariant DataValue(vtkIdType c) override;
/**
* Get the last error text from the query
*/
const char* GetLastErrorText();
const char* GetLastErrorText() override;
/**
* The following methods bind a parameter value to a placeholder in
......@@ -123,31 +123,31 @@ public:
*/
using vtkSQLQuery::BindParameter;
bool BindParameter(int index, unsigned char value);
bool BindParameter(int index, signed char value);
bool BindParameter(int index, unsigned short value);
bool BindParameter(int index, signed short value);
bool BindParameter(int index, unsigned int value);
bool BindParameter(int index, unsigned char value) override;
bool BindParameter(int index, signed char value) override;
bool BindParameter(int index, unsigned short value) override;
bool BindParameter(int index, signed short value) override;
bool BindParameter(int index, unsigned int value) override;
bool BindParameter(int index, int value);
bool BindParameter(int index, int value) override;
bool BindParameter(int index, unsigned long value);
bool BindParameter(int index, signed long value);
bool BindParameter(int index, unsigned long long value);
bool BindParameter(int index, long long value);
bool BindParameter(int index, unsigned long value) override;
bool BindParameter(int index, signed long value) override;
bool BindParameter(int index, unsigned long long value) override;
bool BindParameter(int index, long long value) override;
bool BindParameter(int index, float value);
bool BindParameter(int index, double value);
bool BindParameter(int index, float value) override;
bool BindParameter(int index, double value) override;
/**
* Bind a string value -- string must be null-terminated
*/
bool BindParameter(int index, const char *stringValue);
bool BindParameter(int index, const char *stringValue) override;
//@{
/**
* Bind a string value by specifying an array and a size
*/
bool BindParameter(int index, const char *stringValue, size_t length);
bool BindParameter(int index, const vtkStdString &string);
bool BindParameter(int index, const char *stringValue, size_t length) override;
bool BindParameter(int index, const vtkStdString &string) override;
//@}
//@{
......@@ -156,14 +156,14 @@ public:
* type. Check vtkSQLDatabase::IsSupported(VTK_SQL_FEATURE_BLOB) to
* make sure.
*/
bool BindParameter(int index, const void *data, size_t length);
bool ClearParameterBindings();
bool BindParameter(int index, const void *data, size_t length) override;
bool ClearParameterBindings() override;
//@}
/**
* Escape a string for use in a query
*/
virtual vtkStdString EscapeString( vtkStdString src, bool addSurroundingQuotes = true );
vtkStdString EscapeString( vtkStdString src, bool addSurroundingQuotes = true ) override;
protected:
vtkMySQLQuery();
......
......@@ -34,13 +34,13 @@ class VTKIOMYSQL_EXPORT vtkMySQLToTableReader :
public:
static vtkMySQLToTableReader *New();
vtkTypeMacro(vtkMySQLToTableReader,vtkDatabaseToTableReader);
void PrintSelf(ostream& os, vtkIndent indent);
void PrintSelf(ostream& os, vtkIndent indent) override;
protected:
vtkMySQLToTableReader();
~vtkMySQLToTableReader();
int RequestData(vtkInformation *, vtkInformationVector **,
vtkInformationVector *);
vtkInformationVector *) override;
private:
vtkMySQLToTableReader(const vtkMySQLToTableReader&) = delete;
void operator=(const vtkMySQLToTableReader&) = delete;
......
......@@ -33,7 +33,7 @@ class VTKIOMYSQL_EXPORT vtkTableToMySQLWriter : public vtkTableToDatabaseWriter
public:
static vtkTableToMySQLWriter *New();
vtkTypeMacro(vtkTableToMySQLWriter,vtkTableToDatabaseWriter);
void PrintSelf(ostream& os, vtkIndent indent);
void PrintSelf(ostream& os, vtkIndent indent) override;
//@{
/**
......@@ -46,9 +46,9 @@ public:
protected:
vtkTableToMySQLWriter();
~vtkTableToMySQLWriter();
void WriteData();
void WriteData() override;
virtual int FillInputPortInformation(int port, vtkInformation *info);
int FillInputPortInformation(int port, vtkInformation *info) override;
vtkTable *Input;
......
Markdown is supported
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