[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kdoc
Subject: Re: 2.0a14
From: Eric NOULARD <Eric.Noulard () prism ! uvsq ! fr>
Date: 1999-10-12 6:42:56
[Download RAW message or body]
On Tue, Oct 12, 1999 at 09:25:00AM +1000, Sirtaj Singh Kang wrote:
> On Mon, 11 Oct 1999, Eric NOULARD wrote:
>
> > I've just noticed that some classes of my libs appear in the
> > index (index.html) but not in the hierarchy view (hier.html). In fact
> > they appear in the hierarchy but not always where I thought they should,
> > what are the rules for appearing in the hierarchy view? (both for single
> > and multiple inheritance)
>
> The system is currently quite stupid.
>
> Index: list all classes contained by Global (ie non-nested)
> Hierarchy: Similar, but nested classes show up if they derive from another
> class. Also each class hierarchy is expanded only once; the second time it
> is just displayed but its children are not expanded.
>
> I'm struggling a bit for a way to do the index and hierarchy properly.
I may suggest you a flexible way to sort your classes.
I've not looked at kdoc code but you should have some
data structure describing each class. You may add (if not already
there) a counter for number of child (n_child) and parent
(n_parent) of the class.
Now I suppose all the classes are stored in some
list or tree data structure after you parsed the code.
You may write a function which sort this structure and builds
another sorted list/tree. The sort KEY will be the name of the
class for building the Index view and will be the number of parent
for the hierarchy view. If you write a multiple KEY generic sort
function you may display more views.
For the hierarchy view you may generate another hyperlink
when you write "already expanded" class hierarchy: add something like,
<LI> <A HREF="A_with_child.html">A_with_child.html </A>
<A HREF="hier.html#A_with_child_expanded"> [expanded] </A>
</LI>
the only problem is to be able to know in advance you will
have to put a label "A_with_child_expanded" in hier.html.
######## I repost my buggy example form yesterday since
######## it did not show my real problem with template and hierarchy view.
######## The modification I made make the problem appear like
######## in my bigger lib. [I use kdoc2 -H -d./kdoctest -n Test testkdoc.hh]
The problem is the hierarchy shows up like this:
AT2Ab
T1A
|--T2A
|--T3A
instead of:
T1A
|--T2A
|--AT2Ab
|--T3A
or eventually:
AT2Ab
T1A
|--T2A
|--AT2Ab
|--T3A
####################
/**
* A templated class with 1 template arg
*/
template <class T1>
class T1A
{
public:
/**
* A public method
*/
void test() const;
} ;
/**
* A templated class with 2 template arg
*/
template <class T1, class T2>
class T2A : public T1A<T1>
{
public:
/**
* A public method
*/
void test() const;
} ;
/**
* A templated class with 2 template arg (v2)
*/
template <class T1, class T2>
class AT2Ab : public T2A<T1,T2>
{
public:
/**
* A public method
*/
void test() const;
} ;
/**
* A templated class with 3 template arg
*/
template <class T1, class T2, class T3>
class T3A : public T2A<T1,T2>
{
public:
/**
* A public method
*/
void test() const;
} ;
####################
--
Eric NOULARD
-------------------------------------------------------------------
Groupe ADULIS * Laboratoire PRiSM
Tel: +33 1 60 13 06 28 * Tel: +33 1 39 25 40 71
Fax: +33 1 60 13 06 07 * Fax: +33 1 39 25 40 57
E-mail: E.Noulard@adulis.fr * E-mail: Eric.Noulard@prism.uvsq.fr
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic