External Polymorphism An Object Structural Pattern for Transparently Extending C++ Concrete Data Types
نویسندگان
چکیده
This paper describes the External Polymorphism pattern, which allows classes that are not related by inheritance and/or have no virtual methods to be treated polymorphically. This pattern combines C++ language features with patterns like Adapter and Decorator [1] to give the appearance of polymorphic behavior on otherwise unrelated classes. The External Polymorphism pattern has been used in a number of C++ frameworks such as ACE [2] and the OSE class library. This article is organized as follows. Section 1 describes the External Polymorphism pattern in much greater detail than an earlier version appearing in [3], Section 2 describes an example implementation using C++, and Section 3 presents concluding remarks.
منابع مشابه
External Polymorphism An Object Structural Pattern for Transparently Extending Concrete Data Types
It hard to debug applications built using reusable class libraries. For instance, when an error occurs in the library developers often don’t know the names of all the relevant objects in order to be able to dump their current state (e.g., in a debugger or in print statements). Therefore, class libraries should be able to dump the content of some or all objects that are “live” at a given point d...
متن کاملPre-Cracked Concrete Shear Strengthened with External CFRP Strips
In reinforced concrete design, there are situations where transfer of shear across a specific plane needs to be considered. Examples of such situation include corbels, bearing shoes, ledger beam bearing, and a host of connection between precast concrete elements. In this study, the shear transfer behavior of reinforced concrete is investigated experimentally by conducting test on 6 precracked p...
متن کاملELMO: extending (sequential) languages with migratable objects-compiler support
EEcient task migration is an important feature in parallel and distributed programs, in particular to support checkpointing and recovery for fault tolerance. It is also very useful in distributed environments like networks of workstations where external loads are often unpredictable and dynamic in nature. We propose simple language extensions (ELMO) to existing sequential programming languages ...
متن کاملExternal Control an Object-structural Pattern for Mapping Hierarchical Structures to External Control Mechanisms
Controlling parameters is a necessity in every non-trivial application. We present a pattern that aids in decoupling external control mechanics from the internal component structure, while supporting the automatic mirroring of internal structure into external representation. Furthermore, we show how to use this pattern in the implementation of a C++ component for stream-based control that has b...
متن کاملMore Than Parsing
We introduce Generalised Object Normal Form (GONF), a syntax formalism that enables language designers to de ne concrete syntax in a form that also naturally de nes the data structure of the abstract syntax tree. More precisely, GONF's grammatical productions specify simultaneously and without annotations (1) concrete syntax (a language and its parser) and (2) the collection of languageindepend...
متن کامل