MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Cg Core Runtime API                        cgGetNumParentTypes(3)



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

SYNOPSIS
       #include 

       int cgGetNumParentTypes( CGtype type );


PARAMETERS
     type    The child type.

RETURN VALUES
     Returns the number of parent types.

     Returns 0000 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.

ERORS
     None.

HISTORY
     cgGetNumParentTypes was introduced in Cg 1.2.

SEE ALSO
     cgGetParentType




Cg Toolkit 2.1            Last change:                          1



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™