| dbpprop:abstract
|
- In programming, RTTI (Run-Time Type Information, or Run-Time Type Identification) refers to a C++ system that keeps information about an object's data type in memory at runtime. Run-time type information can apply to simple data types, such as integers and characters, or to generic objects. This is a C++ implementation of a more generic concept called reflection. In the original C++ design, Stroustrup did not include run-time type information, because he thought this mechanism was frequently misused.
- RTTI steht als Abkürzung für Runtime Type Information ("Typinformation zur Laufzeit"), ein Begriff aus der Softwareentwicklung und Bestandteil verschiedener Programmiersprachen. RTTI ermöglicht es, zur Laufzeit den Typ eines Objektes zu ermitteln. Somit kann ein Programm während seiner Ausführung ermitteln, welcher konkreten Klasse ein Objekt angehört, auf das eine bestimmte Referenz zeigt. Ohne diesen Mechanismus "wüsste" das Programm an dieser Stelle nur, dass ein Exemplar irgendeiner Klasse referenziert wird, die von der Basisklasse abgeleitet ist. Mit diesem Mechanismus "weiß" es, welcher Klasse das referenzierte Objekt angehört. Während RTTI einen recht einfachen Mechanismus darstellt, der üblicherweise nur den Namen der konkreten Klasse liefert, gibt es in moderneren Programmiersprachen den Mechanismus der Reflexion, der es ermöglicht auch Informationen über andere Eigenschaften einer Klasse zur Laufzeit zur ermitteln, z. B. die Namen und Signaturen ihrer Methoden.
- Run-Time Type Information est un terme informatique utilisé pour signaler la capacité d'un langage de programmation à déterminer le type d'une variable lors de l'exécution d'un programme. Bien que disponible dans la plupart des langages de programmation, le terme RTTI est souvent utilisé en référence au C++ qui par défaut, détermine le type à la compilation. Ce typage dynamique explicite en C++ – déclaré par l'utilisation de l'opération dynamic_cast<> – diffère de celui automatique de l'Objective-C pour lequel le typage et l'édition de liens sont réalisés lors de l'exécution. Voici un exemple d'utilisation de la RTTI en C++ : class point; class trait { public: virtual void dessine = 0; // fonction virtuelle pure : la classe, abstraite, ne peut être instanciée virtual ~trait { class segment : public trait { // classe dérivée de trait : doit implémenter dessine public: point intersection(segment T); point intersection(arc A); class arc : public trait { // classe dérivée de trait : doit implémenter dessine public: point intersection(segment T); point intersection(arc A); point intersection(trait &T1, trait &T2) { segment S2 = dynamic_cast<segment &>(T2); arc A2 = dynamic_cast<arc &>(T2); if(S2) return T1. intersection(S2); if(A2) return T1. intersection(A2); Comme on peut le voir, le but de la dernière fonction est de trouver le point d'intersection de deux traits dont les types (arc ou segment) ne seront connus qu'à l'exécution du programme . Le polymorphisme règle le problème pour la première variable (T1) puisque T1. intersection appellera arc::intersection ou segment::intersection suivant le type de T1. Il reste cependant le problème du type de l'argument T2 puisque un simple appel à T1. intersection(T2); génère une erreur du compilateur ne sachant quelle fonction utiliser à l'édition de lien. Si le typage échoue (ce qui est forcément le cas dans cet exemple, soit pour S2, soit pour A2), le programme peut générer une exception bad_cast.
- La RTTI (RunTime Type Information) consente ai programmi che manipolano puntatori e riferimenti ad oggetti di una classe base, di determinare il tipo dell'oggetto durante l'esecuzione invece che solo al momento della compilazione. Questa caratteristica è utile nei programmi in cui si ha la necessità di aggiungere una qualche funzione virtuale ad una gerarchia di classi, ma non si ha accesso al codice sorgente di queste classi. Infatti, l'aggiunta di questa funzione personale comporta la ricompilazione di tutte le funzioni membro che ne fanno uso. Questo è particolarmente vero per le librerie realizzate da terze parti: si ha a disposizione soltanto i file header e la versione precompilata, ma non il codice sorgente. In questa situazione non è possibile effettuare la ricompilazione. Per i dettagli su come gestire questa caratteristica si rimanda alla documentazione del proprio linguaggio di programmazione. RTTI, come termine è tipicamente utilizzato in relazione al C++. Per far si che le operazioni che coinvolgono il dynamic cast<>, l'operatore typeid o le eccezioni funzionino in C++, l'RTTI deve essere abilitato.
- 実行時型情報(じっこうじかたじょうほう、RTTI、RunTime Type Identification)とは、実行時、メモリ上に存在するオブジェクトのデータ型に関する情報のことである。 主に継承構造や、実装によってはメンバ関数などの情報を保持していることもある。これによってプログラムのオブジェクト・変数の型を動的(実行時)に判別できるようにすることができる。 実行時型情報は多くのプログラミング言語で用いることができるが、RTTIは特にC++で用いられる言葉である。C++でdynamic_castまたはtypeid演算子を用いるにはRTTIを有効にしなければならない。
- RTTI (Run Time Type Information – informacja o typie w trakcie wykonywania programu) jest techniką stosowaną w nowoczesnych obiektowych językach programowania. Technika ta polega na dołączeniu do kodu programu informacji o typach (klasach), czasami też ich własnościach i dostępnych metodach.
- Runtime Type Information (frequentemente abreviado para RTTI; Informação de Tipo em Tempo de Execução em inglês) é uma técnica disponível em algumas linguagens de programação e que consiste em manter informação sobre o tipo de dado de um objeto em memória durante o tempo de execução de um programa de computador. Algumas implementações limitam-se a manter somente a árvore de heranças da classe enquanto outras também incluem informações dos métodos do objeto e seus atributos.
- Runtime Type Information sau Runtime Type Identification (RTTI), termen tradus în limba română ca Informaţie de tip la rulare, este o modalitate prin care informaţia despre tipul de dată al unui obiect este ţinută în memorie în momentul execuţiei. Metoda RTTI poate fi aplicată tipurilor simple de date, cum ar fi datele de tip caracter şi cele de tip întreg, sau obiectelor generice. În cazul obiectelor, câteva implementări sunt limitate la menţinerea structurii arborelui de moştenire în timp ce altele includ informaţii despre atributele şi metodele obiectelor. Deşi se găseşte în mai multe limbaje ce programare, RTTI, ca termen, este utilizat de obicei cu referire la C++. Pentru ca operaţia de conversie dinamică<>, operatorul sau excepţiile să funcţioneze în C++, trebuie activat modul RTTI.
- Динамическая идентификация типа данных (англ. Run-time type information, Run-time type identification, RTTI) — механизм в некоторых языках программирования, который позволяет определить тип данных переменной или объекта во время выполнения программы.
- 在程式設計中,所謂的執行期型態訊息(Runtime type information,RTTI)指的是在程式執行時保存其物件的型態訊息的行為。某些語言實作僅保留有限的型態訊息,例如繼承樹資訊,而某些實作會保留較多資訊,例如物件的屬性及方法訊息。 執行期型態訊息是一個電腦術語,用以標示一個電腦語言是否有能力在執行期保持或判別其物件或變數的型態訊息。 雖然執行期型態訊息是一個通用的電腦術語,但是通常用來稱呼C++的特質。為了讓C++的指令達到動態指派(dynamic_cast)、型態識別碼(typeid)操作與例外處理的能力,執行期型態訊息是必須的。
|
| rdfs:comment
|
- In programming, RTTI (Run-Time Type Information, or Run-Time Type Identification) refers to a C++ system that keeps information about an object's data type in memory at runtime. Run-time type information can apply to simple data types, such as integers and characters, or to generic objects. This is a C++ implementation of a more generic concept called reflection.
- RTTI steht als Abkürzung für Runtime Type Information ("Typinformation zur Laufzeit"), ein Begriff aus der Softwareentwicklung und Bestandteil verschiedener Programmiersprachen. RTTI ermöglicht es, zur Laufzeit den Typ eines Objektes zu ermitteln. Somit kann ein Programm während seiner Ausführung ermitteln, welcher konkreten Klasse ein Objekt angehört, auf das eine bestimmte Referenz zeigt.
- Run-Time Type Information est un terme informatique utilisé pour signaler la capacité d'un langage de programmation à déterminer le type d'une variable lors de l'exécution d'un programme. Bien que disponible dans la plupart des langages de programmation, le terme RTTI est souvent utilisé en référence au C++ qui par défaut, détermine le type à la compilation.
- La RTTI (RunTime Type Information) consente ai programmi che manipolano puntatori e riferimenti ad oggetti di una classe base, di determinare il tipo dell'oggetto durante l'esecuzione invece che solo al momento della compilazione. Questa caratteristica è utile nei programmi in cui si ha la necessità di aggiungere una qualche funzione virtuale ad una gerarchia di classi, ma non si ha accesso al codice sorgente di queste classi.
- RTTI (Run Time Type Information – informacja o typie w trakcie wykonywania programu) jest techniką stosowaną w nowoczesnych obiektowych językach programowania. Technika ta polega na dołączeniu do kodu programu informacji o typach (klasach), czasami też ich własnościach i dostępnych metodach.
- Runtime Type Information (frequentemente abreviado para RTTI; Informação de Tipo em Tempo de Execução em inglês) é uma técnica disponível em algumas linguagens de programação e que consiste em manter informação sobre o tipo de dado de um objeto em memória durante o tempo de execução de um programa de computador.
- Runtime Type Information sau Runtime Type Identification (RTTI), termen tradus în limba română ca Informaţie de tip la rulare, este o modalitate prin care informaţia despre tipul de dată al unui obiect este ţinută în memorie în momentul execuţiei. Metoda RTTI poate fi aplicată tipurilor simple de date, cum ar fi datele de tip caracter şi cele de tip întreg, sau obiectelor generice.
- Динамическая идентификация типа данных (англ. Run-time type information, Run-time type identification, RTTI) — механизм в некоторых языках программирования, который позволяет определить тип данных переменной или объекта во время выполнения программы.
|