Documentation ¶
Index ¶
- Constants
- func AbortErrorHandler(code, severity int, msg string) error
- func AddDriver(name string, builder drivers.Builder) error
- func DefaultHandleGeneratorHandler(name, typeof string) (string, error)
- func FindDriver(name string) (drivers.Builder, error)
- func New(config *Configuration) *RiContext
- func PrintErrorHandler(code, severity int, msg string) error
- func RemoveDriver(name string) error
- type Block
- type BlockInfo
- type Configuration
- type Context
- func (ctx *Context) GenHandle(name, typeof string) (string, error)
- func (ctx *Context) Get(name string) string
- func (ctx *Context) GetLastRIB() string
- func (ctx *Context) GetProgress() RtInt
- func (ctx *Context) Handle(list []RtPointer)
- func (ctx *Context) HandleError(err *RtError) *RtError
- func (ctx *Context) HandleV(name RtString, args []RtPointer, tokens []RtPointer, values []RtPointer)
- func (ctx *Context) PeelStatistics() *Statistics
- func (ctx *Context) Set(name, declaration string) RtToken
- type CustomCallbackHandler
- type ErrorHandler
- type HandleGeneratorHandler
- type OptionBlock
- type Statistics
- func (s *Statistics) AddAsset(token RtToken, value RtPointer)
- func (s *Statistics) AnnotateLabel(token RtToken, value RtPointer)
- func (s *Statistics) Begin(name string)
- func (s *Statistics) CurrentBlock() string
- func (s *Statistics) End()
- func (s *Statistics) IncrementStatements()
- func (s *Statistics) IncrementToken(name RtToken)
- func (s *Statistics) IncrementTokens(n, inline int)
- func (s *Statistics) PrettyPrint() string
Constants ¶
View Source
const (
DefaultBlockFile = "out.rib.block"
)
TODO: MOVE to blockdriver
View Source
const RenderManProVersion = RtInt(21)
Variables ¶
This section is empty.
Functions ¶
func AbortErrorHandler ¶
func New ¶
func New(config *Configuration) *RiContext
func PrintErrorHandler ¶
func RemoveDriver ¶
Types ¶
type BlockInfo ¶
type Configuration ¶
type Configuration struct { Errorf ErrorHandler /* Error Handler function */ Handlef HandleGeneratorHandler Logger *log.Logger Callbacks map[string]CustomCallbackHandler }
Configuration
func NewConfiguration ¶
func NewConfiguration() *Configuration
type Context ¶
Context
func (*Context) GetLastRIB ¶
func (*Context) GetProgress ¶
func (ctx *Context) GetProgress() RtInt
func (*Context) HandleV ¶
func (ctx *Context) HandleV(name RtString, args []RtPointer, tokens []RtPointer, values []RtPointer)
func (*Context) PeelStatistics ¶
func (ctx *Context) PeelStatistics() *Statistics
peel a copy of the statistics
type CustomCallbackHandler ¶
type CustomCallbackHandler func(name RtString, args, tokens, values []RtPointer) bool
Custom callback Handler
type ErrorHandler ¶
type HandleGeneratorHandler ¶
HandleGeneratorHandler -- generate handles, RtLightHandle, ...
type OptionBlock ¶
type OptionBlock map[RtToken]RtPointer
all options defined before RiBegin is called
type Statistics ¶
type Statistics struct { sync.RWMutex Tokens map[RtToken]int /* usage of tokens (by name only) */ Root *Block Current *Block }
Statistics -- run per begin/end statements TODO: move to utilities and standardise
func (*Statistics) AddAsset ¶
func (s *Statistics) AddAsset(token RtToken, value RtPointer)
func (*Statistics) AnnotateLabel ¶
func (s *Statistics) AnnotateLabel(token RtToken, value RtPointer)
func (*Statistics) Begin ¶
func (s *Statistics) Begin(name string)
func (*Statistics) CurrentBlock ¶
func (s *Statistics) CurrentBlock() string
func (*Statistics) End ¶
func (s *Statistics) End()
func (*Statistics) IncrementStatements ¶
func (s *Statistics) IncrementStatements()
func (*Statistics) IncrementToken ¶
func (s *Statistics) IncrementToken(name RtToken)
func (*Statistics) IncrementTokens ¶
func (s *Statistics) IncrementTokens(n, inline int)
func (*Statistics) PrettyPrint ¶
func (s *Statistics) PrettyPrint() string
currently prettyprint to string
Click to show internal directories.
Click to hide internal directories.