Interface ITypeReference
Assembly: Perlang.Common.dll
Syntax
public interface ITypeReference
Properties
|
Improve this Doc
View Source
ClrType
Declaration
Property Value
Type |
Description |
System.Nullable<Type> |
|
|
Improve this Doc
View Source
CppType
Declaration
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
CppTypeCast
Gets a cast to the C++ type that this ITypeReference refers to. Note that no validation if the
cast will be possible or not is performed here; it is the responsibility of the caller.
Declaration
virtual string CppTypeCast { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
CppWrapInSharedPtr
Gets a value indicating whether this type should be wrapped in an std::shared_ptr<T>
in certain cases
(local variables, method parameters, etc).
Declaration
bool CppWrapInSharedPtr { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ExplicitTypeSpecified
Gets a value indicating whether the type reference contains an explicit type specifier or not. If this is
false, the user is perhaps intending for the type to be inferred from the program context.
Declaration
virtual bool ExplicitTypeSpecified { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsArray
Gets a value indicating whether this type represents an array type, e.g. string[]
or int[]
.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsNullObject
Gets a value indicating whether this type reference refers to a null
value.
Declaration
virtual bool IsNullObject { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsResolved
Gets a value indicating whether the type reference has been successfully resolved to a (loaded) CLR type or
not.
Declaration
virtual bool IsResolved { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsStringType
Declaration
virtual bool IsStringType { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsValidNumberType
Declaration
virtual bool IsValidNumberType { get; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
PossiblyWrappedCppType
Gets the C++ for this ITypeReference, possibly wrapped in a std::shared_ptr<T>
.
Declaration
string PossiblyWrappedCppType { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
TypeSpecifier
Declaration
Token TypeSpecifier { get; }
Property Value
Methods
|
Improve this Doc
View Source
SetClrType(Nullable<Type>)
Sets the ClrType for the type reference. This method is typically called when type inference is performed.
Declaration
void SetClrType(Type? value)
Parameters
Type |
Name |
Description |
System.Nullable<Type> |
value |
The new CLR (.NET) type for this type reference.
|