C# Класс Rosetta.Translation.NestedElementTranslationUnit

Class describing nested elements.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
IncrementNestingLevel ( ITranslationUnit translationUnit, ITranslationUnit parentTranslationUnit ) : void

Utility method used to safely increment the nesting level of an ITranslationUnit only in case it supports nesting level.

This will cause translationUnit to be checked. In case it supports nestin level, then its nesting level is changed in order to have the nesting level of parentTranslationUnit + 1.

Защищенные методы

Метод Описание
AddTranslationUnit ( ITranslationUnit translationUnit ) : void

Ensures that compound ITranslationUnit will increment added unit's nesting level. TODO: Use this!

AddTranslationUnitCore ( ITranslationUnit translationUnit ) : void

Logic to provide in subclasses to add ITranslationUnit (for compound translation units). TODO: Turn this into abstract and make all unit use one method for add compound units. TODO: Add to ICompoundUnit interface and have classes distinguish uisng RTTI!

NestedElementTranslationUnit ( ) : System

Initializes a new instance of the NestedElementTranslationUnit.

NestedElementTranslationUnit ( NestedElementTranslationUnit other ) : System

Copy initializes a new instance of the NestedElementTranslationUnit.

For testability.

NestedElementTranslationUnit ( int nestingLevel ) : System

Initializes a new instance of the NestedElementTranslationUnit.

OnNestingLevelChanged ( ) : void

When the indentation level changes, we need to apply a different formatter. When the nesting level changes, this procedure will adjust it in case the automatic nesting level has been set to automatic.

Описание методов

AddTranslationUnit() защищенный Метод

Ensures that compound ITranslationUnit will increment added unit's nesting level. TODO: Use this!
protected AddTranslationUnit ( ITranslationUnit translationUnit ) : void
translationUnit ITranslationUnit The translation unit to add.
Результат void

AddTranslationUnitCore() защищенный Метод

Logic to provide in subclasses to add ITranslationUnit (for compound translation units). TODO: Turn this into abstract and make all unit use one method for add compound units. TODO: Add to ICompoundUnit interface and have classes distinguish uisng RTTI!
protected AddTranslationUnitCore ( ITranslationUnit translationUnit ) : void
translationUnit ITranslationUnit The translation unit to add.
Результат void

IncrementNestingLevel() публичный статический Метод

Utility method used to safely increment the nesting level of an ITranslationUnit only in case it supports nesting level.
This will cause translationUnit to be checked. In case it supports nestin level, then its nesting level is changed in order to have the nesting level of parentTranslationUnit + 1.
public static IncrementNestingLevel ( ITranslationUnit translationUnit, ITranslationUnit parentTranslationUnit ) : void
translationUnit ITranslationUnit The whose nesting level should be incremented.
parentTranslationUnit ITranslationUnit The which is supposed to be the parent.
Результат void

NestedElementTranslationUnit() защищенный Метод

Initializes a new instance of the NestedElementTranslationUnit.
protected NestedElementTranslationUnit ( ) : System
Результат System

NestedElementTranslationUnit() защищенный Метод

Copy initializes a new instance of the NestedElementTranslationUnit.
For testability.
protected NestedElementTranslationUnit ( NestedElementTranslationUnit other ) : System
other NestedElementTranslationUnit
Результат System

NestedElementTranslationUnit() защищенный Метод

Initializes a new instance of the NestedElementTranslationUnit.
protected NestedElementTranslationUnit ( int nestingLevel ) : System
nestingLevel int
Результат System

OnNestingLevelChanged() защищенный Метод

When the indentation level changes, we need to apply a different formatter. When the nesting level changes, this procedure will adjust it in case the automatic nesting level has been set to automatic.
protected OnNestingLevelChanged ( ) : void
Результат void