[英]what does I mean in c++?
I have a method, where x
is a class and in the UML , for a different class (that uses class x ), a method is written as: 我有一个方法,其中x
是一个类,在UML中 ,对于不同的类(使用class x ),方法写为:
+setX(x I &)
What does the I
in the argument mean? 参数中的I
是什么意思? or is it just a typo? 还是仅仅是错字?
It looks like a poorly formatted UML entry regarding a public function named setX
taking a reference to an instance of x
, and naming that reference I
. 它看起来像格式不正确的UML条目,涉及名为setX
的公共函数,该公共函数引用 x
的实例,并命名该引用 I
I'm guessing the author meant to write +setX(INOUT I : x)
but got the syntax of the implementation language (in this case c++ ) mixed up with the Unified Modeling Language . 我猜作者打算写+setX(INOUT I : x)
但是将实现语言(在本例中为c ++ )的语法与统一建模语言混为一谈。
INOUT I : x
will make setX
accept a variable used for both input and output of type x
, and name this parameter I
. INOUT I : x
将使setX
接受用于类型x
输入和输出的变量,并将此参数命名为I
Note: setX(x I&)
is not legal c++ , but setX(x& I)
is. 注意: setX(x I&)
不是合法的c ++ ,但是setX(x& I)
是合法的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.