KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
xml_ostream_writer.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Suneth Warnakulasuriya
11 //
12 
13 #pragma once
14 
15 // System includes
16 #include <string>
17 #include <vector>
18 
19 // Project includes
20 #include "includes/define.h"
23 
24 namespace Kratos {
25 
28 
29 /* @class XmlOStreamWriter
30  * @ingroup KratosCore
31  * @brief Output stream writer for XML format.
32  * @author Suneth Warnakulasuriya
33  */
34 class KRATOS_API(KRATOS_CORE) XmlOStreamWriter
35 {
36 public:
39 
40  using IndexType = std::size_t;
41 
45 
50  XmlOStreamWriter(std::ostream& rOStream);
51 
52  virtual ~XmlOStreamWriter() = default;
53 
57 
63  void WriteElement(
64  const XmlExpressionElement& rElement,
65  const IndexType Level = 0);
66 
68 
69 protected:
72 
73  std::ostream& mrOStream;
74 
78 
85  virtual void WriteExpressions(
86  const std::vector<Expression::ConstPointer>& rExpressions,
87  const std::string& rTabbing) = 0;
88 
90 };
91 
92 } // namespace Kratos
Definition: xml_expression_element.h:28
Definition: xml_ostream_writer.h:35
virtual ~XmlOStreamWriter()=default
virtual void WriteExpressions(const std::vector< Expression::ConstPointer > &rExpressions, const std::string &rTabbing)=0
Writes generic lazy type expressions.
std::ostream & mrOStream
Definition: xml_ostream_writer.h:73
std::size_t IndexType
Definition: xml_ostream_writer.h:40
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21