2009/5/6 doc_savage <
michele.corradin@...>:
>
> As I see,
> nobody as an idea on how I can do that. I would like to write a filter as Al
> did but I don't understand clearly how it works: I was thinking to do that
> in C (I don't know perl .. maybe you can suggest me an example o r something
> I can start from, can you?) and compile the result as a .exe (windows) but
> how does doxygen run it? It launchs it for every file passing it as an
> argument? The output file name? It's also an argument passed by doxygen?
Michele,
If you have a look in Doxyfile, there's a simple description of how
the filter is run: basically, Doxygen calls the application with a
single argument (the file name) and expects a modified version to be
produced on stdout. It then repeats this for every file.
If it's helpful, I'm happy to send you a copy of my filter (written
rather hackishly in python with insufficient comments), which handles
tables like this (won't make sense unless you use a fixed width
font!):
| Header 1 | Header 2 |< Left Aligned Header |
----------------------------------------------
| Entry | Entry | Description |
| More | General | Entries |
and also produces state machine graphs from something like the code at
the bottom of this email. It's not perfect (by a long way): it
doesn't really do much in the way of meaningful error messages if the
syntax isn't correct and there's currently little or no documentation,
but if it's of interest, let me know.
Al
void MyFunction(void)
{
static enum {FirstSTATE, SecondSTATE, ThirdSTATE, LastSTATE} seState;
/**
* @statemachine
*/
switch (seState)
{
case FirstSTATE:
/**
* Label "Initial"
*/
/* For simple states like this one,
* all you have to do is give the state a label.
*/
seState = SecondSTATE;
break;
case SecondSTATE:
/**
* Label "Checking"
* "Can Pigs Fly?".No -> return (W)
* "Can Pigs Fly?".Yes -> continue
*/
/* For states with checking, use the check text in quotes,
* (must end in '?'), followed by the label text after a dot
* then an arrow and the state to go to. The state can either
* be a named state (e.g. ThirdSTATE) or one of the keywords:
* "return" or "continue". "continue" only works if there
is only one
* "state = something;" line in this case statement. You can also
* specify the direction with a :e on the end (for East)
of each part
* or a (E) on the end of the line if it's for both the
source and destination.
*/
if (PigsCanFly())
{
seState = ThirdSTATE;
}
break;
case ThirdSTATE:
/**
* Label "Completing"
* "Have We Finished?".No:e -> "Try Again?":w
* "Try Again?".No:e -> FirstSTATE:e
* "Try Again?".Yes:n -> SecondSTATE:se
* "Have We Finished?".Yes -> LastSTATE
*/
if (Complete())
{
seState = LastSTATE;
}
else
{
if (RetriesRemaining())
{
seState = SecondSTATE;
}
else
{
seState = FirstSTATE;
}
}
break;
case LastSTATE:
default:
/**
* Label "Finished"
* End State
*/
seState = FirstSTATE;
}
/**
* @endstatemachine
*/
}
Produces something like:
digraph {
MyFunction [label="MyFunction()"];
{rank=source; MyFunction;};
MyFunction -> FirstSTATE;
FirstSTATE [label="Initial" URL="\ref FirstSTATE"];
FirstSTATE -> SecondSTATE;
SecondSTATE [label="Checking" URL="\ref SecondSTATE"];
SecondSTATE_CanPigsFly [label="Can Pigs Fly?" shape="diamond"];
SecondSTATE -> SecondSTATE_CanPigsFly;
SecondSTATE_CanPigsFly:w -> SecondSTATE:w [label="No"];
SecondSTATE_CanPigsFly -> ThirdSTATE [label="Yes"];
ThirdSTATE [label="Completing" URL="\ref ThirdSTATE"];
ThirdSTATE_HaveWeFinished [label="Have We Finished?" shape="diamond"];
ThirdSTATE -> ThirdSTATE_HaveWeFinished;
ThirdSTATE_HaveWeFinished:e -> ThirdSTATE_TryAgain:w [label="No"];
ThirdSTATE_TryAgain [label="Try Again?" shape="diamond"];
ThirdSTATE_TryAgain:e -> FirstSTATE:e [label="No"];
ThirdSTATE_TryAgain:n -> SecondSTATE:se [label="Yes"];
ThirdSTATE_HaveWeFinished -> LastSTATE [label="Yes"];
LastSTATE [label="Finished" URL="\ref LastSTATE"];
{rank=sink; LastSTATE;};
}
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled.
http://p.sf.net/sfu/kodak-com_______________________________________________
Doxygen-users mailing list
Doxygen-users@...
https://lists.sourceforge.net/lists/listinfo/doxygen-users