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.
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.
You can right click on the blank area of the diagram and select Presentation Options > Operation Display Options > Show Code Details to have the “const” show on diagram.