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:
+setX(x I &)
What does the I
in the argument mean? 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
.
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 .
INOUT I : x
will make setX
accept a variable used for both input and output of type x
, and name this parameter I
.
Note: setX(x I&)
is not legal c++ , but setX(x& I)
is.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.