/usr/include/paraview/vtkXMLCollectionReader.h is in paraview-dev 5.0.1+dfsg1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | /*=========================================================================
Program: ParaView
Module: vtkXMLCollectionReader.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkXMLCollectionReader - Read a file wrapping many other XML files.
// .SECTION Description
// vtkXMLCollectionReader will read a "Collection" VTKData XML file.
// This file format references an arbitrary number of other XML data
// sets. Each referenced data set has a list of associated
// attribute/value pairs. One may use the SetRestriction method to
// set requirements on attribute's values. Only those data sets in
// the file matching the restrictions will be read. Each matching
// data set becomes an output of this reader in the order in which
// they appear in the file.
#ifndef vtkXMLCollectionReader_h
#define vtkXMLCollectionReader_h
#include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
#include "vtkXMLReader.h"
class vtkXMLCollectionReaderInternals;
class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkXMLCollectionReader : public vtkXMLReader
{
public:
static vtkXMLCollectionReader* New();
vtkTypeMacro(vtkXMLCollectionReader,vtkXMLReader);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Get/Set the required value for a particular named attribute.
// Only data sets matching this value will be read. A NULL value or
// empty string will disable any restriction from the given
// attribute.
virtual void SetRestriction(const char* name, const char* value);
virtual const char* GetRestriction(const char* name);
// Description:
// Get/set the required value for a particular named attribute. The
// value should be referenced by its index. Only data sets matching
// this value will be read. An out-of-range index will remove the
// restriction.
// Make sure to call UpdateInformation() before using these methods.
virtual void SetRestrictionAsIndex(const char* name, int index);
virtual int GetRestrictionAsIndex(const char* name);
// Description:
// Get the number of distinct attribute values present in the file.
// Valid after UpdateInformation.
int GetNumberOfAttributes();
// Description:
// Get the name of an attribute. The order of attributes with
// respect to the index is not specified, but will be the same every
// time the same instance of the reader reads the same input file.
const char* GetAttributeName(int attribute);
// Description:
// Get the index of the attribute with the given name. Returns -1
// if no such attribute exists.
int GetAttributeIndex(const char* name);
// Description:
// Get the number of distinct values for the given attribute.
int GetNumberOfAttributeValues(int attribute);
// Description:
// Get one of the possible values for a given attribute. The order
// of values for the attribute with respect to the index is not
// specified, but will be the same every time the same instance of
// the reader reads the same input file.
const char* GetAttributeValue(int attribute, int index);
const char* GetAttributeValue(const char* name, int index);
// Description:
// Get the index of the attribute value with the given name. Returns -1
// if no such attribute or value exists.
int GetAttributeValueIndex(int attribute, const char* value);
int GetAttributeValueIndex(const char* name, const char* value);
// Description:
// Get the vtkXMLDataElement representing the collection element
// corresponding to the output with the given index. Valid when a
// FileName has been set. May change when Restriction settings are
// changed.
vtkXMLDataElement* GetOutputXMLDataElement(int index);
// Description:
// If ForceOutputTypeToMultiBlock is set to 1, the output of this reader
// will always be a multi-block dataset, even if there is 1 simple output.
vtkSetMacro(ForceOutputTypeToMultiBlock, int);
vtkGetMacro(ForceOutputTypeToMultiBlock, int);
vtkBooleanMacro(ForceOutputTypeToMultiBlock, int);
protected:
vtkXMLCollectionReader();
~vtkXMLCollectionReader();
void BuildRestrictedDataSets();
bool InternalForceMultiBlock;
int ForceOutputTypeToMultiBlock;
// Get the name of the data set being read.
virtual const char* GetDataSetName();
virtual int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
virtual int FillOutputPortInformation(int, vtkInformation* info);
vtkDataObject* SetupOutput(const char* filePath, int index);
virtual int RequestDataObject(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector);
// Overload of vtkXMLReader function, so we can handle updating the
// information on multiple outputs
virtual int RequestInformation(vtkInformation *request,
vtkInformationVector **inputVector, vtkInformationVector *outputVector);
// Setup the output with no data available. Used in error cases.
virtual void SetupEmptyOutput();
void ReadXMLData();
void ReadXMLDataImpl();
// Callback registered with the InternalProgressObserver.
static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void*,
void*);
// Progress callback from XMLParser.
virtual void InternalProgressCallback();
// The observer to report progress from the internal readers.
vtkCallbackCommand* InternalProgressObserver;
// Internal implementation details.
vtkXMLCollectionReaderInternals* Internal;
void AddAttributeNameValue(const char* name, const char* value);
virtual void SetRestrictionImpl(const char* name,
const char* value,
bool doModify);
void ReadAFile(int index,
int updatePiece,
int updateNumPieces,
int updateGhostLevels,
vtkDataObject* actualOutput);
private:
vtkXMLCollectionReader(const vtkXMLCollectionReader&); // Not implemented.
void operator=(const vtkXMLCollectionReader&); // Not implemented.
int CurrentOutput;
};
#endif
|