Commit a233e8ce authored by David Gobbi's avatar David Gobbi Committed by Marcus D. Hanwell
Browse files

ENH: use bool arrays instead of pointers for "valid" arg.

This change allows python to wrap these methods, because
"bool* valid" is unsized while "bool valid[1]" has known size.
parent 69b9222c
...@@ -277,59 +277,59 @@ public: ...@@ -277,59 +277,59 @@ public:
// If it holds an array type, cast the first value of the array // If it holds an array type, cast the first value of the array
// to the appropriate type. // to the appropriate type.
// Fail if it holds a VTK object which is not an array. // Fail if it holds a VTK object which is not an array.
float ToFloat(bool* valid) const; float ToFloat(bool valid[1]) const;
float ToFloat() const { float ToFloat() const {
return this->ToFloat(0); }; return this->ToFloat(0); };
double ToDouble(bool* valid) const; double ToDouble(bool valid[1]) const;
double ToDouble() const { double ToDouble() const {
return this->ToDouble(0); }; return this->ToDouble(0); };
char ToChar(bool* valid) const; char ToChar(bool valid[1]) const;
char ToChar() const { char ToChar() const {
return this->ToChar(0); }; return this->ToChar(0); };
unsigned char ToUnsignedChar(bool* valid) const; unsigned char ToUnsignedChar(bool valid[1]) const;
unsigned char ToUnsignedChar() const { unsigned char ToUnsignedChar() const {
return this->ToUnsignedChar(0); }; return this->ToUnsignedChar(0); };
signed char ToSignedChar(bool* valid) const; signed char ToSignedChar(bool valid[1]) const;
signed char ToSignedChar() const { signed char ToSignedChar() const {
return this->ToSignedChar(0); }; return this->ToSignedChar(0); };
short ToShort(bool* valid) const; short ToShort(bool valid[1]) const;
short ToShort() const { short ToShort() const {
return this->ToShort(0); }; return this->ToShort(0); };
unsigned short ToUnsignedShort(bool* valid) const; unsigned short ToUnsignedShort(bool valid[1]) const;
unsigned short ToUnsignedShort() const { unsigned short ToUnsignedShort() const {
return this->ToUnsignedShort(0); }; return this->ToUnsignedShort(0); };
int ToInt(bool* valid) const; int ToInt(bool valid[1]) const;
int ToInt() const { int ToInt() const {
return this->ToInt(0); }; return this->ToInt(0); };
unsigned int ToUnsignedInt(bool* valid) const; unsigned int ToUnsignedInt(bool valid[1]) const;
unsigned int ToUnsignedInt() const { unsigned int ToUnsignedInt() const {
return this->ToUnsignedInt(0); }; return this->ToUnsignedInt(0); };
long ToLong(bool* valid) const; long ToLong(bool valid[1]) const;
long ToLong() const { long ToLong() const {
return this->ToLong(0); }; return this->ToLong(0); };
unsigned long ToUnsignedLong(bool* valid) const; unsigned long ToUnsignedLong(bool valid[1]) const;
unsigned long ToUnsignedLong() const { unsigned long ToUnsignedLong() const {
return this->ToUnsignedLong(0); }; return this->ToUnsignedLong(0); };
#if defined(VTK_TYPE_USE___INT64) #if defined(VTK_TYPE_USE___INT64)
__int64 To__Int64(bool* valid) const; __int64 To__Int64(bool valid[1]) const;
__int64 To__Int64() const { __int64 To__Int64() const {
return this->To__Int64(0); }; return this->To__Int64(0); };
unsigned __int64 ToUnsigned__Int64(bool* valid) const; unsigned __int64 ToUnsigned__Int64(bool valid[1]) const;
unsigned __int64 ToUnsigned__Int64() const { unsigned __int64 ToUnsigned__Int64() const {
return this->ToUnsigned__Int64(0); }; return this->ToUnsigned__Int64(0); };
#endif #endif
long long ToLongLong(bool* valid) const; long long ToLongLong(bool valid[1]) const;
long long ToLongLong() const { long long ToLongLong() const {
return this->ToLongLong(0); }; return this->ToLongLong(0); };
unsigned long long ToUnsignedLongLong(bool* valid) const; unsigned long long ToUnsignedLongLong(bool valid[1]) const;
unsigned long long ToUnsignedLongLong() const { unsigned long long ToUnsignedLongLong() const {
return this->ToUnsignedLongLong(0); }; return this->ToUnsignedLongLong(0); };
#endif #endif
vtkTypeInt64 ToTypeInt64(bool* valid) const; vtkTypeInt64 ToTypeInt64(bool valid[1]) const;
vtkTypeInt64 ToTypeInt64() const { vtkTypeInt64 ToTypeInt64() const {
return this->ToTypeInt64(0); }; return this->ToTypeInt64(0); };
vtkTypeUInt64 ToTypeUInt64(bool* valid) const; vtkTypeUInt64 ToTypeUInt64(bool valid[1]) const;
vtkTypeUInt64 ToTypeUInt64() const { vtkTypeUInt64 ToTypeUInt64() const {
return this->ToTypeUInt64(0); }; return this->ToTypeUInt64(0); };
...@@ -343,7 +343,7 @@ public: ...@@ -343,7 +343,7 @@ public:
template <typename T> template <typename T>
T ToNumeric(bool* valid, T* vtkNotUsed(ignored)) const; T ToNumeric(bool valid[1], T* vtkNotUsed(ignored)) const;
// Description: // Description:
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