defold/defold.github.io

Separate concept of "namespace" and file name

Opened this issue · 3 comments

JCash commented

Currently multiple documents cannot share the same "@namespace".
If they do, only one of these "@document" tags' info will be added.
And, since a document has a separate include file path, this gets wrong quickly.

E.g. hash.h and dstrings.h both reside in the global namespace, but you need two different includes to use these functions.

I'm not sure I understand the problem. Can you please elaborate?

JCash commented

For instance, there is no namespace called "dmStringFunc", yet, we call it that, and the file link is named "dmStringFunc".
In practice, those string functions are part of the global namespace "::"
However, we don't want to gather all functions in the global namespace under one page, since they have different contexts, different functionality and different documentation, and also the link to the header files are different.
Here is a list of functions/structs/macros in the global namespace: DM_ALIGN, dmArray, dmHash*, dmStr*, dmLog*

JCash commented

In short, I cannot set "namespace" to an empty value.