types

package
v0.0.0-...-bb7d413 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedUntilNewLineWriter

type BufferedUntilNewLineWriter struct {
	PrintFunc PrintFunc
	Buffer    bytes.Buffer
	// contains filtered or unexported fields
}

func (*BufferedUntilNewLineWriter) Flush

func (w *BufferedUntilNewLineWriter) Flush()

func (*BufferedUntilNewLineWriter) Write

func (w *BufferedUntilNewLineWriter) Write(p []byte) (n int, err error)

type CTag

type CTag struct {
	FunctionName string
	Kind         string
	Line         int
	Code         string
	Class        string
	Struct       string
	Namespace    string
	Filename     string
	Typeref      string
	SkipMe       bool
	Signature    string

	Prototype          string
	PrototypeModifiers string
}

type Command

type Command interface {
	Run(ctx *Context) error
}

type Context

type Context struct {
	// Build options
	HardwareDirs         paths.PathList
	ToolsDirs            paths.PathList
	BuiltInToolsDirs     paths.PathList
	BuiltInLibrariesDirs paths.PathList
	OtherLibrariesDirs   paths.PathList
	SketchLocation       *paths.Path
	WatchedLocations     paths.PathList
	ArduinoAPIVersion    string
	FQBN                 *cores.FQBN
	CodeCompleteAt       string

	// Build options are serialized here
	BuildOptionsJson         string
	BuildOptionsJsonPrevious string

	PackageManager *packagemanager.PackageManager
	Hardware       *cores.Packages
	AllTools       []*cores.ToolRelease
	RequiredTools  []*cores.ToolRelease
	TargetBoard    *cores.Board
	TargetPackage  *cores.Package
	TargetPlatform *cores.PlatformRelease
	ActualPlatform *cores.PlatformRelease
	USBVidPid      string

	PlatformKeyRewrites    PlatforKeysRewrite
	HardwareRewriteResults map[*cores.PlatformRelease][]PlatforKeyRewrite

	BuildProperties      properties.Map
	BuildCore            string
	BuildPath            *paths.Path
	BuildCachePath       *paths.Path
	SketchBuildPath      *paths.Path
	CoreBuildPath        *paths.Path
	CoreBuildCachePath   *paths.Path
	CoreArchiveFilePath  *paths.Path
	CoreObjectsFiles     paths.PathList
	LibrariesBuildPath   *paths.Path
	LibrariesObjectFiles paths.PathList
	PreprocPath          *paths.Path
	SketchObjectFiles    paths.PathList

	CollectedSourceFiles *UniqueSourceFileQueue

	Sketch          *Sketch
	Source          string
	SourceGccMinusE string
	CodeCompletions string

	WarningsLevel string

	// Libraries handling
	LibrariesManager           *librariesmanager.LibrariesManager
	LibrariesResolver          *librariesresolver.Cpp
	ImportedLibraries          libraries.List
	LibrariesResolutionResults map[string]LibraryResolutionResult
	IncludeFolders             paths.PathList

	// C++ Parsing
	CTagsOutput                 string
	CTagsTargetFile             *paths.Path
	CTagsOfPreprocessedSource   []*CTag
	IncludeSection              string
	LineOffset                  int
	PrototypesSection           string
	PrototypesLineWhereToInsert int
	Prototypes                  []*Prototype

	// Verbosity settings
	Verbose           bool
	DebugPreprocessor bool

	// Dry run, only create progress map
	Progress ProgressStruct

	// Contents of a custom build properties file (line by line)
	CustomBuildProperties []string

	DebugLevel int

	// Reuse old tools since the backing storage didn't change
	CanUseCachedTools bool

	// Experimental: use arduino-preprocessor to create prototypes
	UseArduinoPreprocessor bool
	// contains filtered or unexported fields
}

Context structure

func (*Context) ExtractBuildOptions

func (ctx *Context) ExtractBuildOptions() properties.Map

func (*Context) GetLogger

func (ctx *Context) GetLogger() i18n.Logger

