parser

package
v0.0.0-...-33b8324 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2017 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIGNAL = "signal"
	SLOT   = "slot"

	IMPURE = "impure"
	PURE   = "pure"

	PLAIN            = "plain"
	CONSTRUCTOR      = "constructor"
	COPY_CONSTRUCTOR = "copy-constructor"
	MOVE_CONSTRUCTOR = "move-constructor"
	DESTRUCTOR       = "destructor"

	CONNECT    = "Connect"
	DISCONNECT = "Disconnect"
	CALLBACK   = "callback"

	GETTER = "getter"
	SETTER = "setter"

	VOID = "void"

	TILDE = "~"

	MOC = "moc"
)

Variables

View Source
var LibDeps = map[string][]string{
	"Core":          {"Widgets", "Gui"},
	"AndroidExtras": {"Core"},
	"Gui":           {"Widgets", "Core"},
	"Network":       {"Core"},
	"Xml":           {"XmlPatterns", "Core"},
	"DBus":          {"Core"},
	"Nfc":           {"Core"},
	"Script":        {"Core"},
	"Sensors":       {"Core"},
	"Positioning":   {"Core"},
	"Widgets":       {"Gui", "Core"},
	"Sql":           {"Widgets", "Gui", "Core"},
	"MacExtras":     {"Gui", "Core"},
	"Qml":           {"Network", "Core"},
	"WebSockets":    {"Network", "Core"},
	"XmlPatterns":   {"Network", "Core"},
	"Bluetooth":     {"Core"},
	"WebChannel":    {"Network", "Qml", "Core"},
	"Svg":           {"Widgets", "Gui", "Core"},
	"Multimedia":    {"MultimediaWidgets", "Widgets", "Network", "Gui", "Core"},
	"Quick":         {"QuickWidgets", "Widgets", "Network", "Qml", "Gui", "Core"},
	"Help":          {"Sql", "CLucene", "Network", "Widgets", "Gui", "Core"},
	"Location":      {"Positioning", "Quick", "Gui", "Core"},
	"ScriptTools":   {"Script", "Widgets", "Core"},
	"UiTools":       {"Widgets", "Gui", "Core"},
	"X11Extras":     {"Gui", "Core"},
	"WinExtras":     {"Gui", "Core"},
	"WebEngine":     {"Widgets", "WebEngineWidgets", "WebChannel", "Network", "WebEngineCore", "Quick", "Gui", "Qml", "Core"},
	"TestLib":       {"Widgets", "Gui", "Core"},
	"SerialPort":    {"Core"},
	"SerialBus":     {"Core"},
	"PrintSupport":  {"Widgets", "Gui", "Core"},

	"Designer": {"UiPlugin", "Widgets", "Gui", "Xml", "Core"},
	"Scxml":    {"Network", "Qml", "Core"},
	"Gamepad":  {"Gui", "Core"},

	"Purchasing":        {"Core"},
	"DataVisualization": {"Gui", "Core"},
	"Charts":            {"Widgets", "Gui", "Core"},

	"Sailfish": {"Core"},

	MOC:         make([]string, 0),
	"build_ios": {"Core", "Gui", "Network", "Sql", "Xml", "DBus", "Nfc", "Script", "Sensors", "Positioning", "Widgets", "Qml", "WebSockets", "XmlPatterns", "Bluetooth", "WebChannel", "Svg", "Multimedia", "Quick", "Help", "Location", "ScriptTools", "MultimediaWidgets", "UiTools", "PrintSupport"},
}
View Source
var Libs = []string{
	"Core",
	"AndroidExtras",
	"Gui",
	"Network",
	"Xml",
	"DBus",
	"Nfc",
	"Script",
	"Sensors",
	"Positioning",
	"Widgets",
	"Sql",
	"MacExtras",
	"Qml",
	"WebSockets",
	"XmlPatterns",
	"Bluetooth",
	"WebChannel",
	"Svg",
	"Multimedia",
	"Quick",
	"Help",
	"Location",
	"ScriptTools",
	"UiTools",
	"X11Extras",
	"WinExtras",
	"WebEngine",
	"TestLib",
	"SerialPort",
	"SerialBus",
	"PrintSupport",

	"Designer",
	"Scxml",
	"Gamepad",

	"Purchasing",
	"DataVisualization",
	"Charts",

	"Sailfish",
}
View Source
var State = &struct {
	ClassMap map[string]*Class

	Moc     bool
	Minimal bool

	Module string
}{
	ClassMap: make(map[string]*Class),
}

Functions

func CleanName

func CleanName(name, value string) string

func CleanValue

func CleanValue(v string) string

func Dump

func Dump()

func GetLibs

func GetLibs() []string

func IsPackedList

func IsPackedList(v string) bool

func LoadModule

func LoadModule(m string) error

func LoadModules

func LoadModules()

func ShouldBuild

func ShouldBuild(module string) bool

func SortedClassNamesForModule

func SortedClassNamesForModule(module string, template bool) []string

func UnpackedList

func UnpackedList(v string) string

Types

type Class

