Guest User

Untitled

a guest
May 25th, 2013
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. typedef Bool(*SPECIAL_FUNC)(KEY key);
  2.  
  3. typedef struct{
  4. int a;
  5. int b;
  6. SPECIAL_FUNC;
  7. }OBJ;
  8.  
  9. Bool add(KEY key); //code...
  10. Bool sub(KEY key); //code...
  11.  
  12. typedef Bool(*SPECIAL_FUNC)(KEY key);
  13.  
  14. /**
  15. * struct description
  16. */
  17. typedef struct{
  18. int a;
  19. int b;
  20.  
  21. /**
  22. * Function pointer to one of the following:
  23. * - add()
  24. * - sub()
  25. */
  26. SPECIAL_FUNC;
  27. }OBJ;
  28.  
  29. /**
  30. * @relates OBJ
  31. * add function.
  32. */
  33. Bool add(KEY key); //code...
  34.  
  35. /**
  36. * @relates OBJ
  37. * sub function.
  38. */
  39. Bool sub(KEY key); //code...
  40.  
  41. #ifdef MY_DOXYGEN_FAKE
  42. KEY key;
  43. add(key);
  44. sub(key);
  45. #endif
Advertisement
Add Comment
Please, Sign In to add comment