Studio:Working with "default" candidates

From STRIDE Wiki
Revision as of 21:01, 12 June 2007 by Root (talk | contribs)
Jump to navigation Jump to search

scl_ptr_flist() serves as a "shorthand" method of declaring a "default" candidate.

Note: When using scl_ptr_flist() to define candidates, the function pointer prototypes are defined internally within STRIDE, rather than by the user.

Example

// function pointer typedef
typedef void (*FPtr) (int, char);
void foo(FPtr *pFPtr);
void foo1(FPtr *pFPtr);
void foo2(FPtr *pFPtr);
void foo3(FPtr *pFPtr);

// candidate prototypes
void C1(int x, char y);
void C2(int x, char y);
void C3(int x, char y);

// pragmatize candidate prototypes
#pragma scl_function(C1)
#pragma scl_function(C2)
#pragma scl_function(C3)