CsEntityTypeRef Struct Reference

Entity type specifier. More...

List of all members.

Public Types

enum  unique_base { ub_not_found, ub_found, ub_multiple }

Public Member Functions

 CsEntityTypeRef ()
 ~CsEntityTypeRef ()
void clear_without_delete ()
void delete_entities ()
CsEntityTypeRef clone () const
void replace_generic_parameters (CsEntity *parent, cs_generic_param_type generic_type, unsigned n_arguments, const CsEntityTypeRef *arguments)
void replace_generic_parameters (CsDisplay &display, CsEntity *parent, cs_generic_param_type generic_type, unsigned n_arguments, const CsEntityTypeRef *arguments, CsTypeArgumentList *tal)
bool is_contains_generic_parameters (cs_generic_param_type generic_type) const
void get_used_method_type_parameters (CsEntity *parent, byte method_type_parameters[]) const
bool is_contains_dynamic () const
void replace_dynamic_to_object ()
bool isOutputUnsafe () const
bool isInputUnsafe () const
void delete_value ()
bool operator< (const CsEntityTypeRef &rhs) const
bool operator== (const CsEntityTypeRef &rhs) const
void clear ()
bool equal (const CsEntityTypeRef &rhs) const
 Returns true if types are equal.
bool equal (const CsEntityTypeRef &rhs, equal_option option) const
bool equalWithAnonymousTypes (const CsEntityTypeRef &rhs) const
cs_inferred_type equalInferred (const CsEntityTypeRef &rhs, CsEntityTypeRef *method_type_arguments) const
bool isUnknown () const
 Returns true if the type is unknown (undefined).
bool isVoid () const
 Returns true if the type is void.
bool isBoolean () const
 Returns true if the type is boolean.
bool isChar () const
 Returns true if the type is char.
bool isInt8 () const
 Returns true if the type is sbyte.
bool isUInt8 () const
 Returns true if the type is byte.
bool isInt16 () const
 Returns true if the type is short.
bool isUInt16 () const
 Returns true if the type is ushort.
bool isInt32 () const
 Returns true if the type is int.
bool isUInt32 () const
 Returns true if the type is uint.
bool isInt64 () const
 Returns true if the type is long.
bool isUInt64 () const
 Returns true if the type is ulong.
bool isFloat32 () const
 Returns true if the type is float.
bool isFloat64 () const
 Returns true if the type is double.
bool isDecimal () const
 Returns true if the type is decimal.
bool isEnum () const
 Returns true if the type is enum.
bool isEnumOrNullableEnum () const
 Returns true if the type is enum or enum?.
bool isEnumCompatibleIntegerType () const
bool isEnumCompatibleNullableIntegerType () const
bool isValueType () const
 Returns true if the type is value type.
bool isVoidOrValueType () const
 Returns true if the type is void or value type.
bool isReferenceType () const
 Returns true if the type is reference type.
bool isClass () const
 Returns true if the type is class.
bool isInterface () const
 Returns true if the type is interface.
bool isDelegate () const
 Returns true if the type is delegate.
bool isClassOrInterface () const
 Returns true if the type is class or interface.
bool isClassOrValueType () const
 Returns true if the type is class or value-type.
bool isClassOrValueTypeOrDelegate () const
 Returns true if the type is class, value-type or delegate.
bool isArray () const
 Returns true if the type is array.
bool isOneDimensionalArray () const
 Returns true if the type is one dimensional array.
bool isNull () const
 Returns true if the type is null literal.
bool isAnonymousFunction () const
 Returns true if the type is anonymous function.
bool isGenericParam () const
 Returns true if the type is class, value-type or delegate.
bool isGeneric () const
 Returns true if the type is generic.
void setConstantExpression ()
 Set constant expression flag.
void clearConstantExpression ()
 Clear constant expression flag.
bool isConstantExpression () const
 Returns true if type is constant expression.
void setZero ()
 Set zero flag.
bool isZero () const
 Returns true if type is zero literal.
void setNullable ()
 Set nullable type flag.
bool isNullable () const
 Returns true if the type is nullable.
void setSZArray ()
 Set ELEMENT_TYPE_SZARRAY flag.
bool isSZArray () const
 Returns ELEMENT_TYPE_SZARRAY flag.
void setModopt ()
 Set modopt flag.
bool isModopt () const
 Returns true if the type has ELEMENT_TYPE_CMOD_OPT prefix.
void setDynamic ()
 Set dynamic type.
void clearDynamic ()
 Reset dynamic type.
bool isDynamic () const
 Returns type is dynamic.
void setDynamic (const bool *traverseFlags, int &index)
 Set dynamic type.
bool isAnonymousType () const
 Returns true if the type is anonymous type.
void setImplicitlyTyped ()
 Set anonymous type.
