Comments (6)
This is because anything declared in a submodule is private
, and so won't be documented by default. You can put display: private
in the ford comment on mod_s
to include impl_class_t
:
submodule (mod) mod_s
!! display: private
...
Note that this will also include docs for the implementations of create
and impl_foo
. I don't think there's a way to annotate a single entity to be included in the rendered docs.
from ford.
Thanks a lot for pointing out. As I need this for all submodules and also want to have all private entities documented, I can actually use the "display: private" option in the ford project setup file. I came across that option but did not make the connection to submodules. Maybe it would be helpful to mention submodules there?
from ford.
As I wrote display: private helps exposing the submodule types, but ford fails at referencing public derived types. For the test project below with a module and accompanying submodule the "derived-type table" lists type "impl" but not "base". Moreover, it says that "impl" extends "../../base", and links are missing.
Remarks:
(1) Note that ford_project_file.md is placed in "./build" and the two source files are placed in "./src".
(2) If I remove "display:private" then impl disappears and base becomes visible.
(3) If I remove "display:private" then base becomes visible, but the abstract attribute is missing from the derived-type description.
ford_project_file.md:
---
project: test
summary: test
src_dir: ../src
output_dir: ./doc
summary: test
author: test
author_description: test
display: private
proc_internals: true
show_proc_parent: true
preprocess: true
predocmark: >
source: true
graph: true
graph_maxdepth: 10
graph_maxnodes: 50
coloured_edges: false
search: true
max_frontpage_items: 4
parallel: 0
---
test.f90
module test
implicit none
private
public create
!> my base class
type, abstract, public :: base
!> base component
integer :: i = 5
end type base
interface
module function create() result(p)
class(base), pointer :: p
end function create
end interface
end module test
test_smod.f90
submodule (test) test_smod
implicit none
!> my implementation of base
type, extends(base) :: impl
!> implementation component
integer :: k = 6
end type impl
contains
module function create() result(p)
class(base), pointer :: p
allocate(impl :: p)
end function create
end submodule test_smod
from ford.
Ok re-reading the documentation I surmised that I need to provide public and private and possibly protected as well. I finally succeeded by adding the three lines
display: private
display: public
display: protected
to the project file. Is there any use-case where one wants to see private but not public instances? This is bound to cause confusion.
BTW: for the "abstract" property I will open a new issue.
from ford.
Is there any use-case where one wants to see private but not public instances? This is bound to cause confusion.
Yes, I don't think you're the first to be confused by this. I should write up a FAQ with common questions like this
from ford.
But, is there any use-case? Or should it not be changed to "private implies public"?
from ford.
Related Issues (20)
- Parser failure in associate block with []-arrays
- Division by zero exception in lines_description of sourceform.py HOT 4
- Some attributes are missing from derived types
- Option coloured_edges is broken HOT 1
- Can't link from a page to source code HOT 3
- Bug in logic to skip big or incomplete graphs HOT 1
- Graphs with long edge labels become degenerated HOT 5
- show_proc_parent is ignored HOT 2
- Create FAQ
- Feature request: Option to turn off certain homepage components HOT 1
- Idea: "Source File" link to GitHub
- Update to fontawesome v6 HOT 2
- Fortran keywords are highlighed in a regular preformatted code block HOT 3
- Links are case sensitive HOT 2
- Issue with the BLOCK Statement HOT 1
- Markdown line breaks not working in lists HOT 2
- Documentation generation on my local machine and on github gives different outcomes HOT 6
- Path.resolve can not resolve urls
- Absurdly tall graphs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ford.