PUMA Library Reference Manual
Loading...
Searching...
No Matches
Puma::CTypeMemberPointer Class Reference

#include <Puma/CTypeInfo.h>

+ Inheritance diagram for Puma::CTypeMemberPointer:

Description

Type of a member pointer.

Examples:

struct X { int a; void f(int); };
int X::* aptr = &X::a; // aptr has type 'member pointer to int'
// type structure:
// CTypeMemberPointer class=X
// CTypePrimitive int
void (X::*fptr)(int) = &X::f; // fptr has type 'member pointer to function returning void with one argument int'
// type structure:
// CTypeMemberPointer class=X
// CTypeFunction args=int
// CTypePrimitive void

Public Member Functions

 CTypeMemberPointer (CTypeInfo *base, CObjectInfo *info)
 Constructor.
 
 ~CTypeMemberPointer ()
 Destructor.
 
CRecordRecord () const
 Get the class or union containing the member.
 
CTemplateParamInfoTemplateParam () const
 Get the template parameter information if the member's class is a type template parameter.
 
- Public Member Functions inherited from Puma::CTypePointer
 CTypePointer (CTypeInfo *base)
 Constructor.
 
 ~CTypePointer ()
 Destructor.
 
- Public Member Functions inherited from Puma::CTypeInfo
 CTypeInfo (CTypeInfo *base, TypeId id)
 Constructor.
 
 ~CTypeInfo ()
 Destructor.
 
bool operator== (const CTypeInfo &type) const
 Check if this type equals the given type.
 
bool operator!= (const CTypeInfo &type) const
 Check if this type not equals the given type.
 
bool equals (const CTypeInfo &type, bool matchTemplateParams=false, bool noDependentFctParams=false) const
 Check if this type equals the given type.
 
bool equalsUnqualified (const CTypeInfo &type) const
 Check if this type equals the given type if both types top-level qualifiers removed.
 
void print (std::ostream &os) const
 Print the textual representation of this type on the given stream.
 
void TypeText (std::ostream &os, const char *name=(const char *) 0, bool abs=false, bool tdef=false, bool elaborated_type_spec=false, bool unnamed=false) const
 Print the textual representation of this type on the given stream.
 
long int Dimension () const
 Get the dimension of an array type.
 
long int Size () const
 Get the size in bits of a type.
 
long int Align () const
 Get the alignment of a type.
 
TypeId Id () const
 Get the type identifier.
 
CTypeInfoBaseType () const
 Get the base type of a compound type.
 
void BaseType (CTypeInfo *base)
 Set the base type of a compount type.
 
bool isTypedef () const
 Check if this is a typedef type.
 
CObjectInfoTypedefInfo () const
 Get the typedef information if this is a typedef type.
 
CTypeInfoTypedefInfo (CObjectInfo *)
 Set the typedef information if this is a typedef type.
 
bool isComplete (unsigned long pos=0) const
 Check if this is a complete type.
 
bool isDependent (bool consider_unknown_t=true, bool is_named_type=false) const
 Check if this type or one of its base types depends on a template parameter.
 
bool isLocal () const
 Check if this is a local type.
 
bool isConst () const
 Check if this type is const qualified.
 
bool isVolatile () const
 Check if this type is volatile qualified.
 
bool isRestrict () const
 Check if this type is restrict qualified.
 
CRecordRecord () const
 Get the class or union of a class or union type.
 
CClassInfoClassInfo () const
 Get the class information if this is a class type.
 
CUnionInfoUnionInfo () const
 Get the union information if this is a union type.
 
CEnumInfoEnumInfo () const
 Get the enumeration information if this is an enumeration type.
 
CFunctionInfoFunctionInfo () const
 Get the function information if this is a function type.
 
CTypeInfoPtrBaseType () const
 Get the base type of a pointer type.
 
CTypeListArgTypes () const
 Get the argument type list of a function or qualified type.
 
CTypeInfoVirtualType () const
 Get the virtual type of this type.
 
CTypeInfoUnqualType () const
 Get the unqualified version of this type.
 
CTypeInfoNonReferenceType () const
 Get the non-reference type version of this type.
 
CTypeFunctionPtrToFct () const
 Get the function type of a pointer-to-function type.
 
CTypeArrayPtrToArray () const
 Get the array type of a pointer-to-array type.
 
CTypeQualifiedTypeQualified () const
 Get the pointer to CTypeQualified if this is a qualified type.
 
CTypeFunctionTypeFunction () const
 Get the pointer to CTypeFunction if this is a function type.
 
CTypeBitFieldTypeBitField () const
 Get the pointer to CTypeBitField if this is a bit-field type.
 
CTypePointerTypePointer () const
 Get the pointer to CTypePointer if this is a pointer type.
 
CTypeMemberPointerTypeMemberPointer () const
 Get the pointer to CTypeMemberPointer if this is a member pointer type.
 
CTypeAddressTypeAddress () const
 Get the pointer to CTypeAddress if this is a reference type.
 
