I am using doxygen to document my code. I found I can easily find all the classes since there is a tab calles "classes". But I cannot get all the free functions listed together. I have to go to the tab "files" to look for them. Can I put all free functions together in doxygen documentation?
There is a method to group items in pages and the method involve some comment writing from your side. There is not yet available an automated way to group free functions together.
Still using the grouping option, you can place all items you want into a given page in documentation. More about this and some examples at the Doxygen page:
Doxygen/manual/grouping
Related
I have a rather large single documentation page and I want to generate a symbol list (Jump to: on phobos docs, see std.compiler) with dub --build=ddoc because it is not there by default (current documentation page)
I would not want to include a list of all symbols with links in the code for obvious reasons.
I know that this is possible with ddox or javascript, but is there any way to do this using only vanilla ddoc so maintenance effort can be kept at a minimum? Thanks
Edit: I want to generate a listing for both global symbols, but also for members of classes and put the table near the class.
Ddoc is a macro system. It just replaces one thing with something else. The compiler defines certain macros for you (which you can redefine), and for actually generating a documentation page using ddoc, the compiler takes the documentation comments from the module, its list of documented symbols, etc. and basically generates a .dd page like you'd have when creating something like the dlang.org website. It's a bunch of text with ddoc markup. That ddoc markup is then replaced with whatever those ddoc macros are defined to be replaced with. By default, that's a bunch of html geared towards creating a web page, but those macros could be redefined to generate different html than the default or to generate something completely different like latex.
However, ultimately, all you're getting is the equivalent of a .dd page where you can affect what the results are by redefining the macros and thus redefining how one piece of text is converted into another. You have zero capability to iterate a list of symbols or do anything particularly turing complete. All you get is macro expansion.
That's why dlang.org uses javascript to generate the jump to links, and that's why the build process for dlang.org actually has a small D program that it runs to generate the ddoc for the navigation bar with the module list. ddoc can't do any of that. And that's why a tool like ddox uses the json output from the compiler to get at the symbol list and documentation info and generate its own thing.
So, no, you can't do anything like what you're trying to do with just standard ddoc. Really, the only options are to use javascript so that the browser can manipulate the result when viewing the document, to manipulate and/or generate ddoc with an external program, or to generate the documentation with a completely different tool such as ddox.
ddoc is a great macro system and fairly powerful as such, but if you're trying to do anything fancier than affect how the generated documentation looks, ddoc really doesn't get you there - at least not without the help of other tools to generate or manipulate either the ddoc that's processed or the results of processing the ddoc.
Ddoc documentation: https://dlang.org/spec/ddoc.html
There are some alternative documentation generators (which may or may not use ddoc) listed here: https://wiki.dlang.org/Open_Source_Projects#Documentation_Generators
Is there a simple way to count how many functions, methods and/or classes there are in a library? And how many are documented? Maybe through Doxygen output?
When I try to Google a solution all I get is algorithms to count things... :)
There is a tool named Coverxygen which requires XML output from Doxygen.
Install it by:
pip install coverxygen
Bonus:
If you use Sphinx and Doxygen (and Breathe) to generate documentations, you can use DocsCov to make a badge showing documentation coverage to show on your README.
As Xin Huang pointed out in a comment above, there is a useful tool called doxy-coverage.py at https://github.com/alobbs/doxy-coverage. It prints, for each file documented with Doxygen, it prints how many entities it has (namespaces, free functions, classes, member functions, enums, #defines, etc) and how many of those are documented. It lists each of the non-documented entities. At the bottom it gives a summary of the documentation coverage (percent entities that are documented). It uses the XML output of Doxygen to do so.
I replaced the line
print("%d%% API documentation coverage" %(total_per))
by
print ('%3d%% API documentation coverage (%d of %d)'%(total_per, total_yes, total_all))
To add the total number of entities and total number of documented entities in the project.
It seems possible to modify the tool to distinguish entities by type. If I ever do this, I'll post the resulting code here.
So I've been trying to implement an #if parser into an infobox, but I seem to be out of luck. The previous code I used seems to be outdated, and I can't find the a way to code it in again, differentely. :/
Basically, in this infobox, if a field is not typed in(or if typed in is left empty) it should become 'invisible' or not even render.
This code worked fine in a previous version of MediaWiki(not sure which one though), but no longer: http://pastebin.com/uQ49mPbQ. I've been trying to use it as a tutorial, and even outright copy and pasted it, but it simply doesn't work. All of the fields would become invisible, regardless of what I would have done to them...
This is the new code that I am using, and would like to be #if'ed: http://pastebin.com/3j0AbN5v
Any help would be welcome.
You need to enable the ParserFunctions extension to be able to use the {{#if}} parser function. Do this in your LocalSettings.php:
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
If you want to use the string functions (like {{#replace}}, {{#explode}}, etc), also add:
$wgPFEnableStringFunctions = true;
In recent versions of MediaWiki, ParserFunctions is included (but not enabled) so you don't need to download anything.
Basic troubleshooting: Whenever you see code like {{#zyx:...}} in a wiki page, it (probably) means, that someone tried to use a parser function that is not installed. Unless there is a parser function called “zyx” installed, the code {{#zyx:...}} has no special meaning to the wiki, and the text will be printed just like it is. The most common parser functions are collected in an extension called ParserFunctions, that is used on WikiMedia wikis. You will need the parser functions from ParserFunctions whenever copying templates from e.g. English Wikipedia.
To see what parser functions you have enabled, navigate to Special:Version on your wiki. Below the list of installed extensions is a list of tags (such as <gallery />) and parser functions available. As you can see, “if” is among the parser functions on your old wiki, but not on your new.
I'm working with word through my c++ application. And I want to read some documentation about available opportunities. I see some piece of code of some paticular situations (to add a picture, to add text, to save file, to fill table) in forums, but I want to observe all functions.
Tell me where can I get such documentation or how to find it.
The full documentation can be found on MSDN: http://msdn.microsoft.com/en-us/library/ff841702
I've been following the advice in this question.
How to add a WiX custom action that happens only on uninstall (via MSI)?
I have an executable running as a custom action after InstallFinalize which I intend to purge all my files and folders. I was just going to write some standard deletion logic but I'm stuck on the point that Rob Mensching made that the windows installer should handle this incase someone bails midway through an uninstallation.
"create a CustomAction that adds temporary rows to the RemoveFiles table"
I'm looking for some more information on this. I'm not really sure how to achieve this in c++ and my searching hasn't turned up a whole lot.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa371201(v=vs.85).aspx
Thanks
Neil
EDIT: I've marked the answer due to the question being specific about how to add files to the removeFiles table in c++ however I'm inclined to agree that the better solution is to use the RemoveFolderEx functionality in wix even though it is currently in beta (3.6 I think)
Roughly you will have to use the following functions in this order:
MsiDatabaseOpenView - the (input) handle is the one you get inside your custom action functions
MsiCreateRecord - to create a record with the SQL stuff inside
MsiRecord* - set of functions to prepare the record
MsiViewExecute to insert the new record into whatever table you please ...
MsiCloseHandle - with the handle from the very first step and the record handle (from MsiCreateRecord)
Everything is explained in detail over at MSDN. However, pay special attention to the section "Functions Not for Use in Custom Actions".
The documentation of MsiViewExecute also explains how the SQL queries should look. To get a feel for them you may want to use one of the .vbs scripts that are part of the Windows Installer SDK.
If you use WiX to create your installation package, consider using RemoveFolderEx element. It does what you want and you don't have to write the code yourself.
Read Tactical directory nukes for an example of how to use it.
If you still want to implement it yourself, you can get your inspiration from this blog post, there's the code for doing this in VBScript.