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

COMP: remove BTX/ETX from vtkStdString and vtkUnicodeString

The wrappers recognize vtkStdString and vtkUnicodeString,
so remove the BTX/ETX from methods that use these types.
parent 9ab41933
......@@ -202,7 +202,6 @@ public:
// Draw the supplied image at the given x, y location (bottom corner).
void DrawImage(float x, float y, vtkImageData *image);
//BTX
// Description:
// Draw some text to the screen in a bounding rectangle with the alignment
// of the text properties respecting the rectangle. The points should be
......@@ -213,11 +212,9 @@ public:
// Draw some text to the screen.
void DrawString(vtkPoints2D *point, const vtkStdString &string);
void DrawString(float x, float y, const vtkStdString &string);
//ETX
void DrawString(vtkPoints2D *point, const char *string);
void DrawString(float x, float y, const char *string);
//BTX
// Description:
// Compute the bounds of the supplied string. The bounds will be copied to the
// supplied bounds variable, the first two elements are the bottom corner of
......@@ -226,7 +223,6 @@ public:
// NOTE: This function does not take account of the text rotation.
void ComputeStringBounds(const vtkStdString &string, vtkPoints2D *bounds);
void ComputeStringBounds(const vtkStdString &string, float bounds[4]);
//ETX
void ComputeStringBounds(const char *string, float bounds[4]);
// Description:
......
......@@ -82,7 +82,6 @@ public:
virtual void DrawEllipticArc(float x, float y, float rX, float rY,
float startAngle, float stopAngle)=0;
//BTX
// Description:
// Draw some text to the screen.
virtual void DrawString(float *point, vtkTextProperty *tprop,
......@@ -97,7 +96,6 @@ public:
virtual void ComputeStringBounds(const vtkStdString &string,
vtkTextProperty *tprop,
float bounds[4]) = 0;
//ETX
// Description:
// Draw the supplied image at the given x, y (p[0], p[1]) location(s) (bottom corner).
......
......@@ -85,7 +85,6 @@ public:
float startAngle, float stopAngle);
//BTX
// Description:
// Draw some text to the screen!
virtual void DrawString(float *point, vtkTextProperty *tprop,
......@@ -100,7 +99,6 @@ public:
virtual void ComputeStringBounds(const vtkStdString &string,
vtkTextProperty *tprop,
float bounds[4]);
//ETX
// Description:
// Draw the supplied image at the given x, y (p[0], p[1]) location(s) (bottom corner).
......
......@@ -24,7 +24,7 @@
//
//
// .SECTION Caveats
//
//
// Wrapping support for the Set/Get/Insert methods is a little
// strange. The Tcl/Python/Java wrappers treat vtkStdString as const
// char * right now instead of dealing with native strings. This is
......@@ -54,7 +54,7 @@ public:
void PrintSelf(ostream& os, vtkIndent indent);
//
//
//
// Functions required by vtkAbstractArray
//
//
......@@ -64,7 +64,7 @@ public:
int GetDataType()
{ return VTK_STRING; }
int IsNumeric() { return 0; }
int IsNumeric() { return 0; }
// Description:
// Release storage and reset array to initial state.
......@@ -89,24 +89,24 @@ public:
// Description:
// Set the tuple at the ith location using the jth tuple in the source array.
// This method assumes that the two arrays have the same type
// and structure. Note that range checking and memory allocation is not
// and structure. Note that range checking and memory allocation is not
// performed; use in conjunction with SetNumberOfTuples() to allocate space.
virtual void SetTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source);
// Description:
// Insert the jth tuple in the source array, at ith location in this array.
// Insert the jth tuple in the source array, at ith location in this array.
// Note that memory allocation is performed as necessary to hold the data.
virtual void InsertTuple(vtkIdType i, vtkIdType j, vtkAbstractArray* source);
// Description:
// Insert the jth tuple in the source array, at the end in this array.
// Insert the jth tuple in the source array, at the end in this array.
// Note that memory allocation is performed as necessary to hold the data.
// Returns the location at which the data was inserted.
virtual vtkIdType InsertNextTuple(vtkIdType j, vtkAbstractArray* source);
// Description:
// Set the ith tuple in this array as the interpolated tuple value,
// given the ptIndices in the source array and associated
// given the ptIndices in the source array and associated
// interpolation weights.
// This method assumes that the two arrays are of the same type
// and strcuture.
......@@ -114,14 +114,14 @@ public:
vtkAbstractArray* source, double* weights);
// Description
// Insert the ith tuple in this array as interpolated from the two values,
// p1 and p2, and an interpolation factor, t.
// The interpolation factor ranges from (0,1),
// with t=0 located at p1. This method assumes that the three arrays are of
// Insert the ith tuple in this array as interpolated from the two values,
// p1 and p2, and an interpolation factor, t.
// The interpolation factor ranges from (0,1),
// with t=0 located at p1. This method assumes that the three arrays are of
// the same type. p1 is value at index id1 in source1, while, p2 is
// value at index id2 in source2.
virtual void InterpolateTuple(vtkIdType i,
vtkIdType id1, vtkAbstractArray* source1,
virtual void InterpolateTuple(vtkIdType i,
vtkIdType id1, vtkAbstractArray* source1,
vtkIdType id2, vtkAbstractArray* source2, double t);
// Description:
......@@ -158,11 +158,11 @@ public:
void SetValue(vtkIdType id, const char *value);
// Description:
// Set the number of tuples (a component group) in the array. Note that
// Set the number of tuples (a component group) in the array. Note that
// this may allocate space depending on the number of components.
virtual void SetNumberOfTuples(vtkIdType number)
{ this->SetNumberOfValues(this->NumberOfComponents* number); }
// Description:
// Specify the number of values for this object to hold. Does an
// allocation as well as setting the MaxId ivar. Used in conjunction with
......@@ -174,16 +174,16 @@ public:
int GetNumberOfElementComponents() { return 0; }
int GetElementComponentSize() { return static_cast<int>(sizeof(vtkStdString::value_type)); }
//BTX
// Description:
// Insert data at a specified position in the array.
//BTX
void InsertValue(vtkIdType id, vtkStdString f);
//ETX
void InsertValue(vtkIdType id, const char *val);
// Description:
// Insert a value into the array from a variant.
void InsertVariantValue(vtkIdType idx, vtkVariant value);
void InsertValue(vtkIdType id, const char *val);
// Description:
// Insert data at the end of the array. Return its location in the array.
......@@ -222,7 +222,7 @@ public:
// from deleting the array when it cleans up or reallocates memory.
// The class uses the actual array provided; it does not copy the data
// from the suppled array. If save is 0, then this class is free to delete
// the array when it cleans up or reallocates. In that case, it is required
// the array when it cleans up or reallocates. In that case, it is required
// that the array was allocated using the C++ new operator (and not malloc).
void SetArray(vtkStdString* array, vtkIdType size, int save);
virtual void SetVoidArray(void* array, vtkIdType size, int save)
......@@ -233,8 +233,8 @@ public:
// Return the memory in kilobytes consumed by this data array. Used to
// support streaming and reading/writing data. The value returned is
// guaranteed to be greater than or equal to the memory required to
// actually represent the data represented by this object. The
// information returned is valid only after the pipeline has
// actually represent the data represented by this object. The
// information returned is valid only after the pipeline has
// been updated.
//
// This function takes into account the size of the contents of the
......@@ -250,18 +250,18 @@ public:
// for the data can be computed by GetDataSize() * GetDataTypeSize().
// The size computation includes the string termination character for each string.
virtual vtkIdType GetDataSize();
//BTX
// Description:
// Return the indices where a specific value appears.
virtual vtkIdType LookupValue(vtkVariant value);
virtual void LookupValue(vtkVariant value, vtkIdList* ids);
//BTX
vtkIdType LookupValue(vtkStdString value);
void LookupValue(vtkStdString value, vtkIdList* ids);
//ETX
//ETX
vtkIdType LookupValue(const char* value);
void LookupValue(const char* value, vtkIdList* ids);
// Description:
// Tell the array explicitly that the data has changed.
// This is only necessary to call when you modify the array contents
......@@ -274,15 +274,15 @@ public:
// Description:
// Tell the array explicitly that a single data element has
// changed. Like DataChanged(), then is only necessary when you
// modify the array contents without using the array's API.
// modify the array contents without using the array's API.
virtual void DataElementChanged(vtkIdType id);
// Description:
// Delete the associated fast lookup data structure on this array,
// if it exists. The lookup will be rebuilt on the next call to a lookup
// function.
virtual void ClearLookup();
protected:
vtkStringArray(vtkIdType numComp=1);
~vtkStringArray();
......@@ -295,7 +295,7 @@ protected:
private:
vtkStringArray(const vtkStringArray&); // Not implemented.
void operator=(const vtkStringArray&); // Not implemented.
//BTX
vtkStringArrayLookup* Lookup;
void UpdateLookup();
......
......@@ -2,7 +2,7 @@
Program: Visualization Toolkit
Module: vtkUnicodeStringArray.h
-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
......@@ -53,8 +53,8 @@ public:
virtual void DeepCopy(vtkAbstractArray* da);
virtual void InterpolateTuple(vtkIdType i, vtkIdList *ptIndices,
vtkAbstractArray* source, double* weights);
virtual void InterpolateTuple(vtkIdType i,
vtkIdType id1, vtkAbstractArray* source1,
virtual void InterpolateTuple(vtkIdType i,
vtkIdType id1, vtkAbstractArray* source1,
vtkIdType id2, vtkAbstractArray* source2, double t);
virtual void Squeeze();
virtual int Resize(vtkIdType numTuples);
......@@ -70,17 +70,15 @@ public:
virtual void DataChanged();
virtual void ClearLookup();
//BTX
vtkIdType InsertNextValue(const vtkUnicodeString&);
void InsertValue(vtkIdType idx, const vtkUnicodeString&); // Ranged checked
void SetValue(vtkIdType i, const vtkUnicodeString&); // Not ranged checked
vtkUnicodeString& GetValue(vtkIdType i);
//ETX
void InsertNextUTF8Value(const char*);
void SetUTF8Value(vtkIdType i, const char*);
const char* GetUTF8Value(vtkIdType i);
protected:
vtkUnicodeStringArray(vtkIdType numComp = 1);
~vtkUnicodeStringArray();
......
......@@ -68,7 +68,6 @@ public:
// so that the user is responsible for deleting the string.
char *RegisterAndGetOutputString();
//BTX
// Description:
// Internal method: Returns the "string" with the "StringDelimiter" if
// UseStringDelimiter is true.
......@@ -93,11 +92,12 @@ protected:
char* FieldDelimiter;
char* StringDelimiter;
bool UseStringDelimiter;
//BTX
ostream* Stream;
//ETX
private:
vtkDelimitedTextWriter(const vtkDelimitedTextWriter&); // Not implemented.
void operator=(const vtkDelimitedTextWriter&); // Not implemented.
//ETX
};
......
......@@ -119,9 +119,8 @@ public:
// Description:
// Bind a string value by specifying an array and a size
bool BindParameter(int index, const char *stringValue, size_t length);
//BTX
bool BindParameter(int index, const vtkStdString &string);
//ETX
// Description:
// Bind a blob value. Not all databases support blobs as a data
// type. Check vtkSQLDatabase::IsSupported(VTK_SQL_FEATURE_BLOB) to
......@@ -129,11 +128,9 @@ public:
bool BindParameter(int index, const void *data, size_t length);
bool ClearParameterBindings();
//BTX
// Description:
// Escape a string for use in a query
virtual vtkStdString EscapeString( vtkStdString src, bool addSurroundingQuotes = true );
//ETX
protected:
vtkMySQLQuery();
......
......@@ -128,9 +128,7 @@ public:
// Description:
// Bind a string value by specifying an array and a size
bool BindParameter(int index, const char *stringValue, size_t length);
//BTX
bool BindParameter(int index, const vtkStdString &string);
//ETX
// Description:
// Bind a blob value. Not all databases support blobs as a data
// type. Check vtkSQLDatabase::IsSupported(VTK_SQL_FEATURE_BLOB) to
......
......@@ -221,9 +221,7 @@ public:
void SetRefresh() { this->Refresh = true; this->Modified(); }
void SetParent(vtkOpenFOAMReader *parent) { this->Parent = parent; }
//BTX
int MakeInformationVector(vtkInformationVector *, const vtkStdString &);
//ETX
bool SetTimeValue(const double);
vtkDoubleArray *GetTimeValues();
int MakeMetaDataAtTimeStep(const bool);
......
......@@ -90,11 +90,9 @@ public:
// Get the last error text from the query
const char* GetLastErrorText();
//BTX
// Description:
// Escape a string for inclusion into an SQL query
virtual vtkStdString EscapeString( vtkStdString s, bool addSurroundingQuotes = true );
//ETX
// Description:
// Unlike some databases, Postgres can tell you right away how many
......
......@@ -112,7 +112,7 @@ public:
// You are responsible for making sure that the types match when you
// call BindParameter. You don't have to get it precisely correct:
// in general, the SQL driver is smart enough to do things like cast
// a short to a long or a float to a double.
// a short to a long or a float to a double.
//
// Bound parameters were introduced in ANSI SQL 92. Please see that
// standard for more information.
......@@ -164,7 +164,6 @@ public:
// Reset all parameter bindings to NULL.
virtual bool ClearParameterBindings();
//BTX
// Description:
// Escape a string for inclusion into an SQL query.
// If \a addSurroundingQuotes is true, then quotation marks appropriate to the
......@@ -174,8 +173,9 @@ public:
// A default, simple-minded implementation is provided for
// database backends that do not provde a way to escape
// strings for use inside queries.
//BTX
virtual vtkStdString EscapeString( vtkStdString s, bool addSurroundingQuotes = true );
//ETX
//ETX
// Description:
// Escape a string for inclusion into an SQL query.
......
......@@ -58,7 +58,6 @@ public:
// breadth first search 'origin' vertex.
void SetOriginVertex(vtkIdType index);
//BTX
// Description:
// Set the breadth first search 'origin' vertex.
// This method is basically the same as above
......@@ -66,7 +65,6 @@ public:
// an array name and value, instead of having to
// know the specific index of the vertex.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
//ETX
// Description:
// Convenience method for setting the origin vertex
......
......@@ -50,7 +50,6 @@ public:
// breadth first search 'origin' vertex.
void SetOriginVertex(vtkIdType index);
//BTX
// Description:
// Set the breadth first search 'origin' vertex.
// This method is basically the same as above
......@@ -58,7 +57,6 @@ public:
// an array name and value, instead of having to
// know the specific index of the vertex.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
//ETX
// Description:
// Stores the graph vertex ids for the tree vertices in an array
......
......@@ -68,7 +68,6 @@ public:
// minimum spanning tree 'origin' vertex.
void SetOriginVertex(vtkIdType index);
//BTX
// Description:
// Set the minimum spanning tree 'origin' vertex.
// This method is basically the same as above
......@@ -76,7 +75,6 @@ public:
// an array name and value, instead of having to
// know the specific index of the vertex.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
//ETX
// Description:
// Stores the graph vertex ids for the tree vertices in an array
......
......@@ -25,7 +25,7 @@
#include "vtkUnicodeString.h" // Needed for vtkUnicodeString
#include "vtkStdString.h" // Needed for vtkStdString
// .NAME vtkDelimitedTextReader - reads in delimited ascii or unicode text files
// .NAME vtkDelimitedTextReader - reads in delimited ascii or unicode text files
// and outputs a vtkTable data structure.
//
// .SECTION Description
......@@ -34,11 +34,11 @@
//
// The behavior of the reader with respect to ascii or unicode input is controlled
// by the SetUnicodeCharacterSet() method. By default (without calling SetUnicodeCharacterSet()),
// the reader will expect to read ascii text and will output vtkStdString columns. Use
// the Set and Get methods to set delimiters that do not contain UTF8 in the name when operating
// the reader in default ascii mode. If the SetUnicodeCharacterSet() method is called, the reader
// will output vtkUnicodeString columns in the output table. In addition, it is necessary to use
// the Set and Get methods that contain UTF8 in the name to specify delimiters when operating in
// the reader will expect to read ascii text and will output vtkStdString columns. Use
// the Set and Get methods to set delimiters that do not contain UTF8 in the name when operating
// the reader in default ascii mode. If the SetUnicodeCharacterSet() method is called, the reader
// will output vtkUnicodeString columns in the output table. In addition, it is necessary to use
// the Set and Get methods that contain UTF8 in the name to specify delimiters when operating in
// unicode mode.
//
// This class emits ProgressEvent for every 100 lines it reads.
......@@ -46,7 +46,7 @@
// .SECTION Thanks
// Thanks to Andy Wilson, Brian Wylie, Tim Shead, and Thomas Otahal
// from Sandia National Laboratories for implementing this class.
//
//
// .SECTION Caveats
//
// This reader assumes that the first line in the file (whether that's
......@@ -84,10 +84,8 @@ public:
// to "\r\n".
void SetUTF8RecordDelimiters(const char* delimiters);
const char* GetUTF8RecordDelimiters();
//BTX
void SetUnicodeRecordDelimiters(const vtkUnicodeString& delimiters);
vtkUnicodeString GetUnicodeRecordDelimiters();
//ETX
// Description:
// Specify the character(s) that will be used to separate fields. For
......@@ -100,11 +98,8 @@ public:
void SetUTF8FieldDelimiters(const char* delimiters);
const char* GetUTF8FieldDelimiters();
//BTX
void SetUnicodeFieldDelimiters(const vtkUnicodeString& delimiters);
vtkUnicodeString GetUnicodeFieldDelimiters();
//ETX
// Description:
// Get/set the character that will begin and end strings. Microsoft
......@@ -119,10 +114,8 @@ public:
void SetUTF8StringDelimiters(const char* delimiters);
const char* GetUTF8StringDelimiters();
//BTX
void SetUnicodeStringDelimiters(const vtkUnicodeString& delimiters);
vtkUnicodeString GetUnicodeStringDelimiters();
//ETX
// Description:
// Set/get whether to use the string delimiter. Defaults to on.
......@@ -188,8 +181,8 @@ protected:
~vtkDelimitedTextReader();
int RequestData(
vtkInformation*,
vtkInformationVector**,
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
char* FileName;
......
......@@ -143,7 +143,6 @@ public:
virtual void SetAssessNames( vtkStringArray* );
vtkGetObjectMacro(AssessNames,vtkStringArray);
//BTX
// Description:
// Set the name of a parameter of the Assess option
void SetAssessOptionParameter( vtkIdType id, vtkStdString name );
......@@ -152,6 +151,7 @@ public:
// Get the name of a parameter of the Assess option
vtkStdString GetAssessParameter( vtkIdType id );
//BTX
// Description:
// A base class for a functor that assesses data.
class AssessFunctor {
......
......@@ -22,7 +22,7 @@
//
// .SECTION Description
//
// This VTK class uses the Parallel BGL breadth_first_search
// This VTK class uses the Parallel BGL breadth_first_search
// generic algorithm to perform a breadth first search from a given
// a 'source' vertex on the input graph (a distributed vtkGraph).
//
......@@ -39,13 +39,13 @@
class vtkSelection;
class VTK_PARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
class VTK_PARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm
{
public:
static vtkPBGLBreadthFirstSearch *New();
vtkTypeMacro(vtkPBGLBreadthFirstSearch, vtkGraphAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Convenience methods for setting the origin selection input.
void SetOriginSelection(vtkSelection *s);
......@@ -55,11 +55,10 @@ public:
}
// Description:
// Set the index (into the vertex array) of the
// Set the index (into the vertex array) of the
// breadth first search 'origin' vertex.
void SetOriginVertex(vtkIdType index);
//BTX
// Description:
// Set the breadth first search 'origin' vertex.
// This method is basically the same as above
......@@ -67,7 +66,6 @@ public:
// an array name and value, instead of having to
// know the specific index of the vertex.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
//ETX
// Description:
// Convenience method for setting the origin vertex
......@@ -98,10 +96,10 @@ public:
vtkGetMacro(OutputSelection, bool);
vtkSetMacro(OutputSelection, bool);
vtkBooleanMacro(OutputSelection, bool);
// Description:
// Set the output selection type. The default is to use the
// the maximum distance from the starting vertex "MAX_DIST_FROM_ROOT".
// the maximum distance from the starting vertex "MAX_DIST_FROM_ROOT".
// But you can also specify other things like "ROOT","2D_MAX", etc
vtkSetStringMacro(OutputSelectionType);
......@@ -110,8 +108,8 @@ protected:
~vtkPBGLBreadthFirstSearch();
virtual int RequestData(
vtkInformation *,
vtkInformationVector **,
vtkInformation *,
vtkInformationVector **,
vtkInformationVector *);
virtual int FillInputPortInformation(
......@@ -119,7 +117,7 @@ protected:
virtual int FillOutputPortInformation(
int port, vtkInformation* info);
private:
vtkIdType OriginVertexIndex;
......@@ -129,7 +127,7 @@ private:
bool OutputSelection;
bool OriginFromSelection;
char* OutputSelectionType;
// Description:
// Using the convenience function internally
vtkSetStringMacro(InputArrayName);
......
......@@ -59,7 +59,6 @@ public:
// breadth first search 'origin' vertex.
void SetOriginVertex(vtkIdType index);
//BTX
// Description:
// Set the breadth first search 'origin' vertex.
// This method is basically the same as above
......@@ -67,7 +66,6 @@ public:
// an array name and value, instead of having to
// know the specific index of the vertex.
void SetOriginVertex(vtkStdString arrayName, vtkVariant value);
//ETX
// Description:
// Convenience method for setting the origin vertex
......
......@@ -44,7 +44,6 @@ class VTK_RENDERING_EXPORT vtkFreeTypeLabelRenderStrategy : public vtkLabelRende
virtual bool SupportsBoundedSize()
{ return false; }
//BTX