Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkXMLFileReadTester Class Reference

`#include <vtkXMLFileReadTester.h>`

Inheritance diagram for vtkXMLFileReadTester:

[legend]
Collaboration diagram for vtkXMLFileReadTester:

[legend]
List of all members.

## Detailed Description

Utility class for vtkXMLReader and subclasses.

Date:
  2002/10/16 18:23:06

Revision:
  1.1

vtkXMLFileReadTester reads the smallest part of a file necessary to determine whether it is a VTK XML file. If so, it extracts the file type and version number.

Created by:
  - King, Brad

CVS contributions (if > 5%):
  - King, Brad (100%)

CVS logs (CVSweb):
  - .`h` (`/IO/vtkXMLFileReadTester.h)`
  - .`cxx` (`/IO/vtkXMLFileReadTester.cxx)`

Definition at line 42 of file vtkXMLFileReadTester.h.

## Public Types
typedef vtkXMLParser | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
int | TestReadFile ()
virtual void | SetFileName (const char *)
virtual char * | GetFileName ()
virtual char * | GetFileDataType ()
virtual char * | GetFileVersion ()
## Static Public Methods
int | IsTypeOf (const char *type)
vtkXMLFileReadTester * | SafeDownCast (vtkObject *o)
vtkXMLFileReadTester * | New ()
## Protected Methods
| vtkXMLFileReadTester ()
| ~vtkXMLFileReadTester ()
void | StartElement (const char *name, const char **atts)
int | ParsingComplete ()
void | ReportStrayAttribute (const char *, const char *, const char *)
void | ReportMissingAttribute (const char *, const char *)
void | ReportBadAttribute (const char *, const char *, const char *)
void | ReportUnknownElement (const char *)
void | ReportXmlParseError ()
virtual void | SetFileDataType (const char *)
virtual void | SetFileVersion (const char *)
## Protected Attributes
char * | FileName
char * | FileDataType
char * | FileVersion
int | Done

## Member Typedef Documentation

typedef vtkXMLParser vtkXMLFileReadTester::Superclass

| Reimplemented from vtkXMLParser. Definition at line 45 of file vtkXMLFileReadTester.h.

## Constructor & Destructor Documentation

vtkXMLFileReadTester::vtkXMLFileReadTester | ( |  | ) | `[protected]`

vtkXMLFileReadTester::~vtkXMLFileReadTester | ( |  | ) | `[protected]`

## Member Function Documentation

virtual const char* vtkXMLFileReadTester::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkXMLParser.

int vtkXMLFileReadTester::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkXMLParser.

virtual int vtkXMLFileReadTester::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkXMLParser.

vtkXMLFileReadTester* vtkXMLFileReadTester::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkXMLParser.

void vtkXMLFileReadTester::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkXMLParser.

vtkXMLFileReadTester* vtkXMLFileReadTester::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkXMLParser.

int vtkXMLFileReadTester::TestReadFile | ( |  | ) |

| Try to read the file given by FileName. Returns 1 if the file is a VTK XML file, and 0 otherwise.

virtual void vtkXMLFileReadTester::SetFileName | ( | const char * |  | ) | `[virtual]`

| Get/Set the name of the file tested by TestReadFile(). Reimplemented from vtkXMLParser.

virtual char* vtkXMLFileReadTester::GetFileName | ( |  | ) | `[virtual]`

| Get/Set the name of the file tested by TestReadFile(). Reimplemented from vtkXMLParser.

virtual char* vtkXMLFileReadTester::GetFileDataType | ( |  | ) | `[virtual]`

| Get the data type of the XML file tested. If the file could not be read, returns NULL.

virtual char* vtkXMLFileReadTester::GetFileVersion | ( |  | ) | `[virtual]`

| Get the file version of the XML file tested. If the file could not be read, returns NULL.

void vtkXMLFileReadTester::StartElement | ( | const char * | name,
|  | const char ** | atts
| ) | `[protected, virtual]`

| Reimplemented from vtkXMLParser.

int vtkXMLFileReadTester::ParsingComplete | ( |  | ) | `[protected, virtual]`

| Reimplemented from vtkXMLParser.

void vtkXMLFileReadTester::ReportStrayAttribute | ( | const char * | ,
|  | const char * | ,
|  | const char * |
| ) | `[inline, protected, virtual]`

| Reimplemented from vtkXMLParser. Definition at line 77 of file vtkXMLFileReadTester.h.

void vtkXMLFileReadTester::ReportMissingAttribute | ( | const char * | ,
|  | const char * |
| ) | `[inline, protected, virtual]`

| Reimplemented from vtkXMLParser. Definition at line 78 of file vtkXMLFileReadTester.h.

void vtkXMLFileReadTester::ReportBadAttribute | ( | const char * | ,
|  | const char * | ,
|  | const char * |
| ) | `[inline, protected, virtual]`

| Reimplemented from vtkXMLParser. Definition at line 79 of file vtkXMLFileReadTester.h.

void vtkXMLFileReadTester::ReportUnknownElement | ( | const char * |  | ) | `[inline, protected, virtual]`

| Reimplemented from vtkXMLParser. Definition at line 80 of file vtkXMLFileReadTester.h.

void vtkXMLFileReadTester::ReportXmlParseError | ( |  | ) | `[inline, protected, virtual]`

| Reimplemented from vtkXMLParser. Definition at line 81 of file vtkXMLFileReadTester.h.

virtual void vtkXMLFileReadTester::SetFileDataType | ( | const char * |  | ) | `[protected, virtual]`

virtual void vtkXMLFileReadTester::SetFileVersion | ( | const char * |  | ) | `[protected, virtual]`

## Member Data Documentation

char* vtkXMLFileReadTester::FileName`[protected]`

| Reimplemented from vtkXMLParser. Definition at line 83 of file vtkXMLFileReadTester.h.

char* vtkXMLFileReadTester::FileDataType`[protected]`

| Definition at line 84 of file vtkXMLFileReadTester.h.

char* vtkXMLFileReadTester::FileVersion`[protected]`

| Definition at line 85 of file vtkXMLFileReadTester.h.

int vtkXMLFileReadTester::Done`[protected]`

| Definition at line 86 of file vtkXMLFileReadTester.h.

The documentation for this class was generated from the following file:

- IO/vtkXMLFileReadTester.h