block

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

BLOCK section

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Name        string
	Description string

	Flag  int
	Coord []float64
	// contains filtered or unexported fields
}

Block represents each BLOCK.

func NewBlock

func NewBlock(name, desc string) *Block

NewBlock create a new Block.

func (*Block) Format

func (b *Block) Format(f format.Formatter)

Format writes data to formatter.

func (*Block) FormatString

func (b *Block) FormatString(f format.Formatter) string

FormatString outputs data using given formatter.

func (*Block) Handle

func (b *Block) Handle() int

Handle returns a handle value of BLOCK.

func (*Block) Layer

func (b *Block) Layer() *table.Layer

Layer returns BLOCK's Layer.

func (*Block) SetHandle

func (b *Block) SetHandle(v *int)

SetHandle sets handles to BLOCK and ENDBLK.

func (*Block) SetLayer

func (b *Block) SetLayer(layer *table.Layer)

SetLayer sets Layer to BLOCK.

func (*Block) String

func (b *Block) String() string

String outputs data using default formatter.

type Blocks

type Blocks []*Block

Blocks represents BLOCKS section.

func New

func New() Blocks

New creates a new Blocks.

func (Blocks) Add

func (bs Blocks) Add(b *Block) Blocks

Add adds a new block to BLOCKS section.

func (Blocks) Format

func (bs Blocks) Format(f format.Formatter)

Format writes BLOCKS data to formatter.

func (Blocks) SetHandle

func (bs Blocks) SetHandle(v *int)

SetHandle sets handles to each block.

Jump to

Keyboard shortcuts

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