apigen

package
v0.0.0-...-a20b597 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2015 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

This package implements automated mumax API generation. Based on the exported methods of engine.API, an API library in any of the supported programming languages is automatically generated.

Author: Arne Vansteenkiste

This package implements automated mumax API generation. Based on the exported methods of engine.API, an API library in any of the supported programming languages is automatically generated.

Author: Arne Vansteenkiste

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGen

func APIGen()

Auto-generate API libraries for all languages.

Types

type Lang

type Lang interface {
	Filename() string          //file name for the API file
	Comment() string           //Comment token like # or //
	WriteHeader(out io.Writer) //Write the header of the source file
	WriteFooter(out io.Writer) // Write the footer of the source file
	WriteFunc(out io.Writer,
		name string,
		comment []string,
		argNames []string,
		argTypes []reflect.Type,
		returnTypes []reflect.Type) // Write a function wrapper to the source file
}

Represents a programming language.

type Python

type Python struct{}

func (*Python) Comment

func (p *Python) Comment() string

func (*Python) Filename

func (p *Python) Filename() string

func (*Python) WriteFooter

func (p *Python) WriteFooter(out io.Writer)

func (*Python) WriteFunc

func (p *Python) WriteFunc(out io.Writer, name string, comment []string, argNames []string, argTypes []reflect.Type, returnTypes []reflect.Type)

func (*Python) WriteHeader

func (p *Python) WriteHeader(out io.Writer)

type Tex

type Tex struct{}

Does not generate a true API library, but a TeX file with API documentation.

func (*Tex) Comment

func (p *Tex) Comment() string

func (*Tex) Filename

func (p *Tex) Filename() string

func (*Tex) WriteFooter

func (p *Tex) WriteFooter(out io.Writer)

func (*Tex) WriteFunc

func (p *Tex) WriteFunc(out io.Writer, name string, comment []string, argNames []string, argTypes []reflect.Type, returnTypes []reflect.Type)

func (*Tex) WriteHeader

func (p *Tex) WriteHeader(out io.Writer)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL