InParameter
vectordisplays; [¿ä¾à ¹× ÇÏÀ̶óÀÌÆÃ ¹æ½Ä ¼¼ÆÃ]¿¡¼ ¼³¸í unsigned int set_id; [¼Â¹øÈ£] unsigned int start_position; [½ÃÀÛÀ§Ä¡] unsigned int counter; [¹®¼°³¼ö] vector section_namelist; [°¡Á®¿Ã ¼½¼Ç(µé)]
OutParameter
vectordocuments; [¹®¼¸®½ºÆ®] long unsigned int service_time; [½ÇÇà½Ã°£]
Example
vector section_namelist; // °£·«º¸±â¿¡¼ Ãâ·ÂÇÒ ¼½¼Ç¸í
// ¿äûÀ» ó¸®ÇÒ Å¬·¡½º¸¦ »ý¼º
// »ý¼ºÀÚÀÇ ¸Å°³º¯¼ö·Î ó¸®ÇÒ DB ¼ºñ½ºÀÇ ÁÖ¼Ò¿Í Æ÷Æ®¹øÈ£¸¦ ÀÔ·Â
ClientLIB clientLib(SERVER_IP, SERVER_PORT);
Cparameter_t p_in, p_out; // ¸Å°³º¯¼ö Ŭ·¡½º ¼±¾ð
// °£·«º¸±â °á°ú Ãâ·Â :: 10°³ Ãâ·Â
unsigned int start_pos = 0; // ½ÃÀÛ ¹®¼ÀÇ offset
//section_namelist.push_back("TIK"); // Ãâ·ÂÇÒ ¼½¼Ç¸®½ºÆ®(Ãß°¡ ÁöÁ¤ °¡´É)
section_namelist.push_back(ALL_SECTIONS); // Ãâ·ÂÇÒ ¼½¼Ç¸®½ºÆ®(Àüü ¼½¼Ç)
p_in.set_id = 1; // ¼Â ½Äº°ÀÚ ÁöÁ¤
p_in.start_position = start_pos; // °¡Á®¿Ã ½ÃÀÛ À§Ä¡ ÁöÁ¤
p_in.counter = 10; // °¡Á®¿Ã ¹®¼ °³¼ö ÁöÁ¤
p_in.section_namelist = section_namelist; // Ãâ·ÂÇÒ ¼½¼Ç À̸§ ÁöÁ¤
// °Ë»ö °á°ú ¹®¼ °¡Á®¿À±â
RedirectStdoutInit(); // ¿äû ¼öÇà Áß¿¡ Ãâ·ÂµÇ´Â ¸Þ½ÃÁö ¸·À½...
ret_val = clientLib.Request("GET_DOCUMENTS_FROM_RESULT", p_in, p_out);
RedirectStdoutClose();
if (ret_val != 0) {
cout << "ERROR : " << p_out.errmsg << "(" << p_out.errcode << ")" << endl;
return -1;
}
// ¹®¼ Ãâ·Â
for (int i = 0; i < p_out.documents.size(); i++) {
cout << "[TableID:";
cout << p_out.documents[i].table_id;
cout << "] [DocID:";
cout << p_out.documents[i].document_id;
cout << "]" << endl;
for (int j = 0; j < p_out.documents[i].sections.size(); j++) {
cout << "\t";
cout << "[";
cout << UECONVCODE(p_out.documents[i].sections[j].section_name); // EUC-KR·Î º¯È¯ÇÏ¿© Ãâ·Â
cout << "]:";
cout << UECONVCODE(p_out.documents[i].sections[j].section_value);// EUC-KR·Î º¯È¯ÇÏ¿© Ãâ·Â
cout << endl;
}
}