summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.h
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-02-04 11:15:57 (GMT)
committerDavid Cole <david.cole@kitware.com>2012-02-14 21:05:23 (GMT)
commit02ccb3291bd1053df30600211b0ceefbb7fea00f (patch)
tree1687be1cb35110d1553548787a82fac5346ecbec /Source/cmDocumentation.h
parent24fbc28e5f81823661853be0c0acdf2670b3453e (diff)
downloadCMake-02ccb3291bd1053df30600211b0ceefbb7fea00f.zip
CMake-02ccb3291bd1053df30600211b0ceefbb7fea00f.tar.gz
CMake-02ccb3291bd1053df30600211b0ceefbb7fea00f.tar.bz2
Create getDocumentedModulesListInDir which may be used in other context.
This should makes it easier to use the same "documented module" techniques for CTest, CMake or user module.
Diffstat (limited to 'Source/cmDocumentation.h')
-rw-r--r--Source/cmDocumentation.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index 83a0a09..00dba1a 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -35,6 +35,21 @@ public:
cmDocumentation();
~cmDocumentation();
+
+ /**
+ * An helper type pair for [structured] documented modules.
+ * The comment of those module contains structure markup
+ * which makes it possible to retrieve the documentation
+ * of variables, macros and functions defined in the module.
+ * - first is the filename of the module
+ * - second is the section of the doc the module belongs too
+ */
+ typedef std::pair<std::string,std::string> documentedModuleSectionPair_t;
+ /**
+ * A list of documented module(s).
+ */
+ typedef std::list<documentedModuleSectionPair_t> documentedModulesList_t;
+
// High-level interface for standard documents:
/**
@@ -133,6 +148,21 @@ public:
void addCPackStandardDocSections();
/**
+ * Retrieve the list of documented module located in
+ * path which match the globing expression globExpr.
+ * @param[in] path, directory where to start the search
+ * we will recurse into it.
+ * @param[in] globExpr, the globing expression used to
+ * match the file in path.
+ * @param[out] the list of obtained pairs (may be empty)
+ * @return 0 on success 1 on error or empty list
+ */
+ int getDocumentedModulesListInDir(
+ std::string path,
+ std::string globExpr,
+ documentedModulesList_t& docModuleList);
+
+ /**
* Get the documentation of macros, functions and variable documented
* with CMake structured documentation in a CMake script.
* (in fact it may be in any file which follow the structured doc format)
@@ -140,7 +170,8 @@ public:
* ## (double sharp) in column 1 & 2 immediately followed
* by a markup. Those ## are ignored by the legacy module
* documentation parser @see CreateSingleModule.
- * Current markup are ##macro, ##function, ##variable and ##end.
+ * Current markup are ##section, ##module,
+ * ##macro, ##function, ##variable and ##end.
* ##end is closing either of the previous ones.
* @param[in] fname the script file name to be parsed for documentation
* @param[in,out] commands the vector of command/macros documentation