Commit 9ab082c3 authored by David Thompson's avatar David Thompson
Browse files

COMP: Avoid stupid windows.h macros (name mangling).

parent edbde0eb
......@@ -32,7 +32,7 @@
#define VTK_MYSQL_DEFAULT_PORT 3306
vtkCxxRevisionMacro(vtkMySQLDatabase, "1.21");
vtkCxxRevisionMacro(vtkMySQLDatabase, "1.22");
vtkStandardNewMacro(vtkMySQLDatabase);
// ----------------------------------------------------------------------
......@@ -47,7 +47,7 @@ vtkMySQLDatabase::vtkMySQLDatabase() :
this->DatabaseType = 0;
this->SetDatabaseType( "mysql" );
this->HostName = 0;
this->UserName = 0;
this->User = 0;
this->Password = 0;
this->DatabaseName = 0;
this->ConnectOptions = 0;
......@@ -66,7 +66,7 @@ vtkMySQLDatabase::~vtkMySQLDatabase()
}
this->SetDatabaseType( 0 );
this->SetHostName( 0 );
this->SetUserName( 0 );
this->SetUser( 0 );
this->SetPassword( 0 );
this->SetDatabaseName( 0 );
this->SetConnectOptions( 0 );
......@@ -82,7 +82,7 @@ void vtkMySQLDatabase::PrintSelf(ostream &os, vtkIndent indent)
this->Superclass::PrintSelf(os, indent);
os << indent << "DatabaseType: " << (this->DatabaseType ? this->DatabaseType : "NULL") << endl;
os << indent << "HostName: " << (this->HostName ? this->HostName : "NULL") << endl;
os << indent << "UserName: " << (this->UserName ? this->UserName : "NULL") << endl;
os << indent << "User: " << (this->User ? this->User : "NULL") << endl;
os << indent << "Password: " << (this->Password ? this->Password : "NULL") << endl;
os << indent << "DatabaseName: " << (this->DatabaseName ? this->DatabaseName : "NULL") << endl;
os << indent << "ServerPort: " << this->ServerPort << endl;
......@@ -149,7 +149,7 @@ bool vtkMySQLDatabase::Open()
this->Private->Connection =
mysql_real_connect( &this->Private->NullConnection,
this->GetHostName(),
this->GetUserName(),
this->GetUser(),
this->GetPassword(),
this->GetDatabaseName(),
this->GetServerPort(),
......@@ -287,9 +287,9 @@ vtkStdString vtkMySQLDatabase::GetURL()
vtkStdString url;
url = this->GetDatabaseType();
url += "://";
if ( this->GetUserName() && strlen( this->GetUserName() ) )
if ( this->GetUser() && strlen( this->GetUser() ) )
{
url += this->GetUserName();
url += this->GetUser();
if ( this->GetPassword() && strlen( this->GetPassword() ) )
{
url += ":";
......
......@@ -99,8 +99,8 @@ public:
// Description:
// The user name for connecting to the database server.
vtkSetStringMacro(UserName);
vtkGetStringMacro(UserName);
vtkSetStringMacro(User);
vtkGetStringMacro(User);
// Description:
// The user's password for connecting to the database server.
......@@ -171,7 +171,7 @@ private:
char* DatabaseType;
char* HostName;
char* UserName;
char* User;
char* Password;
char* DatabaseName;
int ServerPort;
......
......@@ -32,7 +32,7 @@ PURPOSE. See the above copyright notice for more information.
#include <pqxx/pqxx>
vtkStandardNewMacro(vtkPostgreSQLDatabase);
vtkCxxRevisionMacro(vtkPostgreSQLDatabase, "1.17");
vtkCxxRevisionMacro(vtkPostgreSQLDatabase, "1.18");
// ----------------------------------------------------------------------
vtkPostgreSQLDatabase::vtkPostgreSQLDatabase()
......@@ -43,7 +43,7 @@ vtkPostgreSQLDatabase::vtkPostgreSQLDatabase()
this->DatabaseType = 0;
this->SetDatabaseType("psql");
this->HostName = 0;
this->UserName = 0;
this->User = 0;
this->Password = 0;
this->DatabaseName = 0;
this->ServerPort = -1;
......@@ -59,7 +59,7 @@ vtkPostgreSQLDatabase::~vtkPostgreSQLDatabase()
}
this->SetHostName( 0 );
this->SetUserName( 0 );
this->SetUser( 0 );
this->SetPassword( 0 );
this->SetDatabaseName( 0 );
this->SetConnectOptions( 0 );
......@@ -81,7 +81,7 @@ void vtkPostgreSQLDatabase::PrintSelf(ostream &os, vtkIndent indent)
}
os << indent << "DatabaseType: " << (this->DatabaseType ? this->DatabaseType : "NULL") << endl;
os << indent << "HostName: " << (this->HostName ? this->HostName : "NULL") << endl;
os << indent << "UserName: " << (this->UserName ? this->UserName : "NULL") << endl;
os << indent << "User: " << (this->User ? this->User : "NULL") << endl;
os << indent << "Password: " << (this->Password ? this->Password : "NULL") << endl;
os << indent << "DatabaseName: " << (this->DatabaseName ? this->DatabaseName : "NULL") << endl;
os << indent << "ServerPort: " << this->ServerPort << endl;
......@@ -249,10 +249,10 @@ bool vtkPostgreSQLDatabase::Open()
options += " port=";
options += this->ServerPort;
}
if ( this->UserName && strlen( this->UserName ) > 0 )
if ( this->User && strlen( this->User ) > 0 )
{
options += " user=";
options += this->UserName;
options += this->User;
}
if ( this->Password && strlen( this->Password ) > 0 )
{
......@@ -331,9 +331,9 @@ vtkStdString vtkPostgreSQLDatabase::GetURL()
url += "://";
if ( this->HostName && this->DatabaseName )
{
if ( this->UserName )
if ( this->User )
{
url += this->UserName;
url += this->User;
if ( this->Password )
{
url += ":";
......
......@@ -93,8 +93,8 @@ public:
// Description:
// The user name for connecting to the database server.
virtual void SetUserName( const char* );
vtkGetStringMacro(UserName);
virtual void SetUser( const char* );
vtkGetStringMacro(User);
// Description:
// The user's password for connecting to the database server.
......@@ -175,7 +175,7 @@ protected:
vtkTimeStamp ConnectionMTime;
char* DatabaseType;
char* HostName;
char* UserName;
char* User;
char* Password;
char* DatabaseName;
int ServerPort;
......@@ -216,7 +216,7 @@ private:
}
vtkSetStringPlusMTimeMacro(vtkPostgreSQLDatabase,HostName,URLMTime);
vtkSetStringPlusMTimeMacro(vtkPostgreSQLDatabase,UserName,URLMTime);
vtkSetStringPlusMTimeMacro(vtkPostgreSQLDatabase,User,URLMTime);
vtkSetStringPlusMTimeMacro(vtkPostgreSQLDatabase,Password,URLMTime);
vtkSetStringPlusMTimeMacro(vtkPostgreSQLDatabase,DatabaseName,URLMTime);
vtkSetStringPlusMTimeMacro(vtkPostgreSQLDatabase,ConnectOptions,URLMTime);
......
......@@ -39,7 +39,7 @@ PURPOSE. See the above copyright notice for more information.
#include <vtksys/SystemTools.hxx>
#include <vtksys/ios/sstream>
vtkCxxRevisionMacro(vtkSQLDatabase, "1.33");
vtkCxxRevisionMacro(vtkSQLDatabase, "1.34");
// ----------------------------------------------------------------------
vtkSQLDatabase::vtkSQLDatabase()
......@@ -294,7 +294,7 @@ vtkSQLDatabase* vtkSQLDatabase::CreateFromURL( const char* URL )
{
db = vtkPostgreSQLDatabase::New();
vtkPostgreSQLDatabase *post_db = vtkPostgreSQLDatabase::SafeDownCast(db);
post_db->SetUserName(username.c_str());
post_db->SetUser(username.c_str());
post_db->SetPassword(password.c_str());
post_db->SetHostName(hostname.c_str());
post_db->SetServerPort(atoi(dataport.c_str()));
......@@ -309,7 +309,7 @@ vtkSQLDatabase* vtkSQLDatabase::CreateFromURL( const char* URL )
vtkMySQLDatabase *mysql_db = vtkMySQLDatabase::SafeDownCast(db);
if ( username.size() )
{
mysql_db->SetUserName(username.c_str());
mysql_db->SetUser(username.c_str());
}
if ( password.size() )
{
......
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