Demonstrates how to traverse all relations in an OPC container using the API.
#ifdef WIN32
#include <crtdbg.h>
#endif
const xmlChar *prefix=NULL;
const xmlChar *type=NULL;
char buf[20]="";
if (-1!=counter) {
sprintf(buf, "%i", counter);
}
printf("%s %s%s %s %s\n", source, prefix, buf, target, type);
traverse(c, target);
}
}
}
int main( int argc, const char* argv[] )
{
#ifdef WIN32
_CrtSetDbgFlag (_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
if (NULL!=c) {
if (3==argc) {
const xmlChar *type=NULL;
printf("type=%s\n", type);
}
} else if (4==argc) {
const xmlChar *type=NULL;
printf("type=%s\n", type);
}
}
} else {
}
}
#ifdef WIN32
#endif
return 0;
}