cniElementValue 그룹

이 함수는 지정된 구문 요소의 값을 검색합니다.

구문

CciSize cniElementBitArrayValue(
    int*                   returnCode,
    CciElement*            targetElement,
    const struct CciBitArray*   value);
CciBool cniElementBooleanValue(
    int*                   returnCode,
    CciElement*    targetElement);
CciSize cniElementByteArrayValue(
    int*                   returnCode,
    CciElement*            targetElement,
    const struct CciByteArray*  value);
CciSize cniElementCharacterValue(
    int*                   returnCode,
    CciElement*            targetElement,
    const CciChar*             value,
    CciSize        length);
struct CciDate cniElementDateValue(
    int*                   returnCode,
    CciElement*    targetElement);
CciSize cniElementDecimalValue(
    int*                   returnCode,
    CciElement*            targetElement,
    const CciChar*             value,
    CciSize        length);
struct CciTimestamp cniElementGmtTimestampValue(
    int*                   returnCode,
    CciElement*    targetElement);
struct CciTime cniElementGmtTimeValue(
    int*                   returnCode,
    CciElement*    targetElement);
CciInt cniElementIntegerValue(
    int*                   returnCode,
    CciElement*    targetElement);
CciReal cniElementRealValue(
    int*                   returnCode,
    CciElement*    targetElement);
struct CciTimestamp cniElementTimestampValue(
    int*                   returnCode,
    CciElement*    targetElement);
struct CciTime cniElementTimeValue(
    int*                   returnCode,
    CciElement*    targetElement);

매개변수

returnCode
함수의 리턴 코드(출력).
가능한 리턴 코드는 다음과 같습니다.
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_ELEMENT_OBJECT
  • CCI_INV_DATA_POINTER
  • CCI_INV_DATA_BUFLEN
  • CCI_INV_BUFFER_TOO_SMALL
targetElement
대상 구문 요소 오브젝트의 주소(입력).
value
구문 요소 값이 저장될 출력 버퍼 주소(입력). 관련 함수 호출에만 사용됩니다.
length
value 매개변수에 지정된 문자 관련 함수 호출에만 사용됩니다.

리턴 값

  • 함수가 정상적으로 실행되면, 대상 요소 값이 리턴됩니다.
  • 요소의 데이터 크기가 달라질 수 있는 경우, 올바른 데이터 크기가 리턴됩니다.
  • 지정된 길이가 너무 적은 경우, 오류 코드는 CCI_BUFFER_TOO_SMALL로 설정됩니다.
  • 오류가 발생할 경우, returnCode 매개변수는 오류의 이유를 표시합니다.

     numberOfChars     = cniElementCharacterValue(
		&rc, firstChild, (CciChar*)&elementValue, sizeof(elementValue)
		 		 );

if (rc==CCI_BUFFER_TOO_SMALL) {
        free(elementValue);
        elementValue      = (CciChar*)malloc(numberOfChars * sizeof(CciChar));
        numberOfChars     = cniElementCharacterValue(
                                    &rc, firstChild, (CciChar*)&elementValue, sizeof(elementValue));
  }
주의사항 | 등록상표 | 다운로드 | 라이브러리 | 지원 | 피드백
Copyright IBM Corporation 1999, 2006 마지막 갱신 날짜: 2006/08/21
as07910_