OTcl

OTcl

OTcl usually refers to an object oriented extension of Tcl created by David Wetherall at MIT[1]. It is used in network simulator (NS-2) and usually run under Unix environment[2]. This was later extended into XOTcl.

OTcl may also refer to the unrelated IXI Object Tcl extension by Dean Sheenan.

These object Tcl extensions predate the more popular incr Tcl.

Contents

Syntax Introduction

The reserved word Class is used to represent class and method of class are declared using word instproc.[2] The variable self is pointer to the class it is used in and is equivalent to variable this of C++/Java. The keyword -instproc is used for defining hierarchy.[2] For example Class Son -instproc Father means that class Son inherits from class Father. To create an instance of class son we can write set new_inst [new Son]. Following is a simple example of code.

// Sample code in OTcl
Class HelloWorld
HelloWorld instproc hello {} {
        puts "Hello world"
}

set helloworld [new HelloWorld]
//to run
$helloworld hello

TclCL

TclCL (Tcl with classes) is a Tcl/C++ interface used by Mash, vic, vat, rtp_play, ns, and nam. It provides a layer of C++ glue over OTcl.[3]

See also

References

  1. ^ OTcl Project Page
  2. ^ a b c Eitan Altman and Tania Jiménez, NS Simulator for beginners, Lecture notes, 2003-2004, Univ. de Los Andres, Merida, Venezuela and ESSI, Sophia-Antipolis, France
  3. ^ TclCL Project Page



Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • XOtcl — Семантика: объектно ориентированный, аспектно ориентированный Тип исполнения: интерпретатор Появился в: 2000 г. Автор(ы): Gustaf Neumann и др. Типизация данных …   Википедия

  • Xotcl — Семантика: объектно ориентированный, аспектно ориентированный Тип исполнения: интерпретатор Появился в: 2000 г. Автор(ы): Gustaf Neumann и др. Типизация данных …   Википедия

  • XOTcl — Семантика: объектно ориентированный, аспектно ориентированный Тип исполнения …   Википедия

  • TCL — Семантика: императивный, скриптовый Тип исполнения: интерпретатор Появился в: 1988 г. Автор(ы): Джон Остераут Последняя версия: 8.5.7 / 15 апреля 2009 …   Википедия

  • Ns (simulator) — ns or the network simulator (also popularly called ns 2, in reference to its current generation) is a discrete event network simulator. It is popular in academia for its extensibility (due to its open source model) and plentiful online… …   Wikipedia

  • Tcl — Tool Command Language Desarrollador(es) Tcl Core Team[1] …   Wikipedia Español

  • Ns (simulador) — Saltar a navegación, búsqueda ns (más conocido como ns 2 por su versión actual) es un simulador de redes de eventos discretos. Utilizado principalmente en ambientes académicos debido a que está escrito en código abierto y a la abundancia de… …   Wikipedia Español

  • Tcl — Запрос «TCL» перенаправляется сюда; о минидистрибутиве Linux см. Tiny Core Linux. Tcl Семантика: императивный …   Википедия

  • ns (simulator) — ns 2 redirects here. For the fictional robot from the works of Isaac Asimov, see NS 2 (literary character). For other uses of NS , see NS (disambiguation). ns 3 Initial release June 30, 2008 (2008 06 30) …   Wikipedia

  • ns (simulador) — ns (ns 2 y ns 3) Desarrollador Comunidad [1] Informa …   Wikipedia Español

Share the article and excerpts

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