18#ifndef SDF_PARSER_CONFIG_HH_
19#define SDF_PARSER_CONFIG_HH_
26#include <gz/utils/ImplPtr.hh>
36inline namespace SDF_VERSION_NAMESPACE
52class ParserConfigPrivate;
88 std::map<std::string, std::vector<std::string> >;
101 public:
const std::function<std::string(
const std::string &)> &
118 std::function<std::string(
const std::string &)> _cb);
129 public:
void AddURIPath(
const std::string &_uri,
const std::string &_path);
178 IGN_UTILS_IMPL_PTR(dataPtr)
This class contains configuration options for the libsdformat parser.
Definition: ParserConfig.hh:85
void AddURIPath(const std::string &_uri, const std::string &_path)
Associate paths to a URI.
void URDFSetPreserveFixedJoint(bool _preserveFixedJoint)
Set the preserveFixedJoint flag.
void ResetDeprecatedElementsPolicy()
Resets the policy for deprecated elements so that it follows WarningsPolicy.
void SetDeprecatedElementsPolicy(EnforcementPolicy _policy)
Set the policy for deprecated elements.
void SetUnrecognizedElementsPolicy(EnforcementPolicy _policy)
Set the policy for unrecogonized elements without an xmlns.
void SetFindCallback(std::function< std::string(const std::string &)> _cb)
Set the callback to use when libsdformat can't find a file.
const SchemeToPathMap & URIPathMap() const
Get the URI scheme to search directories map.
ParserConfig()
Default constructor.
void RegisterCustomModelParser(CustomModelParser _modelParser)
Registers a custom model parser.
EnforcementPolicy UnrecognizedElementsPolicy() const
Get the current unrecognized elements policy.
std::map< std::string, std::vector< std::string > > SchemeToPathMap
type alias for the map from URI scheme to search directories
Definition: ParserConfig.hh:88
EnforcementPolicy WarningsPolicy() const
Get the current warning enforcement policy.
void SetWarningsPolicy(EnforcementPolicy _policy)
Set the warning enforcment policy.
const std::vector< CustomModelParser > & CustomModelParsers() const
Get the registered custom model parsers.
bool URDFPreserveFixedJoint() const
Get the preserveFixedJoint flag value.
const std::function< std::string(const std::string &)> & FindFileCallback() const
Get the find file callback function.
static ParserConfig & GlobalConfig()
Mutable access to a singleton ParserConfig that serves as the global ParserConfig object for all pars...
EnforcementPolicy DeprecatedElementsPolicy() const
Get the current deprecated elements policy.
EnforcementPolicy
Policy to describe how to treat certain conditions when parsing.
Definition: ParserConfig.hh:40
std::function< sdf::InterfaceModelPtr(const sdf::NestedInclude &, Errors &)> CustomModelParser
Defines a custom model parser.
Definition: InterfaceElements.hh:265
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25