33 lines
524 B
C++
33 lines
524 B
C++
|
|
#include "interface.h"
|
|
#include "string.h"
|
|
#include "QDebug"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InterFace *interFaceFind(const char *name)
|
|
{
|
|
extern const int __start_ifdef;
|
|
extern const int __stop_ifdef;
|
|
if_def *start=(if_def *)&__start_ifdef;
|
|
if_def *end=(if_def *)&__stop_ifdef;
|
|
if_def *item = 0;
|
|
for (item=start;item<end;item++)
|
|
{
|
|
if (item != nullptr)
|
|
{
|
|
if (strcmp(name, item->name) == 0)
|
|
return item->if_get_fun();
|
|
}
|
|
}
|
|
qWarning("can not find interface named '%s'", name);
|
|
return nullptr;
|
|
}
|
|
|
|
|
|
|
|
|