Returns the attribute members in the specified attribute dimension associated with the given base member where the association validity includes at least one of the tuples in the given perspective.
For each qualifying attribute member, the full validity set of its association to the base member can be optionally returned (by specifying a non-null value for pppValiditySets).
pphMembers and pppValiditySets will contain the array of member handles and array of validity set pointers, respectively.
The type of validity set desired is indicated using usValiditySetType.
Note that the perspective must specify discrete independent members individually.
If no perspective is specified, or if the perspective specifies a NULL set of independent members, the routine will consider all associations that exist for any combination of independent members. In this case, the returned validity sets may contain ranges for discrete independent members, and it is the responsibility of the client to split these accordingly.
Syntax
ESS_FUNC_M EssOtlVaryingGetAssociatedAttributes (hOutline, hBaseMember, hAttrDim, pPerspective, pusCount,
pphMembers, usValiditySetType, **pppValiditySets);
Parameter | Data Type | Description |
---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle |
hBaseMember | ESS_HMEMBER_T | Handle to the member of the base dimension |
hAttrDim | ESS_HMEMBER_T | Attribute member handle |
pPerspective | ESS_PERSPECTIVE_T | Pointer to the collection of independent members used when querying the client or server for associations |
pusCount | ESS_PUSHORT_T | Pointer to the number of varying attribute members returned |
pphMembers | ESS_PPHMEMBER_T | Pointer to the array of attribute member handles |
usValiditySetType | ESS_USHORT_T | Type of validity set assigned to independent members:
|
**pppValiditySets | ESS_VALIDITYSET_T | A collection of independent members for which an association is true |
Return Value
Returns 0 if successful.
Example
void DisplayVaryingAttributes(ESS_HOUTLINE_T hOutline, ESS_HMEMBER_T hBaseMbr, ESS_HMEMBER_T hAttrDim, ESS_PERSPECTIVE_T *pPerspective, ESS_USHORT_T usValiditySetType) { ESS_STS_T sts = ESS_STS_NOERR; ESS_USHORT_T Count, i, j, totalIndMbrs; ESS_PHMEMBER_T phAttrMbrs; ESS_PVALIDITYSET_T *ppValiditySets; ESS_PMBRINFO_T pMemberInfo1, pMemberInfo2; sts = EssOtlVaryingGetAssociatedAttributes(hOutline, hBaseMbr, hAttrDim, pPerspective, &Count, &phAttrMbrs, usValiditySetType, &ppValiditySets); printf("\nEssOtlVaryingGetAssociatedAttributes sts: %d", sts); if(!sts) { if(Count) { for (i = 0; i < Count ;++i) { sts = EssOtlGetMemberInfo(hOutline, phAttrMbrs[i], &pMemberInfo1); printf("\n\t%s", pMemberInfo1->szMember); EssOtlFreeStructure(hOutline, ESS_DT_STRUCT_MBRINFO, 1, pMemberInfo1); if(ppValiditySets[i]) { totalIndMbrs = (ESS_SHORT_T)(ppValiditySets[i]->countOfIndepRanges) * 4; printf("\n\t\tValidity Type: %d - ", ppValiditySets[i]->usValiditySetType); switch(ppValiditySets[i]->usValiditySetType) { case ESS_VALIDITYSET_TYPE_MBRHDLS: printf("Member Handles"); for(j = 0; j < totalIndMbrs; j++) { if(j >= 3) if(j%4 == 0) printf("\n"); sts = EssOtlGetMemberInfo(hOutline, ppValiditySets[i]->pIndepMbrs[j], &pMemberInfo2); printf("\n\t\tValidity independent member: %s", pMemberInfo2->szMember); EssOtlFreeStructure(hOutline, ESS_DT_STRUCT_MBRINFO, 1, pMemberInfo2); } break; case ESS_VALIDITYSET_TYPE_MBRNAMS: printf("Member Names"); for(j = 0; j < totalIndMbrs; j++) { if(j >= 3) if(j%4 == 0) printf("\n"); printf("\n\t\tValidity independent member: %s", ppValiditySets[i]->pIndepMbrs[j]); } break; default: printf("Unrecognized"); } printf("\n\t\tValidity count of Indep Dims: %d", ppValiditySets[i]->countOfIndepDims); printf("\n\t\tValidity count of Indep Ranges: %d", ppValiditySets[i]->countOfIndepRanges); printf("\n"); } EssFree(hInst, ppValiditySets[i]); } printf("\n"); } else printf("\n\tNo member returned.\n"); } printf("\n"); EssFree(hInst,ppValiditySets); }
See Also