CTypeArrayTypeArray () const
 Get the pointer to CTypeArray if this is an array type.
 
CTypeVarArrayTypeVarArray () const
 Get the pointer to CTypeVarArray if this is a variable length array type.
 
CTypeClassTypeClass () const
 Get the pointer to CTypeClass if this is a class type.
 
CTypeUnionTypeUnion () const
 Get the pointer to CTypeUnion if this is a union type.
 
CTypeRecordTypeRecord () const
 Get the pointer to CTypeRecord if this is a class or union type.
 
CTypeEnumTypeEnum () const
 Get the pointer to CTypeEnum if this is an enumeration type.
 
CTypePrimitiveTypePrimitive () const
 Get the pointer to CTypePrimitive if this is a primitive type.
 
CTypeInfoTypeEmpty () const
 Get the pointer to CTypeInfo if this is type Puma::CTYPE_EMPTY.
 
CTypeTemplateParamTypeTemplateParam () const
 Get the pointer to CTypeTemplateParam if this is a template parameter type.
 
bool isQualified () const
 Check if this is a qualified type.
 
bool isPointer () const
 Check if this is a pointer type.
 
bool isPointerOrArray () const
 Check if this is a pointer or array type.
 
bool isAddress () const
 Check if this is a reference type.
 
bool isRecord () const
 Check if this is a class or union type.
 
bool isClass () const
 Check if this is a class type.
 
bool isUnion () const
 Check if this is a union type.
 
bool isClassOrUnion () const
 Check if this is a class or union type.
 
bool isArray () const
 Check if this is an array type.
 
bool isFixedArray () const
 Check if this is a fixed length array type.
 
bool isVarArray () const
 Check if this is a variable length type.
 
bool isArithmetic () const
 Check if this is an arithmetic type.
 
bool isScalar () const
 Check if this is a pointer or arithmetic type.
 
bool isAggregate () const
 Check if this is an array, class, or union type.
 
bool isInteger () const
 Check if this is an integer type.
 
bool isVoid () const
 Check if this is type void.
 
bool isEnum () const
 Check if this is an enumeration type.
 
bool isReal () const
 Check if this is a floating point type.
 
bool isMemberPointer () const
 Check if this is a member pointer type.
 
bool isUndefined () const
 Check if this is an undefined type.
 
bool isFunction () const
 Check if this is a function type.
 
bool isBitField () const
 Check if this is a bit-field type.
 
bool isMethod () const
 Check if this is a class member function type.
 
bool isStdFunction () const
 Check if this is a non-class-member function type.
 
bool isTemplate () const
 Check if this is a template type.
 
bool isTemplateInstance () const
 Check if this is a template instance type.
 
bool isTemplateParam () const
 Check if this is a template parameter type.
 
bool isTypeParam () const
 Check if this is a type template parameter type.
 
bool isNonTypeParam () const
 Check if this is a non-type template parameter type.
 
bool isObject (unsigned long pos=0) const
 Check if this is an object type.
 
bool isPOD () const
 Check if this is a plain old data (POD) type.
 
bool isTrivial () const
 Check if this is a trivial type: (1) a scalar type (2) a trivial class type (3) an array of (1), (2), or (3)
 
bool is_bool () const
 Check if the ID of this type is CTypeInfo::TYPE_BOOL or CTypeInfo::TYPE_C_BOOL.
 
bool is_char () const
 Check if the ID of this type is CTypeInfo::TYPE_CHAR.
 
bool is_wchar_t () const
 Check if the ID of this type is CTypeInfo::TYPE_WCHAR_T.
 
bool is_short () const
 Check if the ID of this type is CTypeInfo::TYPE_SHORT.
 
bool is_int () const
 Check if the ID of this type is CTypeInfo::TYPE_INT.
 
bool is_long () const
 Check if the ID of this type is CTypeInfo::TYPE_LONG.
 
bool is_long_long () const
 Check if the ID of this type is CTypeInfo::TYPE_LONG_LONG.
 
bool is_int128 () const
 Check if the ID of this type is CTypeInfo::TYPE_INT128.
 
bool is_signed_char () const
 Check if the ID of this type is CTypeInfo::TYPE_SIGNED_CHAR.
 
bool is_unsigned_char () const
 Check if the ID of this type is CTypeInfo::TYPE_UNSIGNED_CHAR.
 
bool is_unsigned_short () const
 Check if the ID of this type is CTypeInfo::TYPE_UNSIGNED_SHORT.
 
bool is_unsigned_int () const
 Check if the ID of this type is CTypeInfo::TYPE_UNSIGNED_INT.
 
bool is_unsigned_long () const
 Check if the ID of this type is CTypeInfo::TYPE_UNSIGNED_LONG.
 
bool is_unsigned_long_long () const
 Check if the ID of this type is CTypeInfo::TYPE_UNSIGNED_LONG_LONG.
 
bool is_unsigned_int128 () const
 Check if the ID of this type is CTypeInfo::TYPE_UNSIGNED_INT128.
 
