From c7ccf18ffb7b4ec6a7b32989f251d8d453dc43d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 17 May 2014 12:52:08 +0200 Subject: [PATCH] doc: make section names unique. --- doc/coding-style.dox | 32 +++++++++++------------ src/Magnum/MultisampleTexture.h | 2 +- src/Magnum/Text/DistanceFieldGlyphCache.h | 2 +- src/Magnum/TextureArray.h | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/coding-style.dox b/doc/coding-style.dox index c2c9434a2..55d35b942 100644 --- a/doc/coding-style.dox +++ b/doc/coding-style.dox @@ -39,9 +39,9 @@ needed. You are encouraged to read it first: - @ref corrade-coding-style -@section cpp C++ code +@section coding-style-cpp C++ code -@subsection cpp-headers Headers +@subsection coding-style-cpp-headers Headers Headers shouldn't have `using` declarations inside them (unless there is good excuse, see Magnum.h). @@ -50,9 +50,9 @@ Headers have `*.h` extension, @ref compilation-speedup-hpp "template implementat have `*.hpp` extension (hinting that they are something between `*.h` and `*.cpp` files). -@subsection cpp-format Code format +@subsection coding-style-cpp-format Code format -@subsubsection cpp-types Builtin types +@subsubsection coding-style-cpp-types Builtin types Use %Magnum's own type aliases for public API (e.g. @ref UnsignedInt, see @ref types for more information), but use specific types when interacting with @@ -61,13 +61,13 @@ conversions when converting between them. This helps avoiding sign, truncation and other issues, e.g. `%Math::%Vector2` will implicitly convert to @ref Vector2i if and only if @ref Int is the same type as `GLsizei`. -@subsubsection cpp-naming Naming +@subsubsection coding-style-cpp-naming Naming When writing wrappers for OpenGL functions and defines, try to match the original name as closely as possible, although expanding abbrevations (and removing redundant prefixes) is encouraged. -@subsubsection cpp-forward-declarations Forward declarations and forward declaration headers +@subsubsection coding-style-cpp-forward-declarations Forward declarations and forward declaration headers When a namespace has classes which are commonly forward-declared, consider making a forward declaration header - it should have the same name as the @@ -75,14 +75,14 @@ namespace itself and contain foward declarations for all classes, enums and copies of all meaningful typedefs. See @ref compilation-forward-declarations for more information. -@section compatibility Compatibility with various OpenGL editions +@section coding-style-compatibility Compatibility with various OpenGL editions If any class, function or part of code depends on particular OpenGL edition (e.g. only for desktop), use conditional compilation to avoid erors on other platforms (see @ref portability-target for more information). Put related documentation also into the conditional compilation block and don't forget to -appropriately mark the class/function (@ref documentation-commands-requires "see below"). -Example: +appropriately mark the class/function +(@ref coding-style-documentation-commands-requires "see below"). Example: @code #ifndef MAGNUM_TARGET_GLES // @@ -94,15 +94,15 @@ void setPolygonMode(PolygonMode mode); #endif @endcode -@section documentation Doxygen documentation +@section coding-style-documentation Doxygen documentation -@subsection documentation-commands Special documentation commands +@subsection coding-style-documentation-commands Special documentation commands Additionally to @c \@todoc, @c \@debugoperator, @c \@debugoperatorenum, @c \@debugoperatorclassenum, @c \@configurationvalue and @c \@configurationvalueref (same as in %Corrade), these are defined: -@subsubsection documentation-commands-collisionoperator Shape collision operators +@subsubsection coding-style-documentation-commands-collisionoperator Shape collision operators Out-of-class operators for collision and collision occurence in Shapes namespace should be marked with @c \@collisionoperator and @c \@collisionoccurenceoperator, @@ -119,7 +119,7 @@ the operator is implemented (not of class in which the operator is implemented), thus efficiently connecting the two classes together in the documentation. -@subsubsection documentation-commands-extension Links to OpenGL extensions +@subsubsection coding-style-documentation-commands-extension Links to OpenGL extensions If an OpenGL extension is referenced in the documentation, it should be done with @c \@extension command: @@ -138,7 +138,7 @@ specify extension filename, if the previous command gives 404 error. For example produces this link: > @es_extension2{NV,read_buffer_front,GL_NV_read_buffer} -@subsubsection documentation-commands-ref_gl Links to related OpenGL functions and definitions +@subsubsection coding-style-documentation-commands-ref_gl Links to related OpenGL functions and definitions If an function touches OpenGL, related OpenGL functions should be documented in @c \@see block with @c \@fn_gl command. If only specific definition is used @@ -162,7 +162,7 @@ are the same as in @c \@extension command. It produced link to extension specification, with function name as link text: > @fn_gl_extension{NamedCopyBufferSubData,EXT,direct_state_access}. -@subsubsection documentation-commands-requires Classes and functions requiring specific OpenGL version or extensions +@subsubsection coding-style-documentation-commands-requires Classes and functions requiring specific OpenGL version or extensions If any class or function requires specific OpenGL version above 2.1, it should be marked with appropriate command @c \@requires_glXX, where `XX` is version @@ -191,7 +191,7 @@ requirements. All classes and functions using those commands are cross-referenced in page @ref opengl-required-extensions. -@section unit-tests Unit tests +@section coding-style-unit-tests Unit tests All unit tests use Corrade's @ref Corrade::TestSuite "TestSuite". diff --git a/src/Magnum/MultisampleTexture.h b/src/Magnum/MultisampleTexture.h index f622f6d1d..34148aeff 100644 --- a/src/Magnum/MultisampleTexture.h +++ b/src/Magnum/MultisampleTexture.h @@ -65,7 +65,7 @@ Template class for 2D mulitsample texture and 2D multisample texture array. Used only from shaders for manual multisample resolve and other operations. See also @ref AbstractTexture documentation for more information. -@section Texture-usage Usage +@section MultisampleTexture-usage Usage As multisample textures have no sampler state, the only thing you need is to set storage: diff --git a/src/Magnum/Text/DistanceFieldGlyphCache.h b/src/Magnum/Text/DistanceFieldGlyphCache.h index a23a850ce..436d25812 100644 --- a/src/Magnum/Text/DistanceFieldGlyphCache.h +++ b/src/Magnum/Text/DistanceFieldGlyphCache.h @@ -40,7 +40,7 @@ Unlike original @ref GlyphCache converts each binary image to distance field. It is not possible to use non-binary colors with this cache, internal texture format is red channel only. -@section GlyphCache-usage Usage +@section DistanceFieldGlyphCache-usage Usage Usage is similar to @ref GlyphCache, additionally you need to specify size of resulting distance field texture. diff --git a/src/Magnum/TextureArray.h b/src/Magnum/TextureArray.h index bf4d8e94b..d860b4636 100644 --- a/src/Magnum/TextureArray.h +++ b/src/Magnum/TextureArray.h @@ -53,7 +53,7 @@ namespace Implementation { Template class for one- and two-dimensional texture arrays. See also @ref AbstractTexture documentation for more information. -@section Texture-usage Usage +@section TextureArray-usage Usage See @ref Texture documentation for introduction.