Package org.eclipse.cdt.core.model

# Interface IParent

All Known Subinterfaces:
  `IArchive`, `IArchiveContainer`, `IBinary`, `IBinaryContainer`, `IBinaryModule`, `ICContainer`, `ICModel`, `ICProject`, `IEnumeration`, `IIncludeReference`, `ILibraryReference`, `INamespace`, `ISourceRoot`, `IStructure`, `IStructureTemplate`, `ITranslationUnit`, `IWorkingCopy`

public interface IParent
Common protocol for C elements that contain other C elements.

## Method Summary

Modifier and Type
Method
Description
`ICElement[]`
`getChildren()`
Returns the immediate children of this element.
`List<ICElement>`
`getChildrenOfType(int type)`
returns the children of a certain type
`boolean`
`hasChildren()`
Returns whether this element has one or more immediate children.

## Method Details

### getChildren

ICElement[] getChildren() throws CModelException
Returns the immediate children of this element. The children are in no particular order.

Throws:
  `CModelException` - if this element does not exist or if an exception occurs while accessing its corresponding resource

### getChildrenOfType

List<ICElement> getChildrenOfType(int type) throws CModelException
returns the children of a certain type

Throws:
  `CModelException`

### hasChildren

boolean hasChildren()
Returns whether this element has one or more immediate children. This is a convenience method, and may be more efficient than testing whether `getChildren()` returns an empty array.