langs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	ID   string
	Data [][]string
}

File represents a destination file to be written ID is the relative path of the file in its originating directory Data is a sequence of hexa string chunks representing the file as a binary resource

type Source

type Source struct {
	Name      string
	NS        string
	Template  string
	Extension string
	Files     []*File
}

Source represents a source model bound to a specific language Name is the name of the file to be written without extension NS is the destination namespace from where resources should be fetched Template is the source code template to be used for writing the file Extension is the destination file extension (eg .h for cpp lang) Files are the files to be written as binary resources accessible within NS

func NewCppSource

func NewCppSource(name, ns string) *Source

NewCppSource returns a binary data cpp source model

func NewGoSource

func NewGoSource(name, ns string) *Source

NewGoSource returns a binary data go source model

func NewSource

func NewSource(lang, name, ns string) (*Source, error)

NewSource generates a source model, bound to a specific language with a preallocated files storage

func (Source) GetFileName

func (src Source) GetFileName() string

GetFileName returns the definitive file name to be written

Jump to

Keyboard shortcuts

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