G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsXml.h File Reference

Provides declaration of input/output XML utilities struct. More...

+ Include dependency graph for gsXml.h:

Go to the source code of this file.

Namespaces

 gismo
 The G+Smo namespace, containing all definitions for the library.
 
 gismo::internal
 This namespace contains functionalities that are internal to the library.
 

Functions

gsXmlNode * anyByTag (const std::string &tag, gsXmlNode *root)
 Helper to get any object (by tag) if one exists in the XML tree.
 
void appendBoxTopology (const gsBoxTopology &topology, gsXmlNode *node, gsXmlTree &data)
 Appends a box topology into node, used for gsMultiPatch and gsMultiBasis.
 
int countByTag (const std::string &tag, gsXmlNode *root)
 
int countByTagType (const std::string &tag, const std::string &type, gsXmlNode *root)
 
gsXmlNode * firstByTag (const std::string &tag, gsXmlNode *root)
 
gsXmlNode * firstByTagType (const std::string &tag, const std::string &type, gsXmlNode *root)
 
template<class Object >
Object * getById (gsXmlNode *node, const int &id)
 
template<class Object >
Object * getByLabel (gsXmlNode *node, const std::string &label)
 
template<class T >
void getMatrixFromXml (gsXmlNode *node, unsigned const &rows, unsigned const &cols, gsMatrix< T > &result, const std::string &base_type_flag="ascii")
 Helper to fetch matrices.
 
template<class T >
void getSparseEntriesFromXml (gsXmlNode *node, gsSparseEntries< T > &result)
 Helper to fetch sparse entries.
 
gsXmlAttribute * makeAttribute (const std::string &name, const std::string &value, gsXmlTree &data)
 Helper to allocate XML attribute.
 
gsXmlAttribute * makeAttribute (const std::string &name, const unsigned &value, gsXmlTree &data)
 Helper to allocate XML attribute with unsigned int value.
 
gsXmlNode * makeComment (const std::string &, gsXmlTree &data)
 Helper to create an XML comment node.
 
gsXmlNode * makeNode (const std::string &name, gsXmlTree &data)
 Helper to allocate XML node.
 
gsXmlNode * makeNode (const std::string &name, const std::string &value, gsXmlTree &data)
 Helper to allocate XML node with value.
 
template<class T >
gsXmlNode * makeNode (const std::string &name, const gsMatrix< T > &value, gsXmlTree &data, bool transposed=false)
 Helper to allocate XML node with gsMatrix value.
 
char * makeValue (const std::string &value, gsXmlTree &data)
 Helper to allocate XML value.
 
template<class T >
char * makeValue (const gsMatrix< T > &value, gsXmlTree &data, bool transposed)
 Helper to allocate matrix in XML pool.
 
template<class T >
gsXmlNode * putMatrixToXml (gsMatrix< T > const &mat, gsXmlTree &data, std::string name="Matrix")
 Helper to insert matrices into XML.
 
template<class T >
gsXmlNode * putSparseMatrixToXml (gsSparseMatrix< T > const &mat, gsXmlTree &data, std::string name="SparseMatrix")
 Helper to insert sparse matrices into XML.
 
gsXmlNode * searchId (const int id, gsXmlNode *root, const char *tag_name=NULL, const bool print_warning=true)
 
gsXmlNode * searchNode (gsXmlNode *root, const std::string &attr_name, const std::string &value, const char *tag_name=NULL)
 
std::string to_string (const unsigned &i)
 Helper to convert small unsigned to string.
 

Detailed Description

Provides declaration of input/output XML utilities struct.

This file is part of the G+Smo library.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Author(s): A. Mantzaflaris