Dominance (C++)

Dominance (C++)

In the C++ programming language, dominance implies a specific behaviour of symbol disambiguation in virtual inheritance. Consider the following example:

class Parent
{
public:
    virtual void function();
};
 
class Child1 : public virtual Parent
{
public:
    void function();
};
 
class Child2 : public virtual Parent
{
};
 
class Grandchild : public Child1, public Child2
{
public:
   Grandchild()
    {
        function();
    }
};

In the Grandchild call to function(), Child1::function is implied, because Child1 is derived from Parent and thus Child1::function "dominates" Parent::function.

See also



Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • dominance — [ dɔminɑ̃s ] n. f. • XVIe; de dominer 1 ♦ Vx Fait de dominer (⇒ domination), d être dominant (⇒ prédominance). 2 ♦ Mod. Biol. Prépondérance d un gène ou d un caractère dominant sur son allèle récessif, chez un hétérozygote. ⇒ ép …   Encyclopédie Universelle

  • Dominance — may refer to: Dominance (C++), an aspect of virtual inheritance in the C++ programming language Dominance (economics), in economics, the degree of inequality in market share distribution Strategic dominance, in game theory, when one strategy is… …   Wikipedia

  • dominance — UK US /ˈdɒmɪnəns/ noun [U] ► the situation in which one company, product, etc. has more power, influence, or success than others: »The ability of a firm to set or control market prices is a sign of dominance …   Financial and business terms

  • Dominance — Dom i*nance, Dominancy Dom i*nan*cy, n. Predominance; ascendency; authority. [1913 Webster] …   The Collaborative International Dictionary of English

  • dominance — I noun ascendance, ascendancy, authority, control, dominancy, domination, dominion, eminence, force, governance, hold, importance, influence, mastery, mightiness, power, predominance, predominancy, prepollence, prepollency, preponderance,… …   Law dictionary

  • dominance — (n.) 1819; see DOMINANT (Cf. dominant) + ANCE (Cf. ance). Related: Dominancy …   Etymology dictionary

  • dominance — [n] supremacy ascendancy, authority, command, control, domination, dominion, government, influence, paramountcy, power, preeminence, preponderance, prepotence, prepotency, rule, sovereignty, sway, upper hand, whip hand; concepts 376,668 Ant.… …   New thesaurus

  • dominance — ► NOUN 1) power and influence over others. 2) Genetics the property of being dominant …   English terms dictionary

  • dominance — [däm′ə nəns] n. a dominating, or being dominant; control; authority: also dominancy …   English World dictionary

  • dominance — noun ADJECTIVE ▪ absolute, clear, complete, overwhelming, total ▪ growing, increasing ▪ cultural, economic …   Collocations dictionary

  • dominance — dom|i|nance [ˈdɔmınəns US ˈda: ] n [U] the fact of being more powerful, more important, or more noticeable than other people or things →↑dominate dominance of ▪ the continuing dominance of the army in Uganda political/economic/cultural etc… …   Dictionary of contemporary English

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”