Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > RDOC: several related modules in several C files

Reply
Thread Tools

RDOC: several related modules in several C files

 
 
Victor \Zverok\ Shepelev
Guest
Posts: n/a
 
      03-06-2007
Hi all!

I have a pretty large extension I want to document with RDoc.

The problem is, I have several files:

htmr_main.cpp:
...
rb_mHtmr = rb_define_module("Htmr");
...

htmr_constants.cpp:
==================
...
rb_mHtmrConstants = rb_define_module_under(rb_mHtmr, "Constants");
...

The problem with such organization: RDoc says "Enclosing class/module
'rb_mHtmr' for module Constants not known".

I can:
1. move the line "rb_mHtmr = ..." to htmr_constants.cpp, but rb_mHtmr is
used not only from this file.
2. move the line "rb_mHtmrConstants = ..." to htmr_main.cpp, but in this
case all othre contents of htmr_constants.cpp is ignored by Rdoc.
3. join all files of the extension into one huge file, but it will be ugly


Was I miss something?

Thanks.

V.


 
Reply With Quote
 
 
 
 
Max Lapshin
Guest
Posts: n/a
 
      03-16-2007

> The problem with such organization: RDoc says "Enclosing class/module
> 'rb_mHtmr' for module Constants not known".


I've done the following with my extensions:
while creating documentation, I've concatenated all data in one file and
rdoc is parsing one file.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Max Lapshin
Guest
Posts: n/a
 
      03-16-2007

> as in my sources there are many other problems for RDoc, like shortcut
> macro


These shortcuts seems to be one of the greatest problem. The only way to
bypass them is to use some sort of C->xml compilers in RDoc (to make it
very complicated), or to create some sort of explicit binding C
functions to ruby methods

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Max Lapshin
Guest
Posts: n/a
 
      03-16-2007

> BTW, I've found even \t (Tab) symbol in sources confuses RDoc
>


Yes, RDoc seems to be a rather confusable thing =)
I think, that there is no use in trying to make a perfect RDoc for C
extensions, so You hack is OK. You can also make the following:
preprecess sources before RDoc-ing them. Thus, all You macroses will be
expanded to rb_define_method

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicode-related problem installing perl modules on Solaris 10 Mike Friedman Perl Misc 0 02-22-2007 04:21 PM
[WANTED] Solaris related modules Daniel Berger Ruby 3 01-05-2007 04:53 PM
How should multiple (related) projects be arranged (structured) and configured so that they can share code, have a related package structure and enable proper unittesting, and ensuring no namespace collisions ToddLMorgan@gmail.com Python 14 04-21-2006 04:03 PM
How should threads be terminated? (related to 'Help with thread related tracebacks') Maxwell Hammer Python 7 06-18-2005 04:20 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57