Downcasting

Downcasting

In object-oriented programming, downcasting or type refinement is the act of casting a reference of a base class to one of its derived classes.

In most programming languages, it is usually possible to check through RTTI whether the type of the referenced object is indeed the one being cast to or a derived type of it, and thus issue an error if it is not the case.

See also

  • Subtype polymorphism

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Понижающее приведение — В объектно ориентированном программировании, понижающее приведение (англ.  downcasting) или «уточнение типа» (англ. type refinement)  акт приведения типа, ссылающегося на базовый класс, к одному из его производных классов. В… …   Википедия

  • Top type — The top type in type theory, commonly abbreviated as top or by the down tack symbol (⊤) is the universal type that type which contains every possible object in the type system of interest. The top type is sometimes called the universal supertype… …   Wikipedia

  • Oxygene (programming language) — Oxygene Developer RemObjects Software Stable release 3.0.21 (August 29, 2009; 2 years ago (2009 08 29)) Influenced by Object Pas …   Wikipedia

  • Comparison of programming languages (object-oriented programming) — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

  • Oxygene (язык программирования) — У этого термина существуют и другие значения, см. Oxygene. Oxygene Релиз: 4.0.25 (20 августа 2010) Испытал влияние: Object Pascal, C# …   Википедия

  • Type system — Type systems Type safety Inferred vs. Manifest Dynamic vs. Static Strong vs. Weak Nominal vs. Structural Dependent typing Duck typing Latent typing Linear typing Uniqueness typing …   Wikipedia

  • Type conversion — This article is about the computer science concept. For the aviation licensing process, see Type conversion (aviation). In computer science, type conversion, typecasting, and coercion refers to different ways of, implicitly or explicitly,… …   Wikipedia

  • Low Level Virtual Machine — infobox software name = LLVM developer = LLVM Developer Group Apple, Inc latest release version = 2.3 latest release date = 9 June 2008 released = 2000 operating system = Cross platform genre = Compiler license = University of Illinois/NCSA Open… …   Wikipedia

  • Metaprogrammation avec des patrons — Métaprogrammation avec des patrons La métaprogrammation avec des patrons est une technique de programmation dans laquelle les patrons sont utilisés de sorte que le compilateur, lors de la compilation du code, exécute un programme. Ces programmes… …   Wikipédia en Français

  • Métaprogrammation Avec Des Patrons — La métaprogrammation avec des patrons est une technique de programmation dans laquelle les patrons sont utilisés de sorte que le compilateur, lors de la compilation du code, exécute un programme. Ces programmes peuvent générer des constantes ou… …   Wikipédia en Français

Share the article and excerpts

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