Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
Requests and responses share the version, fields, and body but have a few members unique to the type. This is implemented by declaring the header classes as partial specializations of请求和响应共享版本号、字段及消息体,但各自拥有一些特有的成员。该设计通过将 `header` 类声明为 `isRequest`.的偏特化来实现。__message__is derived from __header__; a message may be passed as an argument to a function taking a suitably typed header as a parameter. Additionally, `header` is publicly derived from `Fields`; a message inherits all the member functions of `Fields`. This diagram shows the inheritance relationship between派生自 __header__,因此消息可作为参数传递给接受相应类型头部参数的函数。此外,`header` 公开继承自 `Fields`,因此消息也继承了 `Fields` 的所有成员函数。下图展示 `headerand` 与 `message, along with some of the notable differences in members in each partial specialization:` 的继承关系,以及每个偏特化中部分显著成员的差异: