C# Класс ICSharpCode.NRefactory.Cpp.Resolver

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
boostLink bool

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

Метод Описание
AddDefaultConstructor ( TypeDeclaration type, List extraStatements = null ) : void
AddToStringMethod ( TypeDeclaration type ) : void
ConvertToExternTypeArguments ( AstNodeCollection parameters ) : List
ConvertToExternTypeParameters ( AstNodeCollection parameters ) : AstNodeCollection
DereferenceMembers ( AstNode node, string identifier ) : void
ExtractAllTypesFrom ( AstNodeCollection elist ) : List
ExtractAllTypesFrom ( Expression e ) : List
GetChildrenOf ( AstNode member, Type type ) : List

Returns the childs nodes of type specified by variable type

GetChildrenOf ( CSharp member, Type type ) : List

Returns the childs nodes of type specified by variable type

GetCppName ( string CSharpName ) : string

Tries to extract the C++ name of a C# name

GetDelegateArgs ( String type ) : ParameterDeclaration[]

Returns the arguments of a delegate type

GetDelegateArgsNum ( String type ) : int

Returns the number of input arguments of a delegate type

GetDelegateReturnType ( String identifier ) : string

Returns the return type name of a delegate type

GetEntryPointFromDllImport ( CSharp attributes ) : string

Returns the name of the target external function

GetExplicitInterfaceTypes ( TypeDeclaration currentType ) : void

Builds and adds the needed nested types in a current type representing explicit interfaces

GetExtraDLLs ( ) : List
GetHeaderNode ( AstNode node, AstNode headerNode ) : void

Return a header node form of a specified standard node

GetInlineConversionConstructorDeclarationCall ( ConversionConstructorDeclaration conv ) : string

Returns the member string for calling a conversion constructor declaration: i.e. operator IB*();

GetLibraryFromDllImport ( CSharp attributes ) : string

Gets the library in which the external method is located

GetNeededNamespaces ( ) : string[]

Gets the needed namespaces of the current type

GetParentOf ( AstNode member, Type type ) : AstNode

Returns the first parent node of type specified by variable type

GetParentOf ( CSharp member, Type type ) : CSharp.AstNode

Returns the first parent node of type specified by variable type

GetType ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : AstType

Tries to combine all of the provided parameters to extract the AstType class of an object with the identifier specified (Extracts the type of Field or variable, or parameters)

GetTypeIncludes ( ) : string[]

Gets the types have to be included

GetTypeName ( Ast type ) : string

Returns the name of a given AstType

GetTypeName ( CSharp type ) : string

Returns the name of a given AstType

HasChildOf ( AstNode member, Type type ) : bool

Returns if the node has a child of a specified type

HasChildOf ( CSharp member, Type type ) : bool

Returns if the node has a child of a specified type

IdentifierIsDelegate ( String identifier, String &type ) : bool

Returns if an identifier belongs to a delegate type

InferNamespace ( CSharp type ) : string
IsChildOf ( AstNode member, Type type ) : bool

Checks if the node is child of other node of the specified type

IsChildOf ( CSharp member, Type type ) : bool

Checks if the node is child of other node of the specified type

IsCustomEventCall ( MemberReferenceExpression memberReferenceExpression, string currentTypeName ) : bool

Returns if a member reference expression in C# is a call over a C# custom event

IsDLLImportMethod ( CSharp method ) : bool

Returns if a method is marked as an external method or not

IsDelegateType ( AstType type ) : bool

Returns if the specified type name is a delegate type

IsDelegateType ( CSharp type ) : bool

Returns if the specified type name is a delegate type

IsDelegateType ( String type ) : bool

Returns if the specified type name is a delegate type

IsDirectChildOf ( AstNode member, Type type ) : bool

Checks if the node is direct child of other node of the specified type

IsDirectChildOf ( CSharp member, Type type ) : bool

Checks if the node is direct child of other node of the specified type

IsEnumType ( String type ) : bool

Returns if a type is Enum type

IsLibraryType ( string type ) : bool

Tells if a specified type is mapped with a library file

IsPointer ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : bool

Returns if an identifier is a pointer expression. This method checks if the identifier (declared in a method parameter, method variable, or class field) is a pointer. The method will search the identifier depending of the filled parameters or the null parameters CurrentType + currentFieldVarialbe CurrentMethod + CurrentParameter CurrentMethod + CurrentField_Variable

IsPropertyCall ( MemberReferenceExpression memberReferenceExpression, string currentTypeName ) : bool

Returns if a member reference expression in C# is a call over a C# property

IsStringSwitch ( SwitchStatement switchStatement ) : bool
IsStructReference ( MemberReferenceExpression memberReferenceExpression, string currentTypeName, string currentMethodName ) : bool

Returns if a member reference expression in C# is a call over a struct

IsStructType ( String type ) : bool
IsSynchronizedMethod ( CSharp method ) : bool

Returns if a method is marked as synchronized or not

IsSynchronizedMethod ( MethodDeclaration method ) : bool

Returns if a method is marked as synchronized or not

IsTemplatizedAbstractMethod ( string type, string method ) : bool

Returns if a method is an abstract method returning a templatized type (useful for avoiding covariance errors)

IsTemplatizedType ( AstType type ) : bool

Returns if a type has template arguments

IsTemplatizedType ( CSharp type ) : bool

Returns if a type has template arguments

IsTypeArgument ( AstType type ) : bool

Returns if a specified type is a type argument

IsUnsafe ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : bool

Returns if an identifier is an unsafe expression. This method checks if the identifier (declared in a method parameter, method variable, or class field) is an unsasfe pointer variable. The method will search the identifier depending of the filled parameters or the null parameters CurrentType + currentFieldVarialbe CurrentMethod + CurrentParameter CurrentMethod + CurrentField_Variable

IsValueType ( string currentNamespace, string type ) : bool
NeedsDereference ( CSharp node, string currentType, string currentMethod ) : bool

Returns if a node (i.e expression, identifier...) needs a dereference

NeedsDereference ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : bool

Returns if an identifier needs a dereference operation

NeedsForwardDeclaration ( string fw_dcl_type1, string &fw_dcl_type2 ) : bool

Returns if a forward declaration is needed between two types

OneInheritsFromOther ( string one, string other ) : bool
ProcessIncludes ( string typeDeclarationName ) : void

Makes the preprocessing of the includes list

RefactorAllIdentifiers ( AstNode node, string identifier, Expression newIdentifier ) : void
RefactorPropety ( Expression input, String currentTypeName, String accessor ) : Expression

Refactors the C# property accessors to methods (i.e getProperty() setProperty(value)

RefactorStringSwitchStatement ( SwitchStatement switchStatement ) : String
RemoveHeaderNode ( AstNode node, TypeDeclaration type ) : void

Removes a node from the header nodes list of a specified type

RemoveInclude ( string typeName ) : void
ResolveMemberType ( CSharp mref ) : Mono.Cecil.TypeDefinition
ResolveNamespace ( string type ) : string

Resolves the namespace of a given type name

Restart ( ) : void

Restarts the resolver class variables

TryPatchTemplateToObjectType ( AstType type, AstType &newType ) : bool

Converts template types to Object type (useful for inline methods and template specialization types)

Приватные методы

Метод Описание
IdentifierIsEvent ( string identifier, string &type ) : bool

Returns if an identifier belongs to an event type

Reaches ( string type1, string type2, Dictionary includes ) : bool

Tells if one type includes other type (recursively)

Resolver ( ) : System

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

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

public static AddDefaultConstructor ( TypeDeclaration type, List extraStatements = null ) : void
type TypeDeclaration
extraStatements List
Результат void

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

public static AddToStringMethod ( TypeDeclaration type ) : void
type TypeDeclaration
Результат void

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

public static ConvertToExternTypeArguments ( AstNodeCollection parameters ) : List
parameters AstNodeCollection
Результат List

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

public static ConvertToExternTypeParameters ( AstNodeCollection parameters ) : AstNodeCollection
parameters AstNodeCollection
Результат AstNodeCollection

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

public static DereferenceMembers ( AstNode node, string identifier ) : void
node AstNode
identifier string
Результат void

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

public static ExtractAllTypesFrom ( AstNodeCollection elist ) : List
elist AstNodeCollection
Результат List

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

public static ExtractAllTypesFrom ( Expression e ) : List
e Expression
Результат List

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

Returns the childs nodes of type specified by variable type
public static GetChildrenOf ( AstNode member, Type type ) : List
member AstNode Original node
type System.Type Target type of
Результат List

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

Returns the childs nodes of type specified by variable type
public static GetChildrenOf ( CSharp member, Type type ) : List
member CSharp Original node
type System.Type Target type of
Результат List

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

Tries to extract the C++ name of a C# name
public static GetCppName ( string CSharpName ) : string
CSharpName string
Результат string

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

Returns the arguments of a delegate type
public static GetDelegateArgs ( String type ) : ParameterDeclaration[]
type String The delegate type
Результат ParameterDeclaration[]

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

Returns the number of input arguments of a delegate type
public static GetDelegateArgsNum ( String type ) : int
type String The delegate type
Результат int

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

Returns the return type name of a delegate type
public static GetDelegateReturnType ( String identifier ) : string
identifier String Delegate type
Результат string

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

Returns the name of the target external function
public static GetEntryPointFromDllImport ( CSharp attributes ) : string
attributes CSharp
Результат string

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

