From: Justin Seyster Date: Fri, 27 Aug 2010 01:13:49 +0000 (-0400) Subject: Documentation for new type functions. X-Git-Tag: release-v1.0~50 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=0210ce35c050c1d6bc6c337d29ead32c613812fb;p=interaspect.git Documentation for new type functions. --- diff --git a/src/aop-type.c b/src/aop-type.c index 44a5082..8702ac0 100644 --- a/src/aop-type.c +++ b/src/aop-type.c @@ -361,6 +361,10 @@ aop_t_all_fp () return &_aop_t_all_fp; } +/** + * Return a type that will match any pointer. + *\return A type that will match any pointer. + */ const struct aop_type * aop_t_all_pointer () { @@ -513,6 +517,13 @@ aop_t_float128 () return &_aop_t_float128; } +/** + * Return a type that will match a struct type. Note that this will + * not match pointers to the specified struct type. + * \param tag The name of the struct. To match struct + * foo, give just foo as the tag. + * \return A type that will match a specified struct. + */ const struct aop_type * aop_t_struct (const char *tag) { @@ -523,6 +534,15 @@ aop_t_struct (const char *tag) return init_aop_type (ATK_STRUCT, 0, tag, -1); } +/** + * A convenience function for obtaining a type that will match a + * pointer to a specified struct. The result is the same as obtaining + * a struct type with aop_t_struct() and passing it to + * aop_t_pointer_to(). + * \param tag The name of the struct. To match struct + * foo *, give just foo as the tag. + * \return A type that will match pointers to a specified struct. + */ const struct aop_type * aop_t_struct_ptr (const char *tag) { @@ -533,6 +553,13 @@ aop_t_struct_ptr (const char *tag) return init_aop_type (ATK_STRUCT, 1, tag, -1); } +/** + * Return a type that will match a union type. Note that this will + * not match pointers to the specified union type. + * \param tag The name of the union. To match union foo, + * give just foo as the tag. + * \return A type that will match a specified union. + */ const struct aop_type * aop_t_union (const char *tag) { @@ -543,6 +570,15 @@ aop_t_union (const char *tag) return init_aop_type (ATK_UNION, 0, tag, -1); } +/** + * A convenience function for obtaining a type that will match a + * pointer to a specified union. The result is the same as obtaining + * a union type with aop_t_union() and passing it to + * aop_t_pointer_to(). + * \param tag The name of the union. To match union + * foo *, give just foo as the tag. + * \return A type that will match pointers to a specified union. + */ const struct aop_type * aop_t_union_ptr (const char *tag) { @@ -553,6 +589,13 @@ aop_t_union_ptr (const char *tag) return init_aop_type (ATK_UNION, 1, tag, -1); } +/** + * Return a type that will match an enum type. Note that this will + * not match pointers to the specified enum type. + * \param tag The name of the enum. To match enum foo, + * give just enum as the tag. + * \return A type that will match a specified union. + */ const struct aop_type * aop_t_enum (const char *tag) {