I tried to generate documentations by headerdoc2html command.
But headerdoc only generates toc.html. There is not index.html for the protocol.
Something wrong?
I used following header file and command.
/*!
#header Dummy.h
hoge
*/
/*!
#class Foo
asdf
*/
#interface Foo : NSObject
/*!
#abstract xxx
*/
- (void)xxx;
#end
/*!
#protocol BarDelegate
*/
#protocol BarDelegate
/*!
#abstract Sent after something
*/
- (void)didSomething:(Foo *)foo;
#end
--
$ headerdoc2html *.h -o doc
The result was,
$ find doc
doc
doc/Dummy_h
doc/Dummy_h/Classes
doc/Dummy_h/Classes/Foo
doc/Dummy_h/Classes/Foo/index.html
doc/Dummy_h/Classes/Foo/toc.html
doc/Dummy_h/index.html
doc/Dummy_h/Protocols
doc/Dummy_h/Protocols/BarDelegate
doc/Dummy_h/Protocols/BarDelegate/toc.html
doc/Dummy_h/toc.html
I feel that your code is perfect but when it come for commad which are wrong. Their are four steps to create the headerDoc.
Step 1 : Go to the directory where your project is located (In stead of the header file what you did).
$ cd <Your_Project_Directory>
Step 2 : Now create HTML DOC files of your project's all controller and create a directory to where you will going to generate your HTML DOC file.
<Your_Project_Directory> $ headerdoc2html -o <DIR_PATH_TO_CREATE_YOUR_DOC> <PROJECT_NAME>
Step 3 : Now you will see their are stuff created in the directory path where you are created your doc file. Don't think to much about that We will see it later. Now go to the directory where you created your HTML files
<Your_Project_Directory> $ cd <DIR_PATH_TO_CREATE_YOUR_DOC>
Step 4 : Their are so many files right now in the your directory and all them are separated with each other so to make it together and create link with each other you have to apply the last command.
gatherheaderdoc ..
Here last '..'(Two dots) will create "masterTOC.HTML" file to the parent file. Now you can open this and test your project.
Related
I'm attempting to generate documentation for a header file that just contains some constants and I'm not able to generate it.
As suggested in the doxygen manual, I've tried adding the #file keyword to a comment block and still no luck.
What am I missing?
Here's a snippet:
MyFile.h
/**
#file
my super important documentation.
#author Julian Builes
*/
typedef NS_ENUM(NSUInteger, HTTPCode)
{my code ...}
background: it's an iOS project using xcode 6 and doxygen 1.8.9.1
EDIT: As per Albert's suggestion, I'm attaching a sample project that exemplifies the problem I'm experiencing.
"Files are considered private by default. This means files that do not have the #file declaration (or \file) are ignored and not included in your Doxygen output, except for members of C++ classes."
Ref: https://linux.m2osw.com/doxygen-does-not-generate-documentation-my-c-functions-or-any-global-function
Put the following at the top of your header:
/**
\file
*/
I believe you have an error in your Doxyfile configuration file. Just leave the "INPUT =" line blank, and doxygen will search the current directory for the source files matching the patterns you specify. When you change that, among the doxygen output you should see
...
Parsing files
Preprocessing C:/temp/doxy test/TEDHTTPStatusCodes.h...
Parsing file C:/temp/doxy test/TEDHTTPStatusCodes.h...
And you should see the "Files" tab populated on your doxygen generated main page.
If this is any help (using v1.9.1), it seems the #file (\file) declaration must be right up against the left margin. I spent hours wondering why one particular .h file would not work.
So this is OK:
/**
#file
#brief My superb interface
#par Note re foo bar
Functions that output to the szFoo buffer use the throgglethorp algorithm.
*/
But this is not, with the #file indented
/**
#file
#brief Not so good
#par Note re foo bar
Functions that output to the szFoo buffer use the throgglethorp algorithm.
*/
# Difference with default Doxyfile 1.9.1 (ef9b20ac7f8a8621fcfc299f8bd0b80422390f4b)
PROJECT_NAME = MyProject
PROJECT_NUMBER = 9.3.0
OUTPUT_DIRECTORY = doxy
ABBREVIATE_BRIEF =
FULL_PATH_NAMES = NO
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = YES
OPTIMIZE_OUTPUT_FOR_C = YES
SHOW_INCLUDE_FILES = NO
SORT_BRIEF_DOCS = YES
SHOW_USED_FILES = NO
SHOW_NAMESPACES = NO
LAYOUT_FILE = doxygen-layout.xml
INPUT = src/myIncludeFile.h
INPUT_ENCODING = ISO-8859-1
FILE_PATTERNS =
EXAMPLE_PATTERNS =
VERBATIM_HEADERS = NO
ALPHABETICAL_INDEX = NO
HTML_FOOTER = doxygen-footer.html
HTML_TIMESTAMP = YES
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
GENERATE_LATEX = NO
LATEX_CMD_NAME = latex
SEARCH_INCLUDES = NO
DOT_FONTNAME =
With the second instance (indented #file) the result is an html file with nothing documented. With the first instance, I get the result I want, which is the html/my_include_file_8h.html with subtitle "myIncludeFile.h File Reference".
I have a really simply LESS file which for now just imports Bootstrap. I'm using grunt and grunt-contrib-less#0.9.0 to compile the LESS files on save (less#1.6.3).
My file looks like this:
#charset "utf-8";
/**
* This is the root style file for the app
* to include styles in your html, you only need to include either:
* dist/styles.dev.css (for development)
* dist/styles.css (for production)
*/
// Libraries
#import "../lib/bootstrap/less/bootstrap"
// Our own files
and I'm getting the following error whenever I try to run my less:dev task.
Running "less:dev" (less) task
>> ParseError: Unrecognised input in style/styles.less on line 10, column 1:
>> 9 // Libraries
>> 10 #import "../lib/bootstrap/less/bootstrap"
>> 11
I've tried removing everything from the file except the import line and it still fails, so something weird is going on with the #import directive.
Any ideas?
Use semi-colon after #import
#import "../lib/bootstrap/less/bootstrap";
I am starting to dokumenting with doxygen and as far as it goes it seems quite easy and helpful !
There is just one file which gives me a headache, my config.ini .
This file has different comments, standards etc. .
I would like to load it as "code", so the page is not interpreted.
How can I achieve this ?
The following didn't work :
; /// #file config.ini
; /// #code
setting1
setting2
setting3
; /// #endcode
Your question is a little unclear but I assume from your question that you do want to see the contents of the .ini file in the documentation.
For what I think you need I'd suggest using #verbatim rather than #code.
If you are not seeing anything at all, then check that .ini is in the list of filename extensions that doxygen will parse? It's a setting in the doxyfile.
You can do what you want as follows:
Define a page that includes the .ini file, for instance test.dox as follows:
/** #page test_ini test.ini
* This is the configuration file:
* #verbinclude test.ini
*/
Then set EXAMPLE_PATH in doxygen's config file to the directory that contains test.ini and don't include .ini files in FILE_PATTERNS (so use the default).
Using Xcode , I want to have the Doxygen description of my method below the autocomplete option, like alloc:
When writing, Xcode displays the autocomplete with the comments from the documentation. You can see in the image for example, when alloc is selected from the options, it says "Returns a new instance of the receiving class" and also links to the documentation.
I have been able to document my source code with Doxygen, for instance
/**
This does nothing
*/
-(void) doNothing
{
// This does nothing
}
and I get the expected results in the HTML file that Doxygen generates, yet I don't know how to make those results appear as suggestions in Xcode.
Good news everyone! Xcode 5 now has built-in support for DOxygen style comments. So, you can comment your methods like this:
/*!
* Provides an NSManagedObjectContext singleton appropriate for use on the main
* thread. If the context doesn't already exist it is created and bound to the
* persistent store coordinator for the application, otherwise the existing
* singleton contextis returned.
* \param someParameter You can even add parameters
* \returns The a shared NSManagedObjectContext for the application.
*/
+ (NSManagedObjectContext *)sharedContext;
Inline help will look like this:
Quick help will look like this:
And sidebar help will look like this:
Here's a handy code snippet you can add the your Xcode Code Snippet library to make method documentation simple:
/**
<#description#>
#param <#parameter#>
#returns <#retval#>
#exception <#throws#>
*/
Now, you can just type "doxy" and poof! You have your doxygen template.
What I have found to be better than a code snippet for Doxygen/Javadoc style comments is using VVDocumenter-Xcode Plugin It is great! After installing you can simply type "///" above any code you want commented and it will grab the parameters and return as well add placeholders for you to complete your comment block.
I was able to achieve what I wanted using Appledocs, although I fought a bit with installation and setup...
Open xCode and go to xCode> Preferences > Downloads and download the 'Command Line Tools' in case you don't have it.
Open up terminal and type
git clone git://github.com/tomaz/appledoc.git
When it's done go to the appledoc folder, type
cd appledoc
and install appledoc into your usr/local/bin folder with this command:
sudo sh install-appledoc.sh
Open any xCode project and go to the package explorer on the left, and click on your main project file (the one that has the amount of targets and the sdk version detailed below)
In the Build settings tab, look below for '+Add Target' button and open it
Choose the 'Aggregate' template (make sure you choose iOS or macosx depending on your project and name it 'Documentation'
Select Documentation, go to Build Phases tab, and below click 'Add Build Phase' and select Add Run Script.
Copy and paste the code below on the Run Script field:
#appledoc Xcode script
# Start constants
company="ACME";
companyID="com.ACME";
companyURL="http://ACME.com";
#target="iphoneos";
target="macosx";
outputPath="~/help";
# End constants
/usr/local/bin/appledoc \
--project-name "${PROJECT_NAME}" \
--project-company "${company}" \
--company-id "${companyID}" \
--docset-atom-filename "${company}.atom" \
--docset-feed-url "${companyURL}/${company}/%DOCSETATOMFILENAME" \
--docset-package-url "${companyURL}/${company}/%DOCSETPACKAGEFILENAME" \
--docset-fallback-url "${companyURL}/${company}" \
--output "${outputPath}" \
--publish-docset \
--docset-platform-family "${target}" \
--logformat xcode \
--keep-intermediate-files \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--exit-threshold 2 \
"${PROJECT_DIR}"
In the start constants, you can replace names and such, also make sure to use the proper target (iOS or macosx)
Finally, go to Product > Scheme > Edit Scheme > Build Tab and add your 'Documentation' Target, make sure every box is checked. This way each time you build your code your documentation gets updated.
And that's it, you are good to go and start documenting your code.
Note that although the documentation updates each time you build, the popover suggestions won't update until you restart Xcode.
For proper documentation techniques, read this article
I'm trying to convert mscorlib.tlb.
It normally used in C++ like this:
#import "mscorlib.tlb" raw_interfaces_only \
high_property_prefixes("_get","_put","_putref") \
rename("ReportEvent", "InteropServices_ReportEvent")
How can I convert it to headers and implementation files?
I was able to use Visual Studio to compile a dummy cpp file that contained the lines above, and it produced a .tlh file. Shouldn't there also be implementation files?
You can split implementation and declaration by using the "no_implementation" and "implementation_only" parameters to #import. These generate .tlh (type library header) and .tli (type library implementation) files.
I typically put the following into a header file (like stdafx.h):
#import "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorlib.tlb" no_implementation
And the following into a .cpp file (like stdafx.cpp):
#import "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorlib.tlb" implementation_only