internal API
(
switch to public
)
-
revision 3.7.0
casadi
core
xml_file.hpp
1
/*
2
* This file is part of CasADi.
3
*
4
* CasADi -- A symbolic framework for dynamic optimization.
5
* Copyright (C) 2010-2023 Joel Andersson, Joris Gillis, Moritz Diehl,
6
* KU Leuven. All rights reserved.
7
* Copyright (C) 2011-2014 Greg Horn
8
*
9
* CasADi is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 3 of the License, or (at your option) any later version.
13
*
14
* CasADi is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
18
*
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with CasADi; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
*
23
*/
24
25
26
#ifndef CASADI_XML_FILE_HPP
27
#define CASADI_XML_FILE_HPP
28
29
#include "xml_file.hpp"
30
#include "shared_object.hpp"
31
#include "xml_node.hpp"
32
#include "printable.hpp"
33
34
namespace
casadi
{
35
37
class
XmlFileInternal;
38
47
class
CASADI_EXPORT
XmlFile
48
:
public
SharedObject
,
49
public
SWIG_IF_ELSE(PrintableCommon, Printable<XmlFile>) {
50
public
:
54
static
std::string
type_name
() {
return
"XmlFile"
;}
55
56
// Default constructor
57
XmlFile
();
58
59
// Constructor
60
XmlFile
(
const
std::string& name);
61
62
// Destructor
63
~
XmlFile
();
64
66
static
void
load_plugin(
const
std::string& name);
67
69
static
std::string doc(
const
std::string& name);
70
71
#ifndef SWIG
75
XmlFileInternal
* operator->();
76
80
const
XmlFileInternal
* operator->()
const
;
81
82
// Parse an XML file
83
XmlNode
parse(
const
std::string&
filename
);
84
85
// Save an XML file to disk
86
void
dump(
const
std::string&
filename
,
const
XmlNode
& node);
87
88
#endif
// SWIG
89
};
90
91
}
// namespace casadi
92
93
#endif
// CASADI_XML_FILE_HPP
casadi::SharedObject
GenericShared implements a reference counting framework similar for efficient and.
Definition:
shared_object.hpp:79
casadi::XmlFileInternal
Definition:
xml_file_internal.hpp:37
casadi::XmlFile
XML parser.
Definition:
xml_file.hpp:49
casadi::XmlFile::type_name
static std::string type_name()
Get type name.
Definition:
xml_file.hpp:54
casadi
The casadi namespace.
Definition:
archiver.cpp:28
casadi::filename
std::string filename(const std::string &path)
Definition:
ghc.cpp:55
casadi::XmlNode
Definition:
xml_node.hpp:39