체인에서 다음 구문 분석기 클래스가 소유하는 데이터의 인코딩(있는 경우)을 리턴하는 선택적 함수.
정의 대상 | 유형 | 구성원 |
CPI_VFT | 선택 사항 | iFpNextParserEncoding |
int cpiNextParserEncoding( CciParser* parser, CciContext* context);
데이터의 인코딩이 리턴됩니다. 값이 알려지지 않은 경우 0이 리턴되고 디폴트 인코딩이 적용됩니다.
다음 예는 샘플 구문 분석기 파일 BipSampPluginParser.c에서 발췌한 것입니다(794 - 813행).
int cpiNextParserEncoding( CciParser* parser, CciContext* context ){ PARSER_CONTEXT_ST* pc = (PARSER_CONTEXT_ST *)context ; int encoding = 0; if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: -> cpiNextParserEncoding() parser=0x%x context=0x%x\n", parser, context); fflush(pc->tracefile); } if (pc->trace) { fprintf(pc->tracefile, "PLUGIN: <- cpiNextParserEncoding()\n"); fflush(pc->tracefile); } return encoding; }