test code
#include <cstddef>
class CIF {
};
template <typename OBJ>
class CList {
public:
OBJ * RemoveHeadAddTail() {
return NULL;
}
};
typedef CIF * (*FindFunc) (const char*, int, CIF*);
CIF * Find_f1(const char*, int, CIF*) {
return NULL;
}
CIF * Find_f2(const char*, int, CIF*){
return NULL;
}
CIF * Find_f3(const char*, int, CIF*){
return NULL;
}
CIF* demoFunc() {
CList<CIF> * pList = NULL;
CIF * pHead;
CIF * pIF;
CIF * pTmp;
FindFunc funcs[] = {Find_f1, Find_f2,Find_f3};
pHead = pList->RemoveHeadAddTail();
pTmp = pHead;
do {
for (int i = 0; i < (sizeof(funcs)/ sizeof(funcs[0])); i++)
{
pIF = funcs[i]("abc", 15, pTmp);
if (pIF)
{
return pIF;
}
}
pTmp = pList->RemoveHeadAddTail();
} while (pTmp != pHead);
return NULL;
}
int main(int ac, char**av){
demoFunc();
return 0;
}