who can tell me ,what can i do when i want to show “const” keyword in my classdiagram,and how can i set the return parameter to const?just
when I write like this: “+operator!=(s : newString &)” the vp-uml will report the error message “Cannot confirm edit because there are syntax errors in text” how can i cancel the syntax check??
so,these are my questions:
1.how show “const” keyword in my classdiagram;
2.how set the return parameter to const;
3.how cancel the syntax check.
thanks very much
Thanks for your post. For your questions:
Please select Tools > Configure Programming Language and choose C++, then you can check “const” in Attribute Code Details or Operation Code Details (in Specification dialog of attribute/operation)
When you open the Specification dialog of parameter, you can see the checkbox “const” there.
The syntax check cannot be disabled, you got the syntax error message since you tried to enter invalid characters (e.g. “!”). After you correct your input to be valid, you will not get the error message.
If there is further inquiry, please do not hesitate to ask.
thank you very much. but I think you may have some mistakes to my means.
1,I know i can checked the “const” option for parameters but I want show “const” keyword in the diagram .
2,I want let the functions return type is consted,like this:
const int func(const int a) const;
I know parameter a and the funtion func can be consted by choose checkbox “const”. but the func’s return type how to become const. I’m not find where can be setted.
I’m chinese, i’m so sorry for my poor english.thanks for you help.I hope you can give me more infomation for VP-UML.
Sorry for my misunderstanding. For the issues you mentioned:
- Showing “const” on diagram is not standard in UML .
- You can select “const” in Operation Code Details tab inside operation’s Specification dialog, and select “const” in Parameter Code Details tab inside parameter’s Specification dialog. Then you will get the code generated as you want (see image). Hope this helps.
it seems, this option disappeared in later versions.
How can I achieve this option in the current version (Version 8.3 Build sp2_20120310)?
Please make sure you have select C++ as the project programming language (under Tools Menu). The const option will show up once you specified this.