Comparing version 0.6.0 to 0.6.1
@@ -12,11 +12,11 @@ #!/usr/bin/env node | ||
.usage('[options] <doxygen directory>') | ||
.option('-v, --verbose', 'verbose mode', false) | ||
.option('-a, --anchors', 'add anchors to internal links', false) | ||
.option('-g, --groups', 'output doxygen modules into separate files', false) | ||
.option('-g, --groups', 'output doxygen groups into separate files', false) | ||
.option('-o, --output <file>', 'output file (must contain %s when using groups)', String, 'api.md') | ||
.option('-l, --language <lang>', 'programming language', String, 'cpp') | ||
.option('-t, --templates <dir>', 'custom templates directory', String, 'templates') | ||
.option('-o, --output <file>', 'output file (must contain %s when using modules)', String, 'api.md') | ||
.option('-q, --quiet', 'quiet mode', false) | ||
.parse(process.argv); | ||
if (program.verbose) { | ||
if (!program.quiet) { | ||
log.level = 'verbose'; | ||
@@ -23,0 +23,0 @@ } |
@@ -9,1 +9,41 @@ # Module <!-- group --> `bicycle` | ||
--------------------------------|--------------------------------------------- | ||
`class `[`transport::Bicycle`](#classtransport_1_1Bicycle) | | ||
# class `transport::Bicycle` | ||
Standard bicycle class. | ||
[Bicycle](#classtransport_1_1Bicycle) implements a standard bicycle. Bicycles are a useful way of transporting oneself, without too much effort (unless you go uphill or against the wind). If there are a lot of people on the road, you can use `RingBell` to ring your bell (**note**, not all bicycles have bells!). | ||
## Summary | ||
Members | Descriptions | ||
--------------------------------|--------------------------------------------- | ||
`public virtual void PedalHarder()` | PedalHarder makes you go faster (usually). | ||
`public virtual void RingBell()` | | ||
`public virtual ~Bicycle()` | Default destructor. | ||
## Members | ||
#### `public virtual void PedalHarder()` | ||
PedalHarder makes you go faster (usually). | ||
#### `public virtual void RingBell()` | ||
Ring bell on the bike. | ||
RingBell rings the bell on the bike. Note that not all bikes have bells. | ||
#### `public virtual ~Bicycle()` | ||
Default destructor. | ||
@@ -9,1 +9,48 @@ # Module <!-- group --> `mountainbike` | ||
--------------------------------|--------------------------------------------- | ||
`class `[`transport::MountainBike`](#classtransport_1_1MountainBike) | | ||
# class `transport::MountainBike` | ||
``` | ||
class transport::MountainBike | ||
: public transport::Bicycle | ||
``` | ||
Mountain bike implementation of a `[Bicycle](#classtransport_1_1Bicycle)`. | ||
[MountainBike](#classtransport_1_1MountainBike) is an implementation of a [Bicycle](#classtransport_1_1Bicycle) providing a bike for cycling on rough terrain. Mountain bikes are pretty cool because they have stuff like **Suspension** (and you can even adjust it using SetSuspension). If you're looking for a bike for use on the road, you might be better off using a [RacingBike](#classtransport_1_1RacingBike) though. | ||
## Summary | ||
Members | Descriptions | ||
--------------------------------|--------------------------------------------- | ||
`public bool SetSuspension(double stiffness)` | | ||
`public template<typename BreakType>` <br/>`inline bool ChangeBreak(BreakType breakType)` | | ||
## Members | ||
#### `public bool SetSuspension(double stiffness)` | ||
Set suspension stiffness. the suspension stiffness. | ||
SetSuspension changes the stiffness of the suspension on the bike. The method will return false if the stiffness could not be adjusted. | ||
#### Returns | ||
true if the suspension was adjusted successfully, false otherwise. | ||
#### `public template<typename BreakType>` <br/>`inline bool ChangeBreak(BreakType breakType)` | ||
Change the break type. the break type. the type of the break. | ||
ChangesBreak changes the type of break fitted to the bike. The method will return false if the break type could not be fitted. | ||
#### Returns | ||
true if the break was adjusted successfully. false otherise | ||
@@ -9,1 +9,38 @@ # Module <!-- group --> `racingbike` | ||
--------------------------------|--------------------------------------------- | ||
`class `[`transport::RacingBike`](#classtransport_1_1RacingBike) | | ||
# class `transport::RacingBike` | ||
``` | ||
class transport::RacingBike | ||
: public transport::Bicycle | ||
``` | ||
Racing bike class. | ||
[RacingBike](#classtransport_1_1RacingBike) is a special kind of bike which can go much faster on the road, with much less effort (even uphill!). It doesn't make sense to call `RingBell` on a racing bike for they don't have bells. | ||
## Summary | ||
Members | Descriptions | ||
--------------------------------|--------------------------------------------- | ||
`public virtual void PedalHarder()` | PedalHarder makes you go faster (usually). | ||
`public virtual void RingBell()` | | ||
## Members | ||
#### `public virtual void PedalHarder()` | ||
PedalHarder makes you go faster (usually). | ||
#### `public virtual void RingBell()` | ||
Ring bell on the bike. | ||
RingBell rings the bell on the bike. Note that not all bikes have bells. | ||
{ | ||
"name": "moxygen", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Doxygen XML to Markdown documentation converter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,8 +22,8 @@ # Moxygen | ||
-V, --version output the version number | ||
-v, --verbose verbose mode | ||
-a, --anchors add anchors to internal links | ||
-g, --groups output doxygen modules into separate files | ||
-g, --groups output doxygen groups into separate files | ||
-o, --output <file> output file (must contain %s when using groups) | ||
-l, --language <lang> programming language | ||
-t, --templates <dir> custom templates directory | ||
-o, --output <file> output file (must contain %s when using modules) | ||
-q, --quiet quiet mode | ||
``` | ||
@@ -33,3 +33,3 @@ | ||
Moxygen supports the doxygen [modules](http://www.stack.nl/~dimitri/doxygen/manual/grouping.html#modules) syntax for generating multi page documentation. iEvery [\defgroup](http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmddefgroup) in your source code will be parsed and output into a separate markdown file, with internal reference updated accordingly. | ||
Moxygen supports the doxygen [groups](http://www.stack.nl/~dimitri/doxygen/manual/grouping.html#modules) syntax for generating multi page documentation. Every [\defgroup](http://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmddefgroup) in your source code will be parsed and output into a separate markdown file, with internal reference updated accordingly. | ||
@@ -39,3 +39,3 @@ Example: | ||
``` | ||
moxygen --verbose --anchors --modules --output api-%s.md /path/to/doxygen/xml | ||
moxygen --anchors --groups --output api-%s.md /path/to/doxygen/xml | ||
``` | ||
@@ -45,8 +45,8 @@ | ||
To get a feel for how Moxygen works you can play with the example which is located in the `example` folder. The example contains: | ||
To get a feel for how Moxygen works you can play with the example which is located in the [example](/example) folder. The example contains: | ||
* Documented C++ example code | ||
* A `Doxyfile` file (for doxygen 1.8.13) | ||
* Pre-generated XML output in `example/xml` | ||
* Pre-generated output Markdown files in `example/doc`. | ||
* Pre-generated XML output in [example/xml](/example/xml) | ||
* Pre-generated output Markdown files in [example/doc](/example/doc) | ||
@@ -58,3 +58,3 @@ The rebuild the example XML you can run `doxygen` from within the example folder. | ||
``` | ||
moxygen --verbose --groups --output=doc/api-%s.md xml | ||
moxygen --anchors --groups --output=doc/api-%s.md xml | ||
``` |
@@ -218,3 +218,3 @@ /** | ||
assignNamespace: function (compound, child) { | ||
assignToNamespace: function (compound, child) { | ||
if (compound.name != child.namespace) | ||
@@ -230,12 +230,18 @@ console.assert('namespace mismatch: ', compound.name, '!=', child.namespace); | ||
assignGroup: function (compound, child) { | ||
assignNamespaceToGroup: function (compound, child) { | ||
// if child is a namespace just add a simple reference and return | ||
if (child.kind == 'namespace') { | ||
compound.compounds[child.name] = child; | ||
return; | ||
} | ||
// if child is a namespace just add a simple reference | ||
compound.compounds[child.name] = child; | ||
// remove namespace clildren from direct group children | ||
child.compounds.forEach(function (member) { | ||
delete compound.compounds[compound.id]; | ||
}); | ||
}, | ||
assignClassToGroup: function (compound, child) { | ||
// add a reference unless the child already belongs to a child namespace | ||
if (!child.namespace || child.namespace.length == 0) | ||
// if ((!child.namespace || child.namespace.length == 0) || | ||
// !compound.compounds[child.namespace]) | ||
compound.compounds[child.name] = child; | ||
@@ -254,3 +260,2 @@ | ||
parseCompound: function (compound, compounddef) { | ||
log.verbose('Processing compound ' + compound.name); | ||
@@ -321,6 +326,8 @@ Object.keys(compounddef.$).forEach(function(prop) { | ||
if (compound.kind == 'namespace') { | ||
this.assignNamespace(compound, this.references[innerclassdef.$.refid]); | ||
// log.verbose('Assign ' + innerclassdef.$.refid + ' to namespace ' + compound.name); | ||
this.assignToNamespace(compound, this.references[innerclassdef.$.refid]); | ||
} | ||
else if (compound.kind == 'group') { | ||
this.assignGroup(compound, this.references[innerclassdef.$.refid]); | ||
// log.verbose('Assign ' + innerclassdef.$.refid + ' to group ' + compound.name); | ||
this.assignClassToGroup(compound, this.references[innerclassdef.$.refid]); | ||
} | ||
@@ -335,3 +342,4 @@ }.bind(this)); | ||
if (compound.kind == 'group') { | ||
this.assignGroup(compound, this.references[namespacedef.$.refid]); | ||
// log.verbose('Assign namespace ' + namespacedef.$.refid + ' to group ' + compound.name); | ||
this.assignNamespaceToGroup(compound, this.references[namespacedef.$.refid]); | ||
} | ||
@@ -338,0 +346,0 @@ }.bind(this)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
246232
703