48 #ifndef __vtkPostgreSQLDatabase_h
49 #define __vtkPostgreSQLDatabase_h
51 #include "vtkIOPostgreSQLModule.h"
63 friend class vtkPostgreSQLQueryPrivate;
74 bool Open(
const char* password = 0 );
98 virtual void SetHostName(
const char* );
104 virtual void SetUser(
const char* );
109 virtual void SetPassword(
const char* );
113 virtual void SetDatabaseName(
const char* );
119 virtual void SetConnectOptions(
const char* );
125 virtual void SetServerPort(
int );
126 virtual int GetServerPortMinValue()
130 virtual int GetServerPortMaxValue()
134 vtkGetMacro(ServerPort,
int);
159 bool CreateDatabase(
const char* dbName,
bool dropExisting =
false );
163 bool DropDatabase(
const char* dbName );
193 void UpdateDataTypeMap();
195 vtkSetStringMacro(DatabaseType);
196 vtkSetStringMacro(LastErrorText);
197 void NullTrailingWhitespace(
char* msg );
198 bool OpenInternal(
const char* connectionOptions );
221 #define vtkSetStringPlusMTimeMacro(className,name,timeStamp) \
222 inline void className::Set##name (const char* _arg) \
224 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting " << #name " to " << (_arg?_arg:"(null)") ); \
225 if ( this->name == NULL && _arg == NULL) { return;} \
226 if ( this->name && _arg && (!strcmp(this->name,_arg))) { return;} \
227 if (this->name) { delete [] this->name; } \
230 size_t n = strlen(_arg) + 1; \
231 char *cp1 = new char[n]; \
232 const char *cp2 = (_arg); \
234 do { *cp1++ = *cp2++; } while ( --n ); \
241 this->timeStamp.Modified(); \
253 vtkDebugMacro(<< this->
GetClassName() <<
" (" <<
this <<
"): setting ServerPort to " << _arg );
263 #endif // __vtkPostgreSQLDatabase_h