Builds and adds the needed nested types in a current type representing explicit interfaces
public static GetExplicitInterfaceTypes ( TypeDeclaration currentType ) : void
currentType TypeDeclaration
Результат void

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

public static GetExtraDLLs ( ) : List
Результат List

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

Return a header node form of a specified standard node
public static GetHeaderNode ( AstNode node, AstNode headerNode ) : void
node AstNode
headerNode AstNode
Результат void

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

Returns the member string for calling a conversion constructor declaration: i.e. operator IB*();
public static GetInlineConversionConstructorDeclarationCall ( ConversionConstructorDeclaration conv ) : string
conv ConversionConstructorDeclaration The conversion constructor declaration
Результат string

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

Gets the library in which the external method is located
public static GetLibraryFromDllImport ( CSharp attributes ) : string
attributes CSharp
Результат string

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

Gets the needed namespaces of the current type
public static GetNeededNamespaces ( ) : string[]
Результат string[]

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

Returns the first parent node of type specified by variable type
public static GetParentOf ( AstNode member, Type type ) : AstNode
member AstNode Original node
type System.Type Target type of
Результат AstNode

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

Returns the first parent node of type specified by variable type
public static GetParentOf ( CSharp member, Type type ) : CSharp.AstNode
member CSharp Original node
type System.Type Target type of
Результат CSharp.AstNode

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

Tries to combine all of the provided parameters to extract the AstType class of an object with the identifier specified (Extracts the type of Field or variable, or parameters)
public static GetType ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : AstType
currentField_Variable string
currentType string
currentMethod string
currentParameter string
Результат AstType

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

Gets the types have to be included
public static GetTypeIncludes ( ) : string[]
Результат string[]

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

Returns the name of a given AstType
public static GetTypeName ( Ast type ) : string
type Ast
Результат string

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

Returns the name of a given AstType
public static GetTypeName ( CSharp type ) : string
type CSharp
Результат string

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

Returns if the node has a child of a specified type
public static HasChildOf ( AstNode member, Type type ) : bool
member AstNode Original node
type System.Type Target type of
Результат bool

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

Returns if the node has a child of a specified type
public static HasChildOf ( CSharp member, Type type ) : bool
member CSharp Original node
type System.Type Target type of
Результат bool

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

Returns if an identifier belongs to a delegate type
public static IdentifierIsDelegate ( String identifier, String &type ) : bool
identifier String The identifier
type String Out variable: the type delegate if found
Результат bool

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

public static InferNamespace ( CSharp type ) : string
type CSharp
Результат string

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

Checks if the node is child of other node of the specified type
public static IsChildOf ( AstNode member, Type type ) : bool
member AstNode Node
type System.Type Type of the parent node
Результат bool

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

Checks if the node is child of other node of the specified type
public static IsChildOf ( CSharp member, Type type ) : bool
member CSharp Node
type System.Type Type of the parent node
Результат bool

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

Returns if a member reference expression in C# is a call over a C# custom event
public static IsCustomEventCall ( MemberReferenceExpression memberReferenceExpression, string currentTypeName ) : bool
memberReferenceExpression MemberReferenceExpression
currentTypeName string
Результат bool

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

Returns if a method is marked as an external method or not
public static IsDLLImportMethod ( CSharp method ) : bool
method CSharp
Результат bool

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

Returns if the specified type name is a delegate type
public static IsDelegateType ( AstType type ) : bool
type AstType Identifier
Результат bool

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

Returns if the specified type name is a delegate type
public static IsDelegateType ( CSharp type ) : bool
type CSharp Identifier
Результат bool

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

Returns if the specified type name is a delegate type
public static IsDelegateType ( String type ) : bool
type String Identifier
Результат bool

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

Checks if the node is direct child of other node of the specified type
public static IsDirectChildOf ( AstNode member, Type type ) : bool
member AstNode Node
type System.Type Type of the parent node
Результат bool

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

Checks if the node is direct child of other node of the specified type
public static IsDirectChildOf ( CSharp member, Type type ) : bool
member CSharp Node
type System.Type Type of the parent node
Результат bool

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

Returns if a type is Enum type
public static IsEnumType ( String type ) : bool
type String
Результат bool

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

Tells if a specified type is mapped with a library file
public static IsLibraryType ( string type ) : bool
type string
Результат bool

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

Returns if an identifier is a pointer expression. This method checks if the identifier (declared in a method parameter, method variable, or class field) is a pointer. The method will search the identifier depending of the filled parameters or the null parameters CurrentType + currentFieldVarialbe CurrentMethod + CurrentParameter CurrentMethod + CurrentField_Variable
public static IsPointer ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : bool
currentField_Variable string The variable or field that is being checked
currentType string The current type name
currentMethod string The current method
currentParameter string The parameter that is being checked
Результат bool

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

