-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor SceneElVariant into separate header (#802)
- Loading branch information
1 parent
5e17580
commit 68fd2f9
Showing
2 changed files
with
48 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include <utility> | ||
#include <variant> | ||
|
||
namespace osc | ||
{ | ||
class GroundEl; | ||
class MeshEl; | ||
class BodyEl; | ||
class JointEl; | ||
class StationEl; | ||
class EdgeEl; | ||
|
||
// a variant for storing a `const` reference to a `const` scene element | ||
using ConstSceneElVariant = std::variant< | ||
std::reference_wrapper<GroundEl const>, | ||
std::reference_wrapper<MeshEl const>, | ||
std::reference_wrapper<BodyEl const>, | ||
std::reference_wrapper<JointEl const>, | ||
std::reference_wrapper<StationEl const>, | ||
std::reference_wrapper<EdgeEl const> | ||
>; | ||
|
||
// a variant for storing a non-`const` reference to a non-`const` scene element | ||
using SceneElVariant = std::variant< | ||
std::reference_wrapper<GroundEl>, | ||
std::reference_wrapper<MeshEl>, | ||
std::reference_wrapper<BodyEl>, | ||
std::reference_wrapper<JointEl>, | ||
std::reference_wrapper<StationEl>, | ||
std::reference_wrapper<EdgeEl> | ||
>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters