C# Class Rosetta.Translation.NestedElementTranslationUnit

Class describing nested elements.
Afficher le fichier Open project: andry-tino/Rosetta Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

AddTranslationUnit() protected méthode

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.
Résultat void

AddTranslationUnitCore() protected méthode

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.
Résultat void

IncrementNestingLevel() public static méthode

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.
Résultat void

NestedElementTranslationUnit() protected méthode

Initializes a new instance of the NestedElementTranslationUnit.
protected NestedElementTranslationUnit ( ) : System
Résultat System

NestedElementTranslationUnit() protected méthode

Copy initializes a new instance of the NestedElementTranslationUnit.
For testability.
protected NestedElementTranslationUnit ( NestedElementTranslationUnit other ) : System
other NestedElementTranslationUnit
Résultat System

NestedElementTranslationUnit() protected méthode

Initializes a new instance of the NestedElementTranslationUnit.
protected NestedElementTranslationUnit ( int nestingLevel ) : System
nestingLevel int
Résultat System

OnNestingLevelChanged() protected méthode

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
Résultat void