func (*Context) InjectBuildOptions

func (ctx *Context) InjectBuildOptions(opts properties.Map)

func (*Context) SetLogger

func (ctx *Context) SetLogger(l i18n.Logger)

type LibraryResolutionResult

type LibraryResolutionResult struct {
	Library          *libraries.Library
	NotUsedLibraries []*libraries.Library
}

type PlatforKeyRewrite

type PlatforKeyRewrite struct {
	Key      string
	OldValue string
	NewValue string
}

type PlatforKeysRewrite

type PlatforKeysRewrite struct {
	Rewrites []PlatforKeyRewrite
}

func (*PlatforKeysRewrite) Empty

func (p *PlatforKeysRewrite) Empty() bool

type PrintFunc

type PrintFunc func([]byte)

type ProgressStruct

type ProgressStruct struct {
	PrintEnabled bool
	Steps        float64
	Progress     float64
}

type Prototype

type Prototype struct {
	FunctionName string
	File         string
	Prototype    string
	Modifiers    string
	Line         int
}

func (*Prototype) String

func (proto *Prototype) String() string

type Sketch

type Sketch struct {
	MainFile         SketchFile
	OtherSketchFiles []SketchFile
	AdditionalFiles  []SketchFile
}

type SketchFile

type SketchFile struct {
	Name   *paths.Path
	Source string
}

type SketchFileSortByName

type SketchFileSortByName []SketchFile

func (SketchFileSortByName) Len

func (s SketchFileSortByName) Len() int

func (SketchFileSortByName) Less

func (s SketchFileSortByName) Less(i, j int) bool

func (SketchFileSortByName) Swap

func (s SketchFileSortByName) Swap(i, j int)

type SourceFile

type SourceFile struct {
	// Sketch or Library pointer that this source file lives in
	Origin interface{}
	// Path to the source file within the sketch/library root folder
	RelativePath *paths.Path
}

func MakeSourceFile

func MakeSourceFile(ctx *Context, origin interface{}, path *paths.Path) (SourceFile, error)

Create a SourceFile containing the given source file path within the given origin. The given path can be absolute, or relative within the origin's root source folder

func (*SourceFile) DepfilePath

func (f *SourceFile) DepfilePath(ctx *Context) *paths.Path

func (*SourceFile) ObjectPath

func (f *SourceFile) ObjectPath(ctx *Context) *paths.Path

func (*SourceFile) SourcePath

func (f *SourceFile) SourcePath(ctx *Context) *paths.Path

type UniqueSourceFileQueue

type UniqueSourceFileQueue []SourceFile

func (*UniqueSourceFileQueue) Empty

func (queue *UniqueSourceFileQueue) Empty() bool

func (UniqueSourceFileQueue) Len

func (queue UniqueSourceFileQueue) Len() int

func (UniqueSourceFileQueue) Less

func (queue UniqueSourceFileQueue) Less(i, j int) bool

func (*UniqueSourceFileQueue) Pop

func (queue *UniqueSourceFileQueue) Pop() SourceFile

func (*UniqueSourceFileQueue) Push

func (queue *UniqueSourceFileQueue) Push(value SourceFile)

func (UniqueSourceFileQueue) Swap

func (queue UniqueSourceFileQueue) Swap(i, j int)

type UniqueStringQueue

type UniqueStringQueue []string

func (*UniqueStringQueue) Empty

func (queue *UniqueStringQueue) Empty() bool

func (UniqueStringQueue) Len

func (queue UniqueStringQueue) Len() int

func (UniqueStringQueue) Less

func (queue UniqueStringQueue) Less(i, j int) bool

func (*UniqueStringQueue) Pop

func (queue *UniqueStringQueue) Pop() interface{}

func (*UniqueStringQueue) Push

func (queue *UniqueStringQueue) Push(value string)

func (UniqueStringQueue) Swap

func (queue UniqueStringQueue) Swap(i, j int)

Jump to

Keyboard shortcuts

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