Menu

White Star UML - STL

2014-01-22
2014-10-24
  • Kristi Johnsen

    Kristi Johnsen - 2014-01-22

    How can I define an attribute as an STL type, for example [std::list]?

     
  • Janusz Szpilewski

    I suppose the input parser chokes on "::" as it lexically collides with type specification ":" in UML. You may bypass it by typing non qualified type first and next update it with "std::" setting Type in Properties panel. It is accepting any text as no parsing happens there.

     
  • Kristi Johnsen

    Kristi Johnsen - 2014-01-22

    I don't understand what you want me to do. Type [non-qualified] where in the class diagram? I looked in the Properties panel and I don't see anywhere to see the type. Can you be more specific ? I'm sorry, I just started using this tool.

     
  • Janusz Szpilewski

    Probably you noticed already the Model Explorer in the panel on the right. You also should be able to find there the classes you created and their operations/attributes. After clicking on any of them the Properties panel below gets updated with related features. So after selecting an attribute you should be able to find the Type field at the top of the Properties. Similarly in the problem with generating getters and setters you must ensure that a suitable attribute is already selected in the Model Explorer.

     
  • Kristi Johnsen

    Kristi Johnsen - 2014-01-22

    Thank you again, this worked. To summarize for anyone else having this problem:

    In the Model Explorer, click on the attribute you want to define as an STL type.
    In the Properties box below, click on the Type field.
    Manually enter the STL type. For example:

    std::list

    Save, re-generate. Output will be the following:

    std::list listOfXMLFiles;

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.