In class diagram, how to place the function parameters on multiline?

+1 vote
asked Sep 8 in Bug by mountqi (120 points)

@startuml imaging_class_diagram

class CImaging {

    +void Init(const ToolConfig& config, PolarizedIllumSource& illum_src,

        C3DStructure& structure3d,

        CVectorialProjection& projection );



Hi, please check the scripts above.  The function parameters are placed on multilines, then the class diagram is wrong.  I cannot upload image here.

1 Answer

+1 vote
answered Sep 11 by dragondive (300 points)

I could only think of a "workaround" like this. Format it manually using "\" for line continuation and "\n" to specify the newline character. I'm not sure if there's a way to do this in a more "automated" way, although you might be able to "hack" it using the preprocessor directives.

commented Sep 11 by The-Lu (31,200 points)

Hello all,

If you want, you can also combine on other way around, with '\n\' (that is a magic operator cheeky), like:

class CImaging {
    +void Init(const ToolConfig& config,\n\
        PolarizedIllumSource& illum_src,\n\
        C3DStructure& structure3d,\n\
        CVectorialProjection& projection );