OSDN Git Service

Add some info about namespaces
authorEike Ziller <eike.ziller@nokia.com>
Mon, 29 Aug 2011 08:48:06 +0000 (10:48 +0200)
committerLeena Miettinen <riitta-leena.miettinen@nokia.com>
Mon, 29 Aug 2011 10:11:17 +0000 (12:11 +0200)
Change-Id: I6e3c2900b3f3c96e4b9f6657f9371fd728e5bd91
Reviewed-on: http://codereview.qt.nokia.com/3722
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
doc/api/coding-style.qdoc

index ea617d3..1cbe024 100644 (file)
 
     \section1 Patterns and Practices
 
+    \section2 Namespacing
+
+    Read \l {http://developer.qt.nokia.com/wiki/Qt_In_Namespace}{Qt In Namespace}
+    and keep in mind that all of Qt Creator is \e{namespace aware} code.
+
+    The namespacing policy within Qt Creator is as follows:
+    \list
+        \o Classes/Symbols of a library or plugin that are exported for use of
+           other libraries or plugins are in a namespace specific to that
+           library/plugin, e.g. \c{MyPlugin}.
+        \o Classes/Symbols of a library or plugin that are not exported are in
+           an additional \c{Internal} namespace, e.g. \c{MyPlugin::Internal}.
+    \endlist
+
     \section2 Passing File Names
 
     Qt Creator API expects file names in portable format, that is, with slashes (/)
     Suddenly, QList symbols are exported from two libraries which results in a
     clash.
 
-    \section2 Namespacing
-
-    Read \l {http://developer.qt.nokia.com/wiki/Qt_In_Namespace}{Qt In Namespace}
-    and keep in mind that all of Qt Creator is \e{namespace aware} code.
-
     \section2 Conventions for Public Header Files
 
     Our public header files have to survive the strict settings of