bool isImplicitlyTyped () const
 Returns true if the type is anonymous type.
void setExpressionTree ()
 Set expression tree flag.
bool isExpressionTree () const
 Returns true if the type is expression tree.
bool isCsSimpleEmbeddedType () const
 Returns true if the type is simple embedded type, including decimal.
CsEntityTypegetNonNullableType () const
 Returns Nonnulable type from nullable type.
CsEntityDelegategetDelegate () const
 Returns delegate entity from delegate or expression tree type.
const CsEntityTypeRefgetEnumUnderlyingType () const
void getDelegateArguments (int &n_arguments, CsEntityTypeRef *&arguments) const
 Returns delegate generic parameter arguments from delegate or expression tree type.
bool isUnmanagedType () const
 Returns true if the type is unmanaged.
bool isUnsafe () const
 Returns true if the type is unsafe.
CsEntityTypegetType () const
 Returns direct or indirect type.
const CsEntityTypeRefgetNonNullable () const
const TCHAR * getNameAsString (CsEntity::entity_name_options &options) const

Static Public Member Functions

static bool isBaseDerived (const CsEntityTypeRef &base, const CsEntityTypeRef &derived)
 Returns true if base derived from derived type.
static bool isBaseDerived (const CsEntityTypeRef &base, const CsEntityTypeRef &derived, equal_option option)
static cs_inferred_type isIdentifyOrBaseDerivedInferred (const CsEntityTypeRef &base, const CsEntityTypeRef &derived, CsEntityTypeRef *method_type_arguments)
static unique_base findUniqueBase (CsEntityType *base_type, CsEntityTypeRef *derived_typeref, CsEntityTypeRef *&unique_typeref)

Public Attributes

cs_entity_type type: 8
 Entity type specifier enumeration.
cs_entity_type_transitive_flag transitive_flag: 8
 Transitive flags.
cs_entity_type_nontransitive_flag nontransitive_flag: 8
 Non-Transitive flags.
cs_entity_special_type special_type: 8
 Special type.