bool is_float () const
 Check if the ID of this type is CTypeInfo::TYPE_FLOAT.
 
bool is_double () const
 Check if the ID of this type is CTypeInfo::TYPE_DOUBLE.
 
bool is_long_double () const
 Check if the ID of this type is CTypeInfo::TYPE_LONG_DOUBLE.
 
bool is_void () const
 Check if the ID of this type is CTypeInfo::TYPE_VOID.
 
bool is_undefined () const
 Check if the ID of this type is CTypeInfo::TYPE_UNDEFINED.
 
bool is_unknown_t () const
 Check if the ID of this type is CTypeInfo::TYPE_UNKNOWN_T.
 
bool is_ellipsis () const
 Check if the ID of this type is CTypeInfo::TYPE_ELLIPSIS.
 
bool is_signed () const
 Check if this is a signed integer type.
 
bool is_unsigned () const
 Check if this is an unsigned integer type.
 
unsigned conv_rank () const
 Get the arithmetic conversion rank of the type.
 
bool operator> (const CTypeInfo &type) const
 Check if the conversion rank of this type is greater than the conversion rank of the given type.
 
bool operator>= (const CTypeInfo &type) const
 Check if the conversion rank of this type equals or is greater than the conversion rank of the given type.
 
bool operator<= (const CTypeInfo &type) const
 Check if the conversion rank of this type equals or is greater than the conversion rank of the given type.
 
bool operator< (const CTypeInfo &type) const
 Check if the conversion rank of this type is less than the conversion rank of the given type.
 
unsigned rank () const
 Get the rank of this type if it is an arithmetic type.
 
bool isTemplateInstanceArg () const
 Check if this is the type of a template instance argument declaration.
 
CTypeInfoDuplicate () const
 Maka a duplicate of this type.
 
void Mangled (std::ostream &os) const
 Print the mangled textual representation of the type on the given stream.
 
- Public Member Functions inherited from Puma::Printable
virtual ~Printable ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from Puma::CTypeInfo
enum  TypeId {
  TYPE_BOOL ,
  TYPE_C_BOOL ,
  TYPE_SIGNED_CHAR ,
  TYPE_UNSIGNED_CHAR ,
  TYPE_CHAR ,
  TYPE_UNSIGNED_SHORT ,
  TYPE_SHORT ,
  TYPE_UNSIGNED_INT ,
  TYPE_WCHAR_T ,
  TYPE_INT ,
  TYPE_UNSIGNED_LONG ,
  TYPE_LONG ,
  TYPE_UNSIGNED_LONG_LONG ,
  TYPE_LONG_LONG ,
  TYPE_UNSIGNED_INT128 ,
  TYPE_INT128 ,
  TYPE_FLOAT ,
  TYPE_DOUBLE ,
  TYPE_LONG_DOUBLE ,
  TYPE_VOID ,
  TYPE_UNDEFINED ,
  TYPE_UNKNOWN_T ,
  TYPE_ELLIPSIS ,
  TYPE_CLASS ,
  TYPE_UNION ,
  TYPE_ENUM ,
  TYPE_POINTER ,
  TYPE_ADDRESS ,
  TYPE_MEMBER_POINTER ,
  TYPE_FUNCTION ,
  TYPE_ARRAY ,
  TYPE_VAR_ARRAY ,
  TYPE_QUALIFIED ,
  TYPE_BIT_FIELD ,
  TYPE_TEMPLATE_PARAM ,
  TYPE_EMPTY
}
 Type identifiers. More...
 
- Static Public Member Functions inherited from Puma::CTypeInfo
static CTypeInfoDuplicate (const CTypeInfo *type)
 Make a duplicate of the given type.
 
static void Destroy (CTypeInfo *type)
 Destroy the given type.
 
- Static Public Attributes inherited from Puma::CTypeInfo
static CTypeInfoCTYPE_SIZE_T
 Internal representation of size_t.
 
static CTypeInfoCTYPE_PTRDIFF_T
 Internal representation of ptrdiff_t.
 
- Protected Member Functions inherited from Puma::CTypePointer
 CTypePointer (CTypeInfo *base, CTypeInfo::TypeId id)
 Constructor.
 

Constructor & Destructor Documentation

◆ CTypeMemberPointer()

Puma::CTypeMemberPointer::CTypeMemberPointer ( CTypeInfo * base,
CObjectInfo * info )
inline

Constructor.

Type has id CTypeInfo::TYPE_MEMBER_POINTER.

Parameters
baseThe base type (type of the member).
infoThe class containing the member.

◆ ~CTypeMemberPointer()

Puma::CTypeMemberPointer::~CTypeMemberPointer ( )
inline

Destructor.

Member Function Documentation

◆ Record()

CRecord * Puma::CTypeMemberPointer::Record ( ) const

Get the class or union containing the member.

◆ TemplateParam()

CTemplateParamInfo * Puma::CTypeMemberPointer::TemplateParam ( ) const

Get the template parameter information if the member's class is a type template parameter.