Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deeply nested merge-include for custom parsed files #1293

Merged
merged 8 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions include/sdf/Model.hh
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,24 @@ namespace sdf
private: const std::vector<std::pair<std::optional<sdf::NestedInclude>,
sdf::InterfaceModelConstPtr>> &MergedInterfaceModels() const;

/// \brief Get whether the model was merge-included and needs to be
/// processed to carry out the merge.
/// \return True if the model was merge-included.
private: bool IsMerged() const;

/// \brief Prepare the model to be merged into the parent model or world.
/// As part of the perparation, this will create the proxy frame that would
/// be need to be added to the parent object.
/// \param[out] _errors A list of errors encountered during the operation.
/// \param[in] _parentOfProxyFrame Name of parent of the proxy frame that
/// will be created. This can only be "__model__" or "world".
/// \return The proxy frame for the merged model that will need to be added
/// to the parent object.
/// \note This is a destructive call. After this call, the model will be in
/// an invalid state unless it is merged into the parent object.
private: sdf::Frame PrepareForMerge(sdf::Errors &_errors,
const std::string &_parentOfProxyFrame);

/// \brief Allow Root::Load, World::SetPoseRelativeToGraph, or
/// World::SetFrameAttachedToGraph to call SetPoseRelativeToGraph and
/// SetFrameAttachedToGraph
Expand Down
Loading