Version 1.0.0-0

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: Top

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: Top

Initializes a translation unit with a path

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

Parameters
  • path
    The path
Return value

The translation unit objectb

- initWithPath:args: Top

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: Top

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: Top

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: Top

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: Top

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: Top

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: Top

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 Top

Reparses the translation unit

- ( void )reparse;

+ translationUnitWithPath: Top

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: Top

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: Top

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: Top

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: Top

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: Top

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: Top

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: Top

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 Top

Internal libclang file object

@property( atomic, readonly ) CXFile cxFile;

cxTranslationUnit Top

Internal libclang translation unit object

@property( atomic, readonly ) CXTranslationUnit cxTranslationUnit;

diagnostics Top

An array of diagnostics for the translation unit

@property( atomic, readonly ) NSArray * diagnostics;

index Top

The index object

@property( atomic, readonly ) CKIndex * index;

path Top

Translation's unit path

@property( atomic, readonly ) NSString * path;

text Top

Translation's unit text

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

tokens Top

An array of tokens for the translation unit

@property( atomic, readonly ) NSArray * tokens;