TransformToXmlStream

Transform analyze data to a xml stream.

XML nodes must never be duplicated. An edge source or target must be to nodes that exist.

# Strategy class The generation of a node is delayed as long as possible for a class declaration in the hope of finding the definition. The delay is implemented with a cache. When finalize is called the cache is forcefully transformed to nodes. Even those symbols that only have a declaration as location.

Members

Functions

finalize
void finalize()
put
void put(ref const(TranslationUnitResult) result)
put
void put(const(USRType) src, const(USRType) dst)

Create a raw relation between two identifiers.

put
void put(const(TypeKindAttr) src, const(TypeKindAttr) dst)

Create a raw relation between two types.

put
void put(const(TypeKindAttr) type)

Create a raw node for a type.

put
void put(ref const(VarDeclResult) result)

A free variable declaration.

put
void put(ref const(VarDeclResult) result, CppNs[] ns)

A free variable declaration in a namespace.

put
void put(ref const(TypeKindAttr) src, ref const(VarDeclResult) result)

Accessing a global. * * Assuming that src is already put in the cache. * Assuming that target is already in cache or will be in the future when * traversing the AST. *

put
void put(ref const(FunctionDeclResult) result)
put
void put(ref const(TypeKindAttr) src, ref const(FunctionDeclResult) result)

Calls from src to result.

put
void put(ref const(RecordResult) result, CppNs[] ns, NodeRecord in_node)

The node_cache may contain class/struct that have been put there by a parameter item. Therefor bypass the cache when a definition is found.

put
void put(ref const(TypeKindAttr) src, ref const(ConstructorResult) result, in CppAccess access)

Create relations to the parameters of a constructor.

put
void put(ref const(TypeKindAttr) src, ref const(DestructorResult) result, in CppAccess access)

No parameters in a destructor so skipping.

put
void put(ref const(TypeKindAttr) src, ref const(CxxMethodResult) result, in CppAccess access)

Create relations to the parameters of a method.

put
void put(ref const(TypeKindAttr) src, ref const(FieldDeclResult) result, in CppAccess access)

Relation of a class/struct's field to the it is an instance of type.

put
void put(ref const(TypeKindAttr) src, ref const(CxxBaseSpecifierResult) result)

Avoid code duplication by creating nodes via the node_cache.

putBodyNode
void putBodyNode(const(TypeKindAttr) type)

Create a _possible_ node from a body inspection. It delays the creation of the node until the translation unit is fully analyzed.

Meta