MGunit documentation

Unit testing for IDL

single page | use frames     summary     class     fields     routine details     file attributes

dist_tools/bindings/

mg_dlm__define.pro

includes main-level program

Class representing a DLM made from a list of wrapper routines.

Examples

This example creates a DLM to access a few internal routines: char *IDL_OutputFormatFunc(int type) int IDL_OutputFormatLenFunc(int type) int IDL_TypeSizeFunc(int type) char *IDL_TypeNameFunc(int type) void IDL_TTYReset(void) Create the DLM by running: IDL> .run mg_dlm__define Then you have access to the routines from IDL: IDL> print, IDL_OutputFormatFunc(5) %#16.8g IDL> print, IDL_OutputFormatLenFunc(5) 16 IDL> print, IDL_TypeSizeFunc(5) 8 IDL> print, IDL_TypeNameFunc(5) DOUBLE

Class description for mg_dlm

Properties

basename set

basename (including possible path) for .c and .dlm files

_extra init
source set

source in DLM header

build_date set

date in DLM header

name get set

name in DLM header

version set

version in DLM header

description set

description in DLM header

Routines

mg_dlm::setProperty, basename=basename, name=name, description=description, version=version, source=source, build_date=build_date

Set properties.

mg_dlm::getProperty, name=name

Get properties.

result = mg_dlm::output_c()

Returns the .c file text as a string.

result = mg_dlm::output_dlm()

Returns the .dlm file text as a string.

mg_dlm::write

Writes the .c and .dlm files to the BASENAME location.

mg_dlm::build, _extra=_extra

Compiles and links the DLM.

mg_dlm::register
mg_dlm::load
mg_dlm::addInclude, name [, /system] [, header_directory=string] [, lib_directory=string] [, lib_files=strarr]

Add an include file to the DLM.

mg_dlm::addRoutine, routine

Adds a wrapper routine to the DLM.

mg_dlm::addRoutineFromPrototype, proto

Adds a wrapper routine defined by a prototype given by a string to the DLM.

mg_dlm::addRoutinesFromHeaderFile, filename

Adds wrapper routines from a header file.

mg_dlm::addPoundDefineAccessor, name, type=type
mg_dlm::cleanup

Free resources.

result = mg_dlm::init(_extra=_extra)

Create the DLM object.

mg_dlm__define

Define instance variables.

Routine details

top mg_dlm::setProperty

mg_dlm::setProperty, basename=basename, name=name, description=description, version=version, source=source, build_date=build_date

Set properties.

Keywords

basename

basename (including possible path) for .c and .dlm files

name

name in DLM header

description

description in DLM header

version

version in DLM header

source

source in DLM header

build_date

date in DLM header

top mg_dlm::getProperty

mg_dlm::getProperty, name=name

Get properties.

Keywords

name

name in DLM header

top mg_dlm::output_c

result = mg_dlm::output_c()

Returns the .c file text as a string.

Return value

string

top mg_dlm::output_dlm

result = mg_dlm::output_dlm()

Returns the .dlm file text as a string.

Return value

string

top mg_dlm::write

mg_dlm::write

Writes the .c and .dlm files to the BASENAME location.

top mg_dlm::build

mg_dlm::build, _extra=_extra

Compiles and links the DLM.

Keywords

_extra

top mg_dlm::register

mg_dlm::register

top mg_dlm::load

mg_dlm::load

top mg_dlm::addInclude

mg_dlm::addInclude, name [, /system] [, header_directory=string] [, lib_directory=string] [, lib_files=strarr]

Add an include file to the DLM.

Parameters

name in required type=string

name of the include file, including the .h

Keywords

system in optional type=boolean

set to indicate that the include is a system include file, i.e., that there should be <>'s around the name instead of ""'s

header_directory in optional type=string

filepath to include file, if not in a standard location

lib_directory in optional type=string

directory of lib files

lib_files in optional type=strarr

library files

top mg_dlm::addRoutine

mg_dlm::addRoutine, routine

Adds a wrapper routine to the DLM.

Parameters

routine in required type=object

routine object to add to the DLM

top mg_dlm::addRoutineFromPrototype

mg_dlm::addRoutineFromPrototype, proto

Adds a wrapper routine defined by a prototype given by a string to the DLM.

Parameters

proto in required type=string

prototype of the routine to add to the DLM

top mg_dlm::addRoutinesFromHeaderFile

mg_dlm::addRoutinesFromHeaderFile, filename

Adds wrapper routines from a header file.

Parameters

filename in required type=string

header filename

top mg_dlm::addPoundDefineAccessor

mg_dlm::addPoundDefineAccessor, name, type=type

Parameters

name

Keywords

type

top mg_dlm::cleanup

mg_dlm::cleanup

Free resources.

top mg_dlm::init

result = mg_dlm::init(_extra=_extra)

Create the DLM object.

Keywords

_extra

top mg_dlm__define

mg_dlm__define

Define instance variables.

File attributes

Modification date: Sat Feb 12 09:28:16 2011
Lines: 546
Docformat: rst rst