Returns if a member reference expression in C# is a call over a C# property
public static IsPropertyCall ( MemberReferenceExpression memberReferenceExpression, string currentTypeName ) : bool
memberReferenceExpression MemberReferenceExpression
currentTypeName string
Результат bool

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

public static IsStringSwitch ( SwitchStatement switchStatement ) : bool
switchStatement SwitchStatement
Результат bool

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

Returns if a member reference expression in C# is a call over a struct
public static IsStructReference ( MemberReferenceExpression memberReferenceExpression, string currentTypeName, string currentMethodName ) : bool
memberReferenceExpression MemberReferenceExpression
currentTypeName string
currentMethodName string
Результат bool

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

public static IsStructType ( String type ) : bool
type String
Результат bool

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

Returns if a method is marked as synchronized or not
public static IsSynchronizedMethod ( CSharp method ) : bool
method CSharp
Результат bool

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

Returns if a method is marked as synchronized or not
public static IsSynchronizedMethod ( MethodDeclaration method ) : bool
method MethodDeclaration
Результат bool

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

Returns if a method is an abstract method returning a templatized type (useful for avoiding covariance errors)
public static IsTemplatizedAbstractMethod ( string type, string method ) : bool
type string
method string
Результат bool

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

Returns if a type has template arguments
public static IsTemplatizedType ( AstType type ) : bool
type AstType
Результат bool

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

Returns if a type has template arguments
public static IsTemplatizedType ( CSharp type ) : bool
type CSharp
Результат bool

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

Returns if a specified type is a type argument
public static IsTypeArgument ( AstType type ) : bool
type AstType
Результат bool

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

Returns if an identifier is an unsafe expression. This method checks if the identifier (declared in a method parameter, method variable, or class field) is an unsasfe pointer variable. The method will search the identifier depending of the filled parameters or the null parameters CurrentType + currentFieldVarialbe CurrentMethod + CurrentParameter CurrentMethod + CurrentField_Variable
public static IsUnsafe ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : bool
currentField_Variable string The variable or field that is being checked
currentType string The current type name
currentMethod string The current method
currentParameter string The parameter that is being checked
Результат bool

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

public static IsValueType ( string currentNamespace, string type ) : bool
currentNamespace string
type string
Результат bool

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

Returns if a node (i.e expression, identifier...) needs a dereference
public static NeedsDereference ( CSharp node, string currentType, string currentMethod ) : bool
node CSharp
currentType string
currentMethod string
Результат bool

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

Returns if an identifier needs a dereference operation
public static NeedsDereference ( string currentField_Variable, string currentType, string currentMethod, string currentParameter ) : bool
currentField_Variable string Variable or field to look for
currentType string Current type
currentMethod string CurrentMethod
currentParameter string Parameter to look for
Результат bool

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

Returns if a forward declaration is needed between two types
public static NeedsForwardDeclaration ( string fw_dcl_type1, string &fw_dcl_type2 ) : bool
fw_dcl_type1 string The type to test
fw_dcl_type2 string If the method is true, the second type is placed here
Результат bool

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

public static OneInheritsFromOther ( string one, string other ) : bool
one string
other string
Результат bool

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

Makes the preprocessing of the includes list
public static ProcessIncludes ( string typeDeclarationName ) : void
typeDeclarationName string
Результат void

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

public static RefactorAllIdentifiers ( AstNode node, string identifier, Expression newIdentifier ) : void
node AstNode
identifier string
newIdentifier Expression
Результат void

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

Refactors the C# property accessors to methods (i.e getProperty() setProperty(value)
public static RefactorPropety ( Expression input, String currentTypeName, String accessor ) : Expression
input Expression Property expression
currentTypeName String Current type deompliated
accessor String Get or Set accessor
Результат Expression

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

public static RefactorStringSwitchStatement ( SwitchStatement switchStatement ) : String
switchStatement SwitchStatement
Результат String

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

Removes a node from the header nodes list of a specified type
public static RemoveHeaderNode ( AstNode node, TypeDeclaration type ) : void
node AstNode
type TypeDeclaration
Результат void

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

public static RemoveInclude ( string typeName ) : void
typeName string
Результат void

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

public static ResolveMemberType ( CSharp mref ) : Mono.Cecil.TypeDefinition
mref CSharp
Результат Mono.Cecil.TypeDefinition

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

Resolves the namespace of a given type name
public static ResolveNamespace ( string type ) : string
type string
Результат string

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

Restarts the resolver class variables
public static Restart ( ) : void
Результат void

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

Converts template types to Object type (useful for inline methods and template specialization types)
public static TryPatchTemplateToObjectType ( AstType type, AstType &newType ) : bool
type AstType
newType AstType
Результат bool

Описание свойств

boostLink публичное статическое свойство

public static bool boostLink
Результат bool