[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

glue example: template file



*** FILE "greetingGlueTemplate.self" ***

"*** Hernan Astudillo R.
 *** Feb 10, 1992
 *** (adapted from termcapTemplates.self)"
"Template used by primitiveMaker to create Self wrapper and .h file."

primitiveMaker reader copy dynamicLinking  create: 'greetingGlue' From: '
	-- Hernan Astudillo R, Feb 10, 1992
	-- (hernan@cc.gatech.edu)
	-- template file:  greetingGlueTemplates.self
	traits: traits greetingClass
	macroName: greetingClass
	glueLibraryName: libgreetingGlue.so.0

    ^ void greeting_new_glue: string  = Greeting {greetingProto deadCopy} new
    ^ Greeting greeting_delete_glue = void delete
    ^ Greeting greeting_sayIt_glue: int =  void callMember sayIt
'
"*** These templates define glue for the following C++ expressions:
	new Greeting( <aString> )
		//returning the result in (greetingProto deadCopy)
	delete <aGreeting>
	<aGreeting>->sayIt( <anInt> )
 ***"
"end templates"