Carbide.c++

com.nokia.carbide.cpp.epoc.engine.preprocessor
Interface ITranslationUnitProvider

All Known Implementing Classes:
DefaultTranslationUnitProvider

public interface ITranslationUnitProvider

This provides cached preprocessor translation units for files.

The provider must detect changes to the IDocument hosted in a returned translation unit and reflect those changes when asked for the file the next time. The provider does not have to persist the contents of the file on a document change, though.

The key used here is File (instead of IPath) since it has proper case sensitivity. Such Files should be absolute canonical filesystem paths.


Method Summary
 ITranslationUnit getTranslationUnit(java.io.File file, IModelDocumentProvider modelDocumentProvider)
          Locate an existing TU, or load it and parse it.
 

Method Detail

getTranslationUnit

ITranslationUnit getTranslationUnit(java.io.File file,
                                    IModelDocumentProvider modelDocumentProvider)
Locate an existing TU, or load it and parse it. Listen for future changes to the document contents and identity (via modelDocumentProvider) and to the file.

This represents only the given file (no #includes are expanded).

Parameters:
file - the full path to the file
modelDocumentProvider - the provider of IDocument instances for the file.
Returns:
existing or new TU; return null only if the file does not exist.
Since:
Carbide.c++ v1.3. API break, needed since the previous implementation could not distinguish documents in memory from those on disk.

Carbide.c++