# EssCheckAttributes

Description

EssCheckAttributes() returns attribute information for each specified member.

Syntax

ESS_FUNC_M EssCheckAttributes (hCtx, Count, pMemberNameArray, ppAttributeTypeArray);

ESS_HCTX_T | hCtx;
ESS_USHORT_T | Count;
ESS_PMBRNAME_T | pMemberNameArray;
ESS_PPUSHORT_T | ppAttributeTypeArray;

Parameters

hCtx | Context handle
Count | Number of given dimensions and members
pMemberNameArray | An array of names of given dimensions and members
ppAttributeTypeArray | One of the following constant identifiers for the attribute type array: ESS_ATTRIBUTE_DIMENSION ESS_ATTRIBUTE_MEMBER ESS_STANDARD_DIMENSION ESS_STANDARD_MEMBER ESS_BASE_DIMENSION ESS_BASE_MEMBER ESS_ATTRIBUTED_MEMBER ESS_INVALID_MEMBER

Return Value

Notes

Access

This function requires no special privileges.

Example

    void  ESS_CheckAttributes()
    {
       ESS_STS_T       sts=-1,sts1=-1;
       int             counter,i,j;
       ESS_PMBRNAME_T  pMbrNames=ESS_NULL;
       ESS_PUSHORT_T   pMbrAttrTypes=ESS_NULL;
       ESS_CHAR_T      buf[80]="";

       /* counter = 4; */
       printf("Please enter the number of member names that follow: ");
       gets(buf);
       counter=atoi(buf);

       if (counter)
       {
            sts1 = EssAlloc(hInst, (counter * sizeof(ESS_MBRNAME_T)),(ESS_PPVOID_T)&pMbrNames);
          if (!sts1)
          {
             memset(pMbrNames, 0, (counter * sizeof(ESS_MBRNAME_T)));

             for (i = 0; i < counter; i++)
             {
                printf("Enter member name: ");
                gets(buf);
                strcpy(pMbrNames[i],buf);
             }

             sts = EssCheckAttributes(hCtx,counter,pMbrNames,&pMbrAttrTypes);
             if (sts)
                fprintf(stderr, "sts = %ld \n",sts);
             else if (pMbrAttrTypes)
             {
                for (j = 0; j < counter; j++)
                {
                   switch(pMbrAttrTypes[j])
                   {
                      case ESS_STANDARD_MEMBER:
                         strcpy(buf,"ESS_STANDARD_MEMBER");
                         break;

                      case ESS_STANDARD_DIMENSION:
                         strcpy(buf,"ESS_STANDARD_DIMENSION");
                         break;

                      case ESS_BASE_MEMBER:
                         strcpy(buf,"ESS_BASE_MEMBER");
                         break;

                      case ESS_BASE_DIMENSION:
                         strcpy(buf,"ESS_BASE_DIMENSION");
                         break;

                      case ESS_ATTRIBUTE_MEMBER:
                         strcpy(buf,"ESS_ATTRIBUTE_MEMBER");
                         break;

                      case ESS_ATTRIBUTE_DIMENSION:
                         strcpy(buf,"ESS_ATTRIBUTE_DIMENSION");
                         break;

                      case ESS_ATTRIBUTED_MEMBER:
                         strcpy(buf,"ESS_ATTRIBUTED_MEMBER");
                         break;

                      default:
                         strcpy(buf,"Unknown attribute type");
                   }
                   printf("%s is of type %s\n",pMbrNames[j],buf);
                }
                printf("\n");
             }
          }
       }
    }

See Also

EssFreeStructure()
EssGetAssociatedAttributesInfo()
EssGetAttributeInfo()
EssGetAttributeSpecifications()
EssOtlAssociateAttributeDimension()
EssOtlAssociateAttributeMember()
EssOtlDisassociateAttributeDimension()
EssOtlDisassociateAttributeMember()
EssOtlFindAttributeMembers()
EssOtlFreeStructure()
EssOtlGetAssociatedAttributes()
EssOtlGetAttributeInfo()
EssOtlGetAttributeSpecifications()
EssOtlQueryAttributes()
EssOtlSetAttributeSpecifications()