Resource layout #403
louis-langholtz
started this conversation in
Ideas
Replies: 1 comment
-
Here's a working example of the namespace organization planned: namespace playrho {
namespace detail {
template <std::size_t N> struct AABB; // Current
template <typename T, typename Tag> class IndexingNamedType; // Moved from playrho::strongtype
} // namespace detail
using BodyID = detail::IndexingNamedType<BodyCounter, struct BodyIdentifier>; // Current
namespace d2 {
using AABB = detail::AABB<2>; // Current
class World; // Current
} // namespace d2
namespace d3 { // Planned
using AABB = detail::AABB<3>; // Planned
class World; // Planned
} // namespace d3
} // namespace playrho |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Expected/Desired Behavior or Experience:
The file-system organization matches the declared names and their namespaces, and their depths match what users need.
For example, users don't need to access
WorldImpl.hpp
as much as they need to accessWorld.hpp
soWorldImpl
should be in a deeper, more implementation oriented namespace, thanWorld
. Subsequently, theWorldImpl.hpp
file should be in a sub-directory of the directory in which theWorld.hpp
file is within.From a code perspective, this project currently basically has the
playrho
andplayrho::d2
namespaces. Many declarations for implementations that users should never touch directly however exist right in those same namespaces. I'd prefer for implementations that should never be user accessible to be in deeper namespaces likeplayrho::d2::implementation
. Sometimes a nested namespace name ofdetail
gets used for reasons like this and it is in PlayRho already, but I've saved it for stuff that would still be accessible in user code.I'd like to hear what suggestions others might have for this and I'd like to address this before going to beta since this will of course require user code to change to adapt to this.
Actual Behavior:
The organization of files in the file-system seems more oriented towards concepts like
Common
,Dynamics
, andCollision
and less oriented to user access and namespaces.Steps to Reproduce the Actual Behavior:
Take a look at the files and directories under
PlayRho
.Beta Was this translation helpful? Give feedback.
All reactions