template<class T>
class gismo::gsFileData< T >
This class represents an XML data tree which can be read from or written to a (file) stream.
|
template<class Object > |
void | add (const Object &obj, int id=-1) |
| Add the object to the Xml tree, same as <<, but also allows to set the XML id and label attributes.
|
|
void | addInclude (const std::string &filename, const real_t &time=-1., const index_t &id=-1, const std::string &label="") |
| Add a reference ( <xmlfile> tag ) to another Gismo .xml file to the xml tree. More...
|
|
void | addString (const std::string &s) |
| Add a string to the Xml tree.
|
|
void | addString (const std::string &s, const std::string &label) |
| Add a string to the Xml tree.
|
|
template<class Object > |
void | addWithLabel (const Object &obj, std::string label) |
| Add the object to the Xml tree, same as <<, but also allows to set the XML label attribute.
|
|
size_t | bufferSize () const |
| Returns the size of the data.
|
|
void | clear () |
| Clear all data.
|
|
String | contents () const |
| Lists the contents of the filedata.
|
|
template<class Object > |
int | count () const |
| Counts the number of Objects in the filedata.
|
|
void | dump (String const &fname="dump") const |
| Dump file contents to an xml file.
|
|
template<class Object > |
std::vector
< memory::unique_ptr< Object > > | getAll () const |
| Returns a vector with all Objects found in the XML data.
|
|
template<class Object > |
memory::unique_ptr< Object > | getAnyFirst () const |
|
template<class Object > |
bool | getAnyFirst (Object &result) const |
|
template<class Object > |
memory::unique_ptr< Object > | getFirst () const |
|
template<class Object > |
bool | getFirst (Object &result) const |
|
unsigned | getFloatPrecision () const |
|
template<class Object > |
memory::unique_ptr< Object > | getId (const int &id) const |
| Searches and fetches the Gismo object with a given id.
|
|
template<class Object > |
void | getId (const int &id, Object &result) const |
| Searches and fetches the Gismo object with a given id.
|
|
void | getIncludeById (gsFileData &res, index_t id) |
| Looks for a referenced Gismo .xml file ( <xmlfile> tag ) in the current xml tree, parses it in the gsFileData res object. More...
|
|
void | getIncludeByLabel (gsFileData &res, std::string label) |
| Looks for a referenced Gismo .xml file ( <xmlfile> tag ) in the current xml tree, parses it in the gsFileData res object. More...
|
|
void | getIncludeByTime (gsFileData &res, real_t time) |
| Looks for a referenced Gismo .xml file ( <xmlfile> tag ) in the current xml tree, parses it in the gsFileData res object. More...
|
|
template<class Object > |
memory::unique_ptr< Object > | getLabel (const std::string &name) const |
| Searches and fetches a poitner to a Gismo object with a given label.
|
|
template<class Object > |
void | getLabel (const std::string &name, Object &result) const |
| Searches and fetches the Gismo object with a given label.
|
|
| gsFileData (String const &fn, bool recursive=false) |
|
template<class Object > |
bool | has () const |
| Returns true if an Object exists in the filedata.
|
|
template<class Object > |
bool | hasAny () const |
|
bool | hasId (int id) const |
| Returns true if an Object exists in the filedata.
|
|
bool | hasTag (std::string tag) const |
| Returns true if an entry of tag exists in the xml file.
|
|
int | numData () const |
| Reports the number of objects which are held in the file data.
|
|
int | numTags () const |
| Counts the number of Objects/tags in the filedata.
|
|
template<class Object > |
void | operator<< (const Object &obj) |
| Inserts an object to the XML tree.
|
|
std::ostream & | print (std::ostream &os) const |
| Prints the XML data as a string.
|
|
bool | read (String const &fn, bool recursive=false) |
|
void | save (String const &fname="dump", bool compress=false) const |
| Save file contents to an xml file.
|
|
void | saveCompressed (String const &fname="dump") const |
| Save file contents to compressed xml file.
|
|
void | setFloatPrecision (const unsigned k) |
|
template<class Object > |
String | tag () const |
| Prints the XML tag of a Gismo object.
|
|
template<class Object > |
String | type () const |
| Prints the XML tag type of a Gismo object.
|
|
void | writeIges (String const &fname) |
| Save multipatch contents to an IGES file.
|
|
|
bool | read3dmFile (String const &fn) |
| Reads 3DM file.
|
|
bool | readAxelFile (String const &fn) |
| Reads Axel file.
|
|
bool | readBrepFile (String const &fn) |
| Reads OpenCascade brep file.
|
|
bool | readGeompFile (String const &fn) |
| Reads GeoPDEs txt file.
|
|
bool | readGismoXmlStream (std::istream &is, bool recursive=false) |
| Reads Gismo's native XML file.
|
|
bool | readGoToolsFile (String const &fn) |
| Reads GoTools file.
|
|
bool | readIgesFile (String const &fn) |
| Reads Iges file.
|
|
bool | readObjFile (String const &fn) |
| Reads Wavefront OBJ file.
|
|
bool | readOffFile (String const &fn) |
| Reads Off mesh file.
|
|
bool | readParasolidFile (String const &fn) |
| Reads parasolid files.
|
|
bool | readStlFile (String const &fn) |
| Reads STL mesh file.
|
|
bool | readX3dFile (String const &fn) |
| Reads X3D file.
|
|
bool | readXmlFile (String const &fn, bool recursive=false) |
| Reads a file with xml extension.
|
|
bool | readXmlGzFile (String const &fn, bool recursive=false) |
| Reads a file with xml.gz extension.
|
|