Table of Contents

Class Parser

Namespace
Dec
Assembly
dec.dll

Handles all parsing and initialization of dec structures.

Intended for prototype or non-moddable games; use ParserModdable for mod support.

public class Parser
Inheritance
object
Parser

Constructors

Parser(IUserSettings)

public Parser(Recorder.IUserSettings userSettings = null)

Parameters

userSettings Recorder.IUserSettings

Methods

AddDirectory(string)

Pass a directory in for recursive processing.

public void AddDirectory(string directory)

Parameters

directory string

The directory to look for files in.

Remarks

This function will ignore dot-prefixed directory names and files, which are common for development tools to create.

AddFile(FileType, string, string)

Pass a file in for processing.

public void AddFile(Parser.FileType fileType, string filename, string identifier = null)

Parameters

fileType Parser.FileType
filename string
identifier string

AddStream(FileType, Stream, string)

Pass a stream in for processing.

public void AddStream(Parser.FileType fileType, Stream stream, string identifier = "(unnamed)")

Parameters

fileType Parser.FileType
stream Stream
identifier string

A human-readable identifier useful for debugging. Generally, the name of the file that the stream was built from. Not required; will be derived from filename automatically

AddString(FileType, string, string)

Pass a string in for processing.

public void AddString(Parser.FileType fileType, string contents, string identifier = "(unnamed)")

Parameters

fileType Parser.FileType
contents string
identifier string

A human-readable identifier useful for debugging. Generally, the name of the file that the string was built from. Not required, but helpful.

Finish()

Finish all parsing.

public void Finish()

Remarks

The dependencies parameter can be used to feed in dependencies for the PostLoad function. This is a placeholder and is probably going to be replaced at some point, though only with something more capable.