Eclipse CDT
Pre-release 3.0

org.eclipse.cdt.core.dom.ast
Interface ICompositeType

All Superinterfaces:
Cloneable, IBinding, IType
All Known Subinterfaces:
ICPPClassSpecialization, ICPPClassTemplate, ICPPClassTemplatePartialSpecialization, ICPPClassTemplatePartialSpecializationSpecialization, ICPPClassType, ICPPTemplateTemplateParameter

public interface ICompositeType
extends IBinding, IType

Interface for all composite types: classes, structs or unions.


Field Summary
static int k_struct
           
static int k_union
           
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
EMPTY_BINDING_ARRAY
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IType
EMPTY_TYPE_ARRAY, TYPE_MATCHER
 
Method Summary
 IField findField(String name)
          returns the field that matches name, or null if there is no such field.
 IScope getCompositeScope()
          get the IScope object that is associated with this composite type
 IField[] getFields()
          Returns the fields for this type.
 int getKey()
          what kind of composite type is this?
 boolean isAnonymous()
          Returns whether the type is anonymous or not.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
getLinkage, getName, getNameCharArray, getOwner, getScope
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IType
clone, isSameType
 

Field Detail

k_struct

static final int k_struct
See Also:
Constant Field Values

k_union

static final int k_union
See Also:
Constant Field Values
Method Detail

getKey

int getKey()
           throws DOMException
what kind of composite type is this?

Throws:
DOMException

isAnonymous

boolean isAnonymous()
                    throws DOMException
Returns whether the type is anonymous or not. A type for which objects or pointers are declared is not considered an anonymous type.
 struct Outer {
    struct {int a;}; // anonymous
    struct {int b;} c; // not anonymous
 }
 

Throws:
DOMException
Since:
5.1

getFields

IField[] getFields()
                   throws DOMException
Returns the fields for this type.

Returns:
List of IField
Throws:
DOMException

findField

IField findField(String name)
                 throws DOMException
returns the field that matches name, or null if there is no such field.

Parameters:
name -
Throws:
DOMException

getCompositeScope

IScope getCompositeScope()
                         throws DOMException
get the IScope object that is associated with this composite type

Throws:
DOMException

Eclipse CDT
Pre-release 3.0

Copyright (c) IBM Corp. and others 2004. All Rights Reserved.