[英]C++ Class diagram and {query}
I am trying to learn UML class diagrams + c++ and I stumbled upon {query}
being used after operation.我正在尝试学习 UML 类图 + c++,我偶然发现
{query}
在操作后被使用。 For example class diagram in picture does have {query}
after operation.例如图片中的类图在操作后确实有
{query}
。
Notice that I the (ref symbol) means & symbol (const std::string&)
.请注意,我 (ref symbol) 表示
& symbol (const std::string&)
。 What would {query}
look code wise? {query}
看起来是什么代码? Any tips?有小费吗?
Constructor is supposed to save parameter to attribute and then member function would return it.构造函数应该将参数保存到属性,然后成员函数将返回它。
Thank you in advance.先感谢您。
According to p.根据页。 116 of UML 2.5:
UML 2.5 的 116:
<oper-property>
indicates the properties of the Operation.<oper-property>
表示操作的属性。
<oper-property>::= 'redefines' <oper-name> | 'query' | 'ordered' | 'unordered' | 'unique' | 'nonunique' | 'seq' | 'sequence' | <oper-constraint>
where
在哪里
- 'query' means that the Operation does not change the state of the system.
“查询”意味着操作不会改变系统的状态。
Basically you just can think of that as implementation of a property.基本上你可以将其视为属性的实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.