计算机外文翻译--c设计模式内容摘要:

C missioned may be difficult, especially because we repeat the definition of trust the meaning of the term. For example, we can use the mission of the term mission statement said a mission types, and even missioned an example. Particularly, people always say, Call a mission, but an object can only call a missioned example, not calling a missioned type. If you feel this is part of some confusion hard, do not worry, a lot of people are. But we should really seriously study missioned by the C is how to work. which is not only to understand how the application of the key, as well as understanding how the category of interactive key. 3. Interface and attributes C language can be an excuse for standardized interface must provide the indexer or C attributes. If your definition of a new type of set, then we need to standardize an indexer. If you make the following statement, a realization that must include a method and the method to use an attribute value, and (or) the need to set this attribute value, then you will need a standard C attributes. 华北科技学院毕业设计 (论文 ) 5 Following is a statement of a code without the use of C attributes interface, but the realization, the need for a targeting of the attributes of the visit. Public interface IAdvertisement { Int GetID ()。 String GetADCopy ()。 Void SetADCopy (string text)。 } The above code interface is Oozinoz system Showproperties part of the library. In simple terms, this meant to standardize the interface of two C attributes, but strictly speaking, they are not C attributes. The use of C syntax for C attributes the advantage of its syntax more elegant. However, the most important point is not to have the capacity to foresee the reflection customers can detect the presence of C attributes. For example, as long as the relevant attribute is the real target of C attributes, a Datagrid object can be in one ArrayList pools showing relevant object attributes. In an interface, C attributes expressed in the syntax is dependent, and therefore in achieving interface will have some differences. We should use indepth understanding of C interface characteristics of the relevant concepts and the use of details. 4. Interface details C interface of the main advantages is that the interface of object interaction of the restrictions. Such restrictions are, in fact, a liberation. On the realization of a certain type of interface, the category The interface in the provision of services in the process has undergone many changes, But these changes will not affect the class customers. Although excuses are very easy to understand, but in time, Also details of the development staff have been forced to resort to reference materials. Interface description of the types of interaction in the process of the expectations and do not expect to conduct acts. Interface with pure abstract categories is very similar, interface definition it should be pleted in the function, but we did not achieve these functions. Interface is also entrusted with a similar course, entrusted only to standardize the method of each method parameter and return types. Also missioned type, it can not be an inclusive one interface missioned and treat it as a member. However missioned by the types of variables and marking the event keyword variables could happen in interface. Apart from the methods and events, but also inclusive interface for indexing and attributes. These elements of the syntax is very important because customers through the use of these types of members and the use of reflection, Detection and understanding to achieve category 华北科技学院毕业设计 (论文 ) 6 (category refers to achieve the realization of Interface) behavior. Grasp how to use the C interface concept and very important details, that you deserve to spend some time. This part of this function is also a powerful sense of the design of the core content, as well as several of the core design pattern. 5. General Interface can not provide the content C interface can be used to simplify and strengthen the system design, of course, Sometimes the excuse that may be beyond the general interface definition and scope of use. If you want to make a kind of interface with a customer expectations interface adapter, the adapter can be applied to model. If you want to set such a simple interface, then the model can be applied appearance. If you want a definition of interface, so that it can be used to delay object, can be applied to the target group. Well, we can use synthetic model. If you want to achieve an abstract for their separation, so that they can change independently, then can be applied to bridge mode.。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。