You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/06/23 11:47:15 UTC
mesos git commit: Consistent code examples in doxygen style.
Repository: mesos
Updated Branches:
refs/heads/master 89594b5eb -> 54ca19e00
Consistent code examples in doxygen style.
Review: https://reviews.apache.org/r/35364
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/54ca19e0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/54ca19e0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/54ca19e0
Branch: refs/heads/master
Commit: 54ca19e0020624664a2ac7a3cc3e78b07244cea2
Parents: 89594b5
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Tue Jun 23 11:46:43 2015 +0200
Committer: Bernd Mathiske <be...@mesosphere.io>
Committed: Tue Jun 23 11:46:43 2015 +0200
----------------------------------------------------------------------
docs/mesos-doxygen-style-guide.md | 56 ++++++++++++++++++++++------------
1 file changed, 37 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/54ca19e0/docs/mesos-doxygen-style-guide.md
----------------------------------------------------------------------
diff --git a/docs/mesos-doxygen-style-guide.md b/docs/mesos-doxygen-style-guide.md
index 93decf9..0ac3837 100644
--- a/docs/mesos-doxygen-style-guide.md
+++ b/docs/mesos-doxygen-style-guide.md
@@ -53,6 +53,21 @@ This page must be located in the top directory of the library/component and name
The first line in such a document must be a section heading bearing the title which will appear in the generated Doxygen index.
Example: "# Libprocess User Guide"
+#### Example Code
+
+Code examples must be enclosed by '~~~{.Language}'
+
+
+Example:
+~~~
+ ~~~{.cpp}
+ int main(int argc, char** argv)
+ {
+ ....
+ }
+ ~~~
+~~~
+
## In Source Code
Doxygen documentation needs only to be applied to source code parts that
@@ -63,27 +78,30 @@ enhanced by source code comments as appropriate, but these comments should not f
We follow the [Javadoc syntax](http://en.wikipedia.org/wiki/Javadoc) to mark comment blocks.
These have the general form:
- /**
- * Brief summary.
- *
- * Detailed description. More detail.
- * @see Some reference
- *
- * @param <name> Parameter description.
- * @return Return value description.
- */
+~~~{.cpp}
+/**
+ * Brief summary.
+ *
+ * Detailed description. More detail.
+ * @see Some reference
+ *
+ * @param <name> Parameter description.
+ * @return Return value description.
+ */
+~~~
Example:
-
- /**
- * Returns a compressed version of a string.
- *
- * Compresses an input string using the foobar algorithm.
- *
- * @param uncompressed The input string.
- * @return A compressed version of the input string.
- */
- std::string compress(const std::string& uncompressed);
+~~~{.cpp}
+/**
+ * Returns a compressed version of a string.
+ *
+ * Compresses an input string using the foobar algorithm.
+ *
+ * @param uncompressed The input string.
+ * @return A compressed version of the input string.
+ */
+ std::string compress(const std::string& uncompressed);
+~~~
### Constants and Variables