type Class struct {
	Name       string      `xml:"name,attr"`
	Status     string      `xml:"status,attr"`
	Access     string      `xml:"access,attr"`
	Abstract   bool        `xml:"abstract,attr"`
	Bases      string      `xml:"bases,attr"`
	Module     string      `xml:"module,attr"`
	Brief      string      `xml:"brief,attr"`
	Functions  []*Function `xml:"function"`
	Enums      []*Enum     `xml:"enum"`
	Variables  []*Variable `xml:"variable"`
	Properties []*Variable `xml:"property"`
	Classes    []*Class    `xml:"class"`

	DocModule string
	Stub      bool
	WeakLink  map[string]struct{}
	Export    bool
	Fullname  string
}

func SortedClassesForModule

func SortedClassesForModule(module string, template bool) []*Class

func (*Class) GetAllBases

func (c *Class) GetAllBases() []string

func (*Class) GetAllBasesRecursiveCheckFailed

func (c *Class) GetAllBasesRecursiveCheckFailed(i int) ([]string, bool)

func (*Class) GetBases

func (c *Class) GetBases() []string

func (*Class) HasCallbackFunctions

func (class *Class) HasCallbackFunctions() bool

func (*Class) HasConstructor

func (c *Class) HasConstructor() bool

func (*Class) HasFunctionWithName

func (c *Class) HasFunctionWithName(n string) bool

func (*Class) HasFunctionWithNameAndOverloadNumber

func (c *Class) HasFunctionWithNameAndOverloadNumber(n string, num string) bool

func (*Class) IsPolymorphic

func (c *Class) IsPolymorphic() bool

func (*Class) IsSubClassOf

func (c *Class) IsSubClassOf(class string) bool

func (*Class) IsSubClassOfQObject

func (c *Class) IsSubClassOfQObject() bool

func (*Class) IsSupported

func (c *Class) IsSupported() bool

func (*Class) NeedsDestructor

func (c *Class) NeedsDestructor() bool

type Enum

type Enum struct {
	Name     string   `xml:"name,attr"`
	Fullname string   `xml:"fullname,attr"`
	Status   string   `xml:"status,attr"`
	Access   string   `xml:"access,attr"`
	Typedef  string   `xml:"typedef,attr"`
	Values   []*Value `xml:"value"`
	NoConst  bool
}

func (*Enum) Class

func (e *Enum) Class() (*Class, bool)

func (*Enum) ClassName

func (e *Enum) ClassName() string

type Function

type Function struct {
	Name             string       `xml:"name,attr"`
	Fullname         string       `xml:"fullname,attr"`
	Href             string       `xml:"href,attr"`
	Status           string       `xml:"status,attr"`
	Access           string       `xml:"access,attr"`
	Filepath         string       `xml:"filepath,attr"`
	Virtual          string       `xml:"virtual,attr"`
	Meta             string       `xml:"meta,attr"`
	Static           bool         `xml:"static,attr"`
	Overload         bool         `xml:"overload,attr"`
	OverloadNumber   string       `xml:"overload-number,attr"`
	Output           string       `xml:"type,attr"`
	Signature        string       `xml:"signature,attr"`
	Parameters       []*Parameter `xml:"parameter"`
	Brief            string       `xml:"brief,attr"`
	SignalMode       string
	TemplateModeJNI  string
	Default          bool
	TmpName          string
	Export           bool
	NeedsFinalizer   bool
	Container        string
	TemplateModeGo   string
	Child            *Function
	NonMember        bool
	NoMocDeduce      bool
	PureBaseFunction bool
	AsError          bool
}

func (*Function) Class

func (f *Function) Class() (*Class, bool)

func (*Function) ClassName

func (f *Function) ClassName() string

func (*Function) IsDerivedFromVirtual

func (f *Function) IsDerivedFromVirtual() bool

func (*Function) IsJNIGeneric

func (f *Function) IsJNIGeneric() bool

func (*Function) IsSupported

func (f *Function) IsSupported() bool

func (*Function) IsSupportedDefault

func (f *Function) IsSupportedDefault() bool

func (*Function) PossiblePolymorphic

func (f *Function) PossiblePolymorphic(self bool) ([]string, string)

type Module

type Module struct {
	Namespace *Namespace `xml:"namespace"`
	Project   string     `xml:"project,attr"`
}

func (*Module) Prepare

func (m *Module) Prepare() error

type Namespace

type Namespace struct {
	Classes []*Class `xml:"class"`
	//Functions    []*Function   `xml:"function"` //TODO: uncomment
	SubNamespace *SubNamespace `xml:"namespace"`
}

type Parameter

type Parameter struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"left,attr"`
}

type SubNamespace

type SubNamespace struct {
	//Classes   []*Class    `xml:"class"`    //TODO: uncomment
	//Functions []*Function `xml:"function"` //TODO: uncomment
	Enums []*Enum `xml:"enum"`
}

type Value

type Value struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type Variable

type Variable struct {
	Name     string     `xml:"name,attr"`
	Fullname string     `xml:"fullname,attr"`
	Href     string     `xml:"href,attr"`
	Status   string     `xml:"status,attr"`
	Access   string     `xml:"access,attr"`
	Filepath string     `xml:"filepath,attr"`
	Static   bool       `xml:"static,attr"`
	Output   string     `xml:"type,attr"`
	Brief    string     `xml:"brief,attr"`
	Getter   []struct{} `xml:"getter"`
	Setter   []struct{} `xml:"setter"`
}

func (*Variable) Class

func (v *Variable) Class() (*Class, bool)

func (*Variable) ClassName

func (v *Variable) ClassName() string

Jump to

Keyboard shortcuts

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