CXXLanguageFrontend

open class CXXLanguageFrontend(language: Language<CXXLanguageFrontend>, ctx: TranslationContext) : LanguageFrontend<IASTNode, IASTTypeId>

The language frontend for translating C/C++ languages into the graph. It uses Eclipse CDT to parse the actual source code into an AST.

Based on the file ending (.c or .cpp) different dialects of Eclipse CDT are used (GCCLanguage ad GPPLanguage). This enables us (to some degree) to deal with the finer difference between C and C++ code.

Constructors

Link copied to clipboard
constructor(language: Language<CXXLanguageFrontend>, ctx: TranslationContext)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
override var ctx: TranslationContext
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var dialect: AbstractCLikeLanguage?

The dialect used by this language frontend, either GCCLanguage for C or GPPLanguage for C++.

Link copied to clipboard
Link copied to clipboard
open override val language: Language<out LanguageFrontend<IASTNode, IASTTypeId>>
Link copied to clipboard
open override val namespace: Name?
Link copied to clipboard
open override val scope: Scope?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun cleanup()
Link copied to clipboard
Link copied to clipboard
open override fun codeOf(astNode: IASTNode): String?
Link copied to clipboard
open override fun locationOf(astNode: IASTNode): PhysicalLocation?
Link copied to clipboard
open override fun parse(file: File): TranslationUnitDeclaration
Link copied to clipboard
Link copied to clipboard
open fun process(from: Any, to: Node)
Link copied to clipboard
fun processAttributes(node: Node, owner: IASTNode)

Processes C++ attributes into Annotation nodes.

Link copied to clipboard
open fun registerObjectListener(from: Any, biConsumer: BiConsumer<Any, Node>)
Link copied to clipboard
open fun registerPredicateListener(predicate: BiPredicate<Any, Node>, biConsumer: BiConsumer<Any, Node>)
Link copied to clipboard
open override fun setComment(node: Node, astNode: IASTNode)
Link copied to clipboard
open override fun typeOf(type: IASTTypeId): Type

Returns the Type that is represented by an IASTTypeId.

fun typeOf(specifier: IASTDeclSpecifier, hint: Declaration? = null): Type
fun typeOf(name: IASTName, prefix: String? = null, doFqn: Boolean = false): Type

fun typeOf(declarator: IASTDeclarator, specifier: IASTDeclSpecifier, hint: Declaration? = null): Type

Returns te Type that is represented by the declarator and specifier. This tries to resolve as much information about the type on its own using by analyzing the AST of the supplied declarator and specifier. Finally, TypeParser.createFrom is invoked on the innermost type, but all other type adjustments, such as creating a PointerType is done within this method.