CKTranslationUnit Reference

File
ClangKit/Classes/CKTranslationUnit.h
Author
Jean-David Gadina - www.xs-labs.com
Copyright
© (c) 2010-2014 - Jean-David Gadina - www.xs-labs.com
Date
Wednesday, June 25, 2014
Includes
None

Overview

ClangKit translation unit class

Class CKTranslationUnit

Attributes

Superclass
NSObject

- completionResultsForLine:column:

Gets completion results for a specific line and column

- ( NSArray * )completionResultsForLine: ( NSUInteger )line column: ( NSUInteger )column;

Parameters
  • line
    The line number
  • column
    The column number
Return value

An array of completion results

- initWithPath:

Initializes a translation unit with a path

- ( id )initWithPath: ( NSString * )path;

Parameters
  • path
    The path
Return value

The translation unit objectb

- initWithPath:args:

Initializes a translation unit from a path and arguments

- ( id )initWithPath: ( NSString * )path args: ( NSArray * )args;

Parameters
  • path
    The path
  • args
    The arguments
Return value

The translation unit object

- initWithPath:index:

Initializes a translation unit from a path and an index

- ( id )initWithPath: ( NSString * )path index: ( CKIndex * )index;

Parameters
  • path
    The path
  • index
    The index
Return value

The translation unit object

- initWithPath:index:args:

Initializes a translation unit from a path, index and arguments

- ( id )initWithPath: ( NSString * )path index: ( CKIndex * )index args: ( NSArray * )args;

Parameters
  • path
    The path
  • index
    The index
  • args
    The arguments
Return value

The translation unit object

- initWithText:language:

Initializes a translation unit from a text

- ( id )initWithText: ( NSString * )text language: ( CKLanguage )language;

Parameters
  • text
    The text
  • language
    The language to use
Return value

The translation unit object

- initWithText:language:args:

Initializes a translation unit from a text and arguments

- ( id )initWithText: ( NSString * )text language: ( CKLanguage )language args: ( NSArray * )args;

Parameters
  • text
    The text
  • language
    The language to use
  • args
    The arguments
Return value

The translation unit object

- initWithText:language:index:

Initializes a translation unit from a text and an index

- ( id )initWithText: ( NSString * )text language: ( CKLanguage )language index: ( CKIndex * )index;

Parameters
  • text
    The text
  • language
    The language to use
  • index
    The index
Return value

The translation unit object

- initWithText:language:index:args:

Initializes a translation unit from a text, index and arguments

- ( id )initWithText: ( NSString * )text language: ( CKLanguage )language index: ( CKIndex * )index args: ( NSArray * )args;

Parameters
  • text
    The text
  • language
    The language to use
  • index
    The index
  • args
    The arguments
Return value

The translation unit object

- reparse

Reparses the translation unit

- ( void )reparse;

+ translationUnitWithPath:

Gets a translation unit from a path

+ ( id )translationUnitWithPath: ( NSString * )path;

Discussion

The returned object is autoreleased.

Parameters
  • path
    The path
Return value

The translation unit object

+ translationUnitWithPath:args:

Gets a translation unit from a path and arguments

+ ( id )translationUnitWithPath: ( NSString * )path args: ( NSArray * )args;

Discussion

The returned object is autoreleased.

Parameters
  • path
    The path
  • args
    The arguments
Return value

The translation unit object

+ translationUnitWithPath:index:

Gets a translation unit from a path and an index

+ ( id )translationUnitWithPath: ( NSString * )path index: ( CKIndex * )index;

Discussion

The returned object is autoreleased.

Parameters
  • path
    The path
  • index
    The index
Return value

The translation unit object

+ translationUnitWithPath:index:args:

Gets a translation unit from a path, index and arguments

+ ( id )translationUnitWithPath: ( NSString * )path index: ( CKIndex * )index args: ( NSArray * )args;

Discussion

The returned object is autoreleased.

Parameters
  • path
    The path
  • index
    The index
  • args
    The arguments
Return value

The translation unit object

+ translationUnitWithText:language:

Gets a translation unit from a text

+ ( id )translationUnitWithText: ( NSString * )text language: ( CKLanguage )language;

Discussion

The returned object is autoreleased.

Parameters
  • text
    The text
  • language
    The language to use
Return value

The translation unit object

+ translationUnitWithText:language:args:

Gets a translation unit from a text and arguments

+ ( id )translationUnitWithText: ( NSString * )text language: ( CKLanguage )language args: ( NSArray * )args;

Discussion

The returned object is autoreleased.

Parameters
  • text
    The text
  • language
    The language to use
  • args
    The arguments
Return value

The translation unit object

+ translationUnitWithText:language:index:

Gets a translation unit from a text and an index

+ ( id )translationUnitWithText: ( NSString * )text language: ( CKLanguage )language index: ( CKIndex * )index;

Discussion

The returned object is autoreleased.

Parameters
  • text
    The text
  • language
    The language to use
  • index
    The index
Return value

The translation unit object

+ translationUnitWithText:language:index:args:

Gets a translation unit from a text, index and arguments

+ ( id )translationUnitWithText: ( NSString * )text language: ( CKLanguage )language index: ( CKIndex * )index args: ( NSArray * )args;

Discussion

The returned object is autoreleased.

Parameters
  • text
    The text
  • language
    The language to use
  • index
    The index
  • args
    The arguments
Return value

The translation unit object

cxFile

Internal libclang file object

@property( atomic, readonly ) CXFile cxFile;

cxTranslationUnit

Internal libclang translation unit object

@property( atomic, readonly ) CXTranslationUnit cxTranslationUnit;

diagnostics

An array of diagnostics for the translation unit

@property( atomic, readonly ) NSArray * diagnostics;

index

The index object

@property( atomic, readonly ) CKIndex * index;

path

Translation's unit path

@property( atomic, readonly ) NSString * path;

text

Translation's unit text

@property( atomic, readwrite, retain ) NSString * text;

tokens

An array of tokens for the translation unit

@property( atomic, readonly ) NSArray * tokens;