artefaktur
software engineer &        architecture

 
 
 
 

acdk_tcl_dll - manual


acdk_tcl_dll enables to embed Tcl scripting code into your ACDK application.


Content of this chapter:

   Tcl as DMI Client
     Hello World Sample
     Type mapping
     Synopis Tcl
       acdk_new
       acdk_invoke
       acdk_invoke_static
       acdk_peek
       acdk_peek_static
       acdk_poke
       acdk_poke_static
   Embedded Tcl Interpreter



 Tcl as DMI Client

acdk_tcl provides the ACDK DMI client interface for Tcl scripts.

 Hello World Sample


proc foo{ string1 string2 }{
  set sb [acdk_new "acdk/lang/StringBuffer" $string1 ] 
  acdk_invoke $sb append $string2
  return [acdk_invoke $sb toString]
}
acdk_invoke [ acdk_peek_static "acdk/lang/System" out ] println [ foo "Hello Tcl" " from ACDK"]

 Type mapping

The atomic types will be mapped between ACDK and Tcl.
Strings are also be converted.
All other object types will not mapped.

 Synopis Tcl


 acdk_new


proc acdk_new{classname args}

Create an new instance of an ACDK object.
  • ACDK classname should be in form of:
    "acdk/lang/StringBuffer".
  • args are the arguments of the constructor of the acdk-Class.
  • return value is the handle to the ACDK object.

 acdk_invoke


proc acdk_invoke{object methodename args}
acdk_invoke calls a dynamic method of an ACDK object.
  • object is a ACDK object.
  • methodname name of the method to invoke
  • args are the arguments of the constructor of the acdk-Class.
  • return value is the return value of the method.

 acdk_invoke_static


proc acdk_invoke_static{classname methodename args}
acdk_invoke_static calls a static method of an ACDK object.
  • ACDK classname
  • methodname name of the method to invoke
  • args are the arguments of the constructor of the acdk-Class.
  • return value is the return value of the method.

 acdk_peek


proc acdk_peek{object membername args}
acdk_peek reads a public member of an ACDK object.
  • object is a ACDK object.
  • membername name of the member of the ACDK object.
  • return value is value of the member.

 acdk_peek_static


proc acdk_peek_static{classname membername}
acdk_peek_static reads a static member of an ACDK class.
  • ACDK classname
  • membername name of the member of the ACDK object.
  • return value is value of the member.

 acdk_poke


proc acdk_poke{object membername newval}
acdk_peek writes a public member of an ACDK object.
  • object is a ACDK object.
  • membername name of the member of the ACDK object.
  • newval value to write into member.
  • return no value.

 acdk_poke_static


proc acdk_oke_static{classname membername newval}
acdk_peek_static reads a static member of an ACDK class.
  • ACDK classname
  • membername name of the member of the ACDK object.
  • newval value to write into member.
  • return no value.

 Embedded Tcl Interpreter

The class  acdk::tcl::TclInterpreter implements the interpreter.
Please refer to  acdktcl - manual how to use it.
 
Last modified 2005-05-08 22:31 by SYSTEM By Artefaktur, Ing. Bureau Kommer