summaryrefslogtreecommitdiffstats
path: root/include/ingen/Parser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/ingen/Parser.hpp')
-rw-r--r--include/ingen/Parser.hpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/include/ingen/Parser.hpp b/include/ingen/Parser.hpp
index f2cd951f..16ee4070 100644
--- a/include/ingen/Parser.hpp
+++ b/include/ingen/Parser.hpp
@@ -24,13 +24,14 @@
#include "raul/Path.hpp" // IWYU pragma: keep
#include "raul/Symbol.hpp" // IWYU pragma: keep
-#include <boost/optional/optional.hpp>
-
+#include <optional>
#include <set>
#include <string>
#include <utility>
-namespace Sord { class World; }
+namespace Sord {
+class World;
+} // namespace Sord
namespace ingen {
@@ -42,7 +43,8 @@ class World;
@ingroup Ingen
*/
-class INGEN_API Parser {
+class INGEN_API Parser
+{
public:
explicit Parser() = default;
@@ -50,16 +52,16 @@ public:
/** Record of a resource listed in a bundle manifest. */
struct ResourceRecord {
- inline ResourceRecord(URI u, FilePath f)
+ ResourceRecord(URI u, FilePath f)
: uri(std::move(u)), filename(std::move(f))
{}
- inline bool operator<(const ResourceRecord& r) const {
+ bool operator<(const ResourceRecord& r) const {
return uri < r.uri;
}
- URI uri; ///< URI of resource (e.g. a Graph)
- FilePath filename; ///< Path of describing file (seeAlso)
+ URI uri; ///< URI of resource (e.g. a Graph)
+ FilePath filename; ///< Path of describing file (seeAlso)
};
/** Find all resources of a given type listed in a manifest file. */
@@ -77,21 +79,21 @@ public:
* @return whether or not load was successful.
*/
virtual bool parse_file(
- World& world,
- Interface& target,
- const FilePath& path,
- const boost::optional<raul::Path>& parent = boost::optional<raul::Path>(),
- const boost::optional<raul::Symbol>& symbol = boost::optional<raul::Symbol>(),
- const boost::optional<Properties>& data = boost::optional<Properties>());
-
- virtual boost::optional<URI> parse_string(
- World& world,
- Interface& target,
- const std::string& str,
- const URI& base_uri,
- const boost::optional<raul::Path>& parent = boost::optional<raul::Path>(),
- const boost::optional<raul::Symbol>& symbol = boost::optional<raul::Symbol>(),
- const boost::optional<Properties>& data = boost::optional<Properties>());
+ World& world,
+ Interface& target,
+ const FilePath& path,
+ const std::optional<raul::Path>& parent = std::optional<raul::Path>(),
+ const std::optional<raul::Symbol>& symbol = std::optional<raul::Symbol>(),
+ const std::optional<Properties>& data = std::optional<Properties>());
+
+ virtual std::optional<URI> parse_string(
+ World& world,
+ Interface& target,
+ const std::string& str,
+ const URI& base_uri,
+ const std::optional<raul::Path>& parent = std::optional<raul::Path>(),
+ const std::optional<raul::Symbol>& symbol = std::optional<raul::Symbol>(),
+ const std::optional<Properties>& data = std::optional<Properties>());
};
} // namespace ingen