Returns the independent dimensions, if any, for the given attribute member.
Syntax
ESS_FUNC_M EssOtlVaryingGetAttributeIndepDims (hOutline, hAttrMember, *pCountOfIndepDims, **ppIndepDims, **ppucIndependentTypes);| Parameter | Data Type | Description |
|---|---|---|
hOutline | ESS_HOUTLINE_T | Outline context handle |
hAttrMember | ESS_HMEMBER_T | Attribute member handle |
*pCountOfIndepDims | ESS_INT32_T | Pointer to the number of independent dimensions that control the varying attributes |
**ppIndepDims | ESS_HMEMBER_T | Pointer to an array of member handles for the independent dimensions |
**ppucIndependentTypes | ESS_UCHAR_T | Pointer to an array of independent types contained in *pIndepDims |
Notes
An independent dimension is a dimension the values of which identify where the attribute associations may change. Independent dimensions are selected when attribute dimensions are associated with a base dimension. VaryingGetAttributeIndepDims returns a list of independent dimensions associated with the dimension of the specified attribute.
Return Value
Returns 0 if successful.
Example
void TestEssOtlVaryingGetAttributeIndepDims()
{
ESS_STS_T sts = ESS_STS_NOERR;
ESS_HOUTLINE_T hOutline = ESS_NULL;
ESS_OBJDEF_T Object;
ESS_STR_T attrMbr, attrDim, baseMbr, baseDim;
ESS_USHORT_T i;
ESS_HMEMBER_T hAttrMbr;
ESS_HMEMBER_T hAttrDim;
ESS_HMEMBER_T hBaseMbr;
ESS_HMEMBER_T hBaseDim;
ESS_INT32_T pCountOfIndepDims;
ESS_HMEMBER_T *ppIndepDims;
ESS_PMBRINFO_T pMemberInfo;
ESS_UCHAR_T *pucIndependentTypes;
memset(&Object, '\0', sizeof(Object));
Object.hCtx = hCtx;
Object.ObjType = ESS_OBJTYPE_OUTLINE;
Object.AppName = szAppName;
Object.DbName = szDbName;
Object.FileName = szDbName;
printf("\n");
sts = EssOtlOpenOutline(hCtx, &Object, ESS_TRUE, ESS_TRUE, &hOutline);
printf("EssOtlOpenOutline sts: %ld\n",sts);
printf("\nGet handles of members for tests:\n");
attrMbr = "Contractor";
sts = EssOtlFindMember(hOutline, attrMbr, &hAttrMbr);
printf("EssOtlFindMember sts: %d\n", sts);
attrDim = "Type";
sts = EssOtlFindMember(hOutline, attrDim, &hAttrDim);
printf("EssOtlFindMember sts: %d\n", sts);
baseMbr = "Doe,Jane";
sts = EssOtlFindMember(hOutline, baseMbr, &hBaseMbr);
printf("EssOtlFindMember sts: %d\n", sts);
baseDim = "Entities";
sts = EssOtlFindMember(hOutline, baseDim, &hBaseDim);
printf("EssOtlFindMember sts: %d\n", sts);
/* Valid case with a valid attribute member handle. */
printf("\nValid case with a valid attribute member handle:\n");
sts = EssOtlVaryingGetAttributeIndepDims(hOutline, hAttrMbr, &pCountOfIndepDims, &ppIndepDims, &pucIndependentTypes);
printf("EssOtlVaryingGetAttributeIndepDims sts: %d\n", sts);
if(pCountOfIndepDims)
{
printf("Independent dimension(s) for attribute member %s:", attrMbr);
for (i = 0; i < pCountOfIndepDims; i++)
{
sts = EssOtlGetMemberInfo(hOutline, ppIndepDims[i], &pMemberInfo);
printf("\n\t%s", pMemberInfo->szMember);
switch(pucIndependentTypes[i])
{
case ESS_ASSOCIATE_TYPE_CONTINUOUS:
printf(" - (Continuous)");
break;
case ESS_ASSOCIATE_TYPE_DISCRETE:
printf(" - (Discrete)");
break;
}
}
printf("\n");
}
else
printf("\tAttribute member %s has no independent dimension.\n", attrMbr);
sts = EssUnlockObject(hCtx, ESS_OBJTYPE_OUTLINE, Object.AppName, Object.DbName, Object.FileName);
printf("\nEssUnlockObject sts: %d\n", sts);
sts = EssOtlCloseOutline(hOutline);
printf("EssOtlCloseOutline sts: %d\n",sts);
}See Also