Jafar
Classes
Module helloworld

Detailed Description

Version:
0.3
Author:
thomas.lemaire@laas.fr, maxime.cottret@laas.fr

This is a very minimal helloWorld module. It shows how to add a simple class jafar::helloworld::HelloWorld and a user defined exception jafar::helloworld::HelloEmptyException.

History

Macro

Example use of helloWorld module

Using low level swig functions

00001 # $Id$ #
00002 
00003 package require helloworld
00004 
00005 #
00006 # The low level swig functions
00007 #
00008 
00009 set hello [helloworld::new_HelloWorld]
00010 
00011 helloworld::HelloWorld_printHello $hello
00012 
00013 helloworld::HelloWorld_setHello $hello "Hello world \!"
00014 
00015 puts ""
00016 
00017 helloworld::HelloWorld_printHello $hello
00018 

Using an object interface

00001 # $Id$ #
00002 
00003 package require kernel
00004 package require helloworld
00005 
00006 #
00007 # using procedure new
00008 #
00009 
00010 set hw [helloworld::newHelloWorld]
00011 
00012 $hw printHello
00013 
00014 $hw setHello "Hello world \!"
00015 
00016 puts ""
00017 
00018 $hw printHello
00019 
00020 #
00021 # tcl procedure in package helloworld::demoHello
00022 #
00023 
00024 # help procedure
00025 help helloworld::demoHello
00026 
00027 helloworld::demoHello 4

Helloworld demo

pollux[jafar] jafar

Welcome in jafar !         (c) 2004 LAAS-CNRS

jafar_dir: /home/tlemaire/Work/jafar

Available packages:
  kernel...0.1
  helloworld...0.3
  jmath...0.1
  filter...0.1

jafar [~/Work/jafar]package require helloworld 
0.3
jafar [~/Work/jafar]helloworld::JafarDebug_setOff 
jafar [~/Work/jafar]help helloworld::demoHello 
usage: helloworld::demoHello n
this is a demo tcl procedure
create n HelloWorld object and print them
jafar [~/Work/jafar]helloworld::demoHello 4
Hello world ! (0)
Hello world ! (1)
Hello world ! (2)
Hello world ! (3)

Tcl interface (generated by swig)

The interface of the module is generated from the following files:

Classes

class  jafar::helloworld::HelloWorld
 HelloWorld class. More...
class  jafar::helloworld::HelloworldException
 Base class for all exceptions defined in the module helloworld. More...
class  jafar::helloworld::HelloworldFormatException
 hello attribute not initialized. More...
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:30 for Jafar by doxygen 1.7.6.1
LAAS-CNRS