union {
   CsEntity *   entity
   CsEntityTypeRef *   type
   CsEntityArraySpecifier *   array_specifier
   CsEntityMethodSpecifier *   method_specifier
   CsEntityInstanceSpecifier *   instance_specifier
u
 Union.

Private Member Functions

size_t add_name_to_buffer (CsEntity::entity_name_options &options, size_t position) const

Static Private Member Functions

static bool isBaseDerived2 (const CsEntityTypeRef &base, const CsEntityTypeRef &derived)
static bool isBaseDerived2 (const CsEntityTypeRef &base, const CsEntityTypeRef &derived, equal_option option)
static unique_base internal_findUniqueBase (CsEntityType *base_type, CsEntityTypeRef *derived_typeref, CsEntityTypeRef *&unique_typeref)

Static Private Attributes

static set< const CsEntityType * > * recursive_types_

Friends

struct CsEntityArraySpecifier
struct CsEntityMethodSpecifier
struct CsEntityInstanceSpecifier

Detailed Description

Entity type specifier.


Member Enumeration Documentation

Enumerator:
ub_not_found 
ub_found 
ub_multiple 

Constructor & Destructor Documentation

CsEntityTypeRef::CsEntityTypeRef (  )  [inline]
CsEntityTypeRef::~CsEntityTypeRef (  )  [inline]

Member Function Documentation

size_t CsEntityTypeRef::add_name_to_buffer ( CsEntity::entity_name_options options,
size_t  position 
) const [private]
void CsEntityTypeRef::clear (  )  [inline]
void CsEntityTypeRef::clear_without_delete (  )  [inline]
void CsEntityTypeRef::clearConstantExpression (  )  [inline]

Clear constant expression flag.

void CsEntityTypeRef::clearDynamic (  )  [inline]

Reset dynamic type.

CsEntityTypeRef CsEntityTypeRef::clone (  )  const
void CsEntityTypeRef::delete_entities (  ) 
void CsEntityTypeRef::delete_value (  )  [inline]
bool CsEntityTypeRef::equal ( const CsEntityTypeRef rhs,
equal_option  option 
) const
bool CsEntityTypeRef::equal ( const CsEntityTypeRef rhs  )  const

Returns true if types are equal.

cs_inferred_type CsEntityTypeRef::equalInferred ( const CsEntityTypeRef rhs,
CsEntityTypeRef method_type_arguments 
) const
bool CsEntityTypeRef::equalWithAnonymousTypes ( const CsEntityTypeRef rhs  )  const
static unique_base CsEntityTypeRef::findUniqueBase ( CsEntityType base_type,
CsEntityTypeRef derived_typeref,
CsEntityTypeRef *&  unique_typeref 
) [static]
void CsEntityTypeRef::get_used_method_type_parameters ( CsEntity parent,
byte  method_type_parameters[] 
) const
CsEntityDelegate* CsEntityTypeRef::getDelegate (  )  const

Returns delegate entity from delegate or expression tree type.

void CsEntityTypeRef::getDelegateArguments ( int &  n_arguments,
CsEntityTypeRef *&  arguments 
) const

Returns delegate generic parameter arguments from delegate or expression tree type.

const CsEntityTypeRef* CsEntityTypeRef::getEnumUnderlyingType (  )  const
const TCHAR* CsEntityTypeRef::getNameAsString ( CsEntity::entity_name_options options  )  const
const CsEntityTypeRef& CsEntityTypeRef::getNonNullable (  )  const
CsEntityType* CsEntityTypeRef::getNonNullableType (  )  const

Returns Nonnulable type from nullable type.

CsEntityType* CsEntityTypeRef::getType (  )  const

Returns direct or indirect type.

static unique_base CsEntityTypeRef::internal_findUniqueBase ( CsEntityType base_type,
CsEntityTypeRef derived_typeref,
CsEntityTypeRef *&  unique_typeref 
) [static, private]
bool CsEntityTypeRef::is_contains_dynamic (  )  const
bool CsEntityTypeRef::is_contains_generic_parameters ( cs_generic_param_type  generic_type  )  const
bool CsEntityTypeRef::isAnonymousFunction (  )  const [inline]

Returns true if the type is anonymous function.

bool CsEntityTypeRef::isAnonymousType (  )  const [inline]

Returns true if the type is anonymous type.

bool CsEntityTypeRef::isArray (  )  const [inline]

Returns true if the type is array.

static bool CsEntityTypeRef::isBaseDerived ( const CsEntityTypeRef base,
const CsEntityTypeRef derived,
equal_option  option 
) [static]
static bool CsEntityTypeRef::isBaseDerived ( const CsEntityTypeRef base,
const CsEntityTypeRef derived 
) [static]

Returns true if base derived from derived type.

static bool CsEntityTypeRef::isBaseDerived2 ( const CsEntityTypeRef base,
const CsEntityTypeRef derived,
equal_option  option 
) [static, private]
static bool CsEntityTypeRef::isBaseDerived2 ( const CsEntityTypeRef base,
const CsEntityTypeRef derived 
) [static, private]
bool CsEntityTypeRef::isBoolean (  )  const [inline]

Returns true if the type is boolean.

bool CsEntityTypeRef::isChar (  )  const [inline]

Returns true if the type is char.

bool CsEntityTypeRef::isClass (  )  const

Returns true if the type is class.

bool CsEntityTypeRef::isClassOrInterface (  )  const

Returns true if the type is class or interface.

bool CsEntityTypeRef::isClassOrValueType (  )  const

Returns true if the type is class or value-type.

bool CsEntityTypeRef::isClassOrValueTypeOrDelegate (  )  const

Returns true if the type is class, value-type or delegate.

bool CsEntityTypeRef::isConstantExpression (  )  const [inline]

Returns true if type is constant expression.

bool CsEntityTypeRef::isCsSimpleEmbeddedType (  )  const

Returns true if the type is simple embedded type, including decimal.

bool CsEntityTypeRef::isDecimal (  )  const [inline]

Returns true if the type is decimal.

bool CsEntityTypeRef::isDelegate (  )  const

Returns true if the type is delegate.

bool CsEntityTypeRef::isDynamic (  )  const [inline]

Returns type is dynamic.

bool CsEntityTypeRef::isEnum (  )  const

Returns true if the type is enum.

bool CsEntityTypeRef::isEnumCompatibleIntegerType (  )  const
bool CsEntityTypeRef::isEnumCompatibleNullableIntegerType (  )  const
bool CsEntityTypeRef::isEnumOrNullableEnum (  )  const

Returns true if the type is enum or enum?.

bool CsEntityTypeRef::isExpressionTree (  )  const [inline]

Returns true if the type is expression tree.

bool CsEntityTypeRef::isFloat32 (  )  const [inline]

Returns true if the type is float.

bool CsEntityTypeRef::isFloat64 (  )  const [inline]

Returns true if the type is double.

bool CsEntityTypeRef::isGeneric (  )  const [inline]

Returns true if the type is generic.

bool CsEntityTypeRef::isGenericParam (  )  const [inline]

Returns true if the type is class, value-type or delegate.

static cs_inferred_type CsEntityTypeRef::isIdentifyOrBaseDerivedInferred ( const CsEntityTypeRef base,
const CsEntityTypeRef derived,
CsEntityTypeRef method_type_arguments 
) [static]
bool CsEntityTypeRef::isImplicitlyTyped (  )  const [inline]

Returns true if the type is anonymous type.

bool CsEntityTypeRef::isInputUnsafe (  )  const
bool CsEntityTypeRef::isInt16 (  )  const [inline]

Returns true if the type is short.

bool CsEntityTypeRef::isInt32 (  )  const [inline]

Returns true if the type is int.

bool CsEntityTypeRef::isInt64 (  )  const [inline]

Returns true if the type is long.

bool CsEntityTypeRef::isInt8 (  )  const [inline]

Returns true if the type is sbyte.

bool CsEntityTypeRef::isInterface (  )  const

Returns true if the type is interface.

bool CsEntityTypeRef::isModopt (  )  const [inline]

Returns true if the type has ELEMENT_TYPE_CMOD_OPT prefix.

bool CsEntityTypeRef::isNull (  )  const [inline]

Returns true if the type is null literal.

bool CsEntityTypeRef::isNullable (  )  const [inline]

Returns true if the type is nullable.

bool CsEntityTypeRef::isOneDimensionalArray (  )  const

Returns true if the type is one dimensional array.

bool CsEntityTypeRef::isOutputUnsafe (  )  const
bool CsEntityTypeRef::isReferenceType (  )  const

Returns true if the type is reference type.

bool CsEntityTypeRef::isSZArray (  )  const [inline]

Returns ELEMENT_TYPE_SZARRAY flag.

bool CsEntityTypeRef::isUInt16 (  )  const [inline]

Returns true if the type is ushort.

bool CsEntityTypeRef::isUInt32 (  )  const [inline]

Returns true if the type is uint.

bool CsEntityTypeRef::isUInt64 (  )  const [inline]

Returns true if the type is ulong.

bool CsEntityTypeRef::isUInt8 (  )  const [inline]

Returns true if the type is byte.

bool CsEntityTypeRef::isUnknown (  )  const [inline]

Returns true if the type is unknown (undefined).

bool CsEntityTypeRef::isUnmanagedType (  )  const

Returns true if the type is unmanaged.

bool CsEntityTypeRef::isUnsafe (  )  const

Returns true if the type is unsafe.

bool CsEntityTypeRef::isValueType (  )  const

Returns true if the type is value type.

bool CsEntityTypeRef::isVoid (  )  const [inline]

Returns true if the type is void.

bool CsEntityTypeRef::isVoidOrValueType (  )  const [inline]

Returns true if the type is void or value type.

bool CsEntityTypeRef::isZero (  )  const [inline]

Returns true if type is zero literal.

bool CsEntityTypeRef::operator< ( const CsEntityTypeRef rhs  )  const
bool CsEntityTypeRef::operator== ( const CsEntityTypeRef rhs  )  const [inline]
void CsEntityTypeRef::replace_dynamic_to_object (  ) 
void CsEntityTypeRef::replace_generic_parameters ( CsDisplay &  display,
CsEntity parent,
cs_generic_param_type  generic_type,
unsigned  n_arguments,
const CsEntityTypeRef arguments,
CsTypeArgumentList tal 
)
void CsEntityTypeRef::replace_generic_parameters ( CsEntity parent,
cs_generic_param_type  generic_type,
unsigned  n_arguments,
const CsEntityTypeRef arguments 
)
void CsEntityTypeRef::setConstantExpression (  )  [inline]

Set constant expression flag.

void CsEntityTypeRef::setDynamic ( const bool *  traverseFlags,
int &  index 
)

Set dynamic type.

void CsEntityTypeRef::setDynamic (  )  [inline]

Set dynamic type.

void CsEntityTypeRef::setExpressionTree (  )  [inline]

Set expression tree flag.

void CsEntityTypeRef::setImplicitlyTyped (  )  [inline]

Set anonymous type.

void CsEntityTypeRef::setModopt (  )  [inline]

Set modopt flag.

void CsEntityTypeRef::setNullable (  )  [inline]

Set nullable type flag.

void CsEntityTypeRef::setSZArray (  )  [inline]

Set ELEMENT_TYPE_SZARRAY flag.

void CsEntityTypeRef::setZero (  )  [inline]

Set zero flag.


Friends And Related Function Documentation

friend struct CsEntityArraySpecifier [friend]
friend struct CsEntityInstanceSpecifier [friend]
friend struct CsEntityMethodSpecifier [friend]

Member Data Documentation

cs_entity_type_nontransitive_flag CsEntityTypeRef::nontransitive_flag

Non-Transitive flags.

set<const CsEntityType*>* CsEntityTypeRef::recursive_types_ [static, private]
cs_entity_special_type CsEntityTypeRef::special_type

Special type.

cs_entity_type_transitive_flag CsEntityTypeRef::transitive_flag

Transitive flags.

cs_entity_type CsEntityTypeRef::type

Entity type specifier enumeration.

union { ... } CsEntityTypeRef::u

Union.

© 2010 metaspec