43 #include "vtkObjectFactory.h"
44 #include "vtkSmartPointer.h"
45 #include "vtkXMLDataElement.h"
48 #include "vtkXMLUtilities.h"
53 class vtkXMLMaterialParserInternals
56 typedef std::vector<vtkSmartPointer<vtkXMLDataElement>> VectorOfElements;
57 VectorOfElements Stack;
70 this->
Internals =
new vtkXMLMaterialParserInternals;
83 return this->Superclass::Parse(str);
89 return this->Superclass::Parse(str, length);
96 return this->Superclass::Parse();
102 int ret = this->Superclass::InitializeParser();
114 element->SetName(name);
115 element->SetXMLByteIndex(this->GetXMLByteIndex());
116 vtkXMLUtilities::ReadElementFromAttributeArray(element, atts, VTK_ENCODING_NONE);
117 const char *
id = element->GetAttribute(
"id");
122 this->
Internals->Stack.push_back(element);
129 vtkXMLDataElement *finished = this->
Internals->Stack.back().GetPointer();
130 int prev_pos =
static_cast<int>(this->
Internals->Stack.size()) - 2;
133 this->
Internals->Stack[prev_pos].GetPointer()->AddNestedElement(finished);
148 vtkXMLDataElement *elem = this->
Internals->Stack.back().GetPointer();
149 elem->AddCharacterData(inData, inLength);
163 this->Superclass::PrintSelf(os, indent);
164 os << indent <<
"Material: ";
vtkXMLMaterialParserInternals * Internals
virtual void CharacterDataHandler(const char *data, int length) override
virtual void EndElement(const char *) override
void SetMaterial(vtkXMLMaterial *)
static vtkXMLMaterial * New()
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void StartElement(const char *name, const char **atts) override
vtkCxxSetObjectMacro(vtkXMLMaterialParser, Material, vtkXMLMaterial)
virtual int InitializeParser() override
virtual int Parse() override
vtkXMLMaterial * Material
void SetRootElement(vtkXMLDataElement *)
void PrintSelf(ostream &os, vtkIndent indent) override
vtkStandardNewMacro(vtkXMLMaterialParser)
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.