Documentation of parametric composite types in Julia -
i have following parametric composite type.
struct patient{t <: union{homogenousmesh, volume}} isocenters::vector{vector{point}} tumors::vector{t} oars::vector{t} maps::vector{affinemap} end
now display different kind of documentation depending on value of parameter t
. i.e. in case write separate documentation each of the
patient patient{homogenousmesh} patient{volume}
any suggestions or pointers can read implementing this?
as rahul lakhanpal states in comment, can override docs.getdoc() manually.
struct volume end struct homogenousmesh end struct patient{t <: union{homogenousmesh, volume}} x::t end docs.getdoc(x::patient{homogenousmesh}) = "this homogenousmesh patient" docs.getdoc(x::patient{volume}) = "this volume patient" x = patient(homogenousmesh()) y = patient(volume()) ?x ?y
Comments
Post a Comment