Skip to content

Commit

Permalink
Refactor CommittableModelGraph into its own hpp+cpp files (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Nov 16, 2023
1 parent 2c16d83 commit be30255
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/OpenSimCreator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ add_library(OpenSimCreator STATIC

ModelGraph/BodyEl.cpp
ModelGraph/BodyEl.hpp
ModelGraph/CommittableModelGraph.hpp
ModelGraph/CrossrefDescriptor.hpp
ModelGraph/CrossrefDirection.hpp
ModelGraph/EdgeEl.cpp
Expand Down
10 changes: 10 additions & 0 deletions src/OpenSimCreator/ModelGraph/CommittableModelGraph.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#pragma once

#include <OpenSimCreator/ModelGraph/ModelGraph.hpp>

#include <oscar/Utils/UndoRedo.hpp>

namespace osc
{
using CommittableModelGraph = UndoRedoT<ModelGraph>;
}
4 changes: 1 addition & 3 deletions src/OpenSimCreator/UI/Tabs/MeshImporterTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <OpenSimCreator/Bindings/SimTKMeshLoader.hpp>
#include <OpenSimCreator/Model/UndoableModelStatePair.hpp>
#include <OpenSimCreator/ModelGraph/BodyEl.hpp>
#include <OpenSimCreator/ModelGraph/CommittableModelGraph.hpp>
#include <OpenSimCreator/ModelGraph/CrossrefDescriptor.hpp>
#include <OpenSimCreator/ModelGraph/CrossrefDirection.hpp>
#include <OpenSimCreator/ModelGraph/EdgeEl.hpp>
Expand Down Expand Up @@ -208,9 +209,6 @@ using osc::EdgeEl;
// correct time
namespace osc
{
// model graphs can be stored in a generic UndoRedo container
using CommittableModelGraph = osc::UndoRedoT<ModelGraph>;

bool PointAxisTowards(
CommittableModelGraph& cmg,
UID id,
Expand Down

0 comments on commit be30255

Please sign in to comment.