class Bindgen::Graph::Builder
- Bindgen::Graph::Builder
- Reference
- Object
Overview
Builds a graph out of Parser::*
structures. Can be used to build a
whole namespace out of a Parser::Document
, or just for smaller things.
The resulting graph mirrors the structure of the target language.
Defined in:
bindgen/graph/builder.crConstructors
Instance Method Summary
-
#build_class(klass : Parser::Class, name : String, root : Graph::Container) : Graph::Class
Copies klass at path name into the root.
-
#build_document(document : Parser::Document, ns : Namespace) : Namespace
Copies document into the ns.
-
#build_enum(enumeration : Parser::Enum, name : String, root : Graph::Container) : Graph::Enum
Copies enumeration at path name into the root.
-
#build_method(method : Parser::Method, parent : Graph::Node | Nil) : Graph::Method
Copies method into parent.
-
#get_or_create_path(root : Graph::Container, path : Path) : Graph::Node
Iterates over the path, descending from root onwards.
-
#get_or_create_path_parent(root : Graph::Container, path : Path) : Graph::Container
Gets the parent of path, starting at root.
-
#parent_and_local_name(root : Graph::Container, path_name : String)
Splits the qualified path, and returns the parent of the target and the name of the path local to the parent.
-
#parent_and_local_name(root : Graph::Container, path : Path)
Splits the qualified path, and returns the parent of the target and the name of the path local to the parent.
Constructor Detail
Instance Method Detail
Copies klass at path name into the root.
Copies document into the ns.
Copies enumeration at path name into the root.
Copies method into parent.
Iterates over the path, descending from root onwards. If a part of
the path does not exist yet, it'll be created as Namespace
.
Gets the parent of path, starting at root. Makes sure it is a
Graph::Container
. Also see #get_or_create_path
Splits the qualified path, and returns the parent of the target and the name of the path local to the parent.
Splits the qualified path, and returns the parent of the target and the name of the path local to the parent.