> ## Name

> cgGetNumParentTypes - gets the number of parent types of a given type

> ## Synopsis

>     #include <Cg/cg.h>

>     int cgGetNumParentTypes( CGtype type );

> ## Parameters

> type
>   The child type.

> ## Return Values

> Returns the number of parent types.

> Returns 0 if there are no parents.

> ## Description

> cgGetNumParentTypes returns the number of parents from which type inherits.

> A parent type is one from which the given type inherits, or an interface type that the given type implements.

> Note that the current Cg language specification implies that a type may only have a single parent type -- an interface implemented by the given type.

> ## Examples

> Given the type definitions:

>     interface myiface {
>       float4 eval(void);
>     };

>     struct mystruct : myiface {
>       float4 value;
>       float4 eval(void ) { return value; }
>     };

> mystruct has a single parent type, myiface.

> ## Errors

> None.

> ## History

> cgGetNumParentTypes was introduced in Cg 1.2.

> ## See Also

> cgGetParentType