MCPcopy Index your code
hub / github.com/MapServer/MapServer / msSLDGetAttributeNameOrValue

Function msSLDGetAttributeNameOrValue

mapogcsld.c:4745–5017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4743
4744
4745char *msSLDGetAttributeNameOrValue(char *pszExpression,
4746 char *pszComparionValue,
4747 int bReturnName)
4748{
4749 char **aszValues = NULL;
4750 char *pszAttributeName = NULL;
4751 char *pszAttributeValue = NULL;
4752 char cCompare = '=';
4753 char szCompare[3] = {0};
4754 char szCompare2[3] = {0};
4755 int bOneCharCompare = -1, nTokens = 0, nLength =0;
4756 int iValue=0, i=0, iValueIndex =0;
4757 int bStartCopy=0, iAtt=0;
4758 char *pszFinalAttributeName=NULL, *pszFinalAttributeValue=NULL;
4759 int bSingleQuote = 0, bDoubleQuote = 0;
4760
4761 if (!pszExpression || !pszComparionValue || strlen(pszExpression) <=0)
4762 return NULL;
4763
4764 szCompare[0] = '\0';
4765 szCompare2[0] = '\0';
4766
4767
4768 if (strcasecmp(pszComparionValue, "PropertyIsEqualTo") == 0)
4769 {
4770 cCompare = '=';
4771 szCompare[0] = 'e';
4772 szCompare[1] = 'q';
4773 szCompare[2] = '\0';
4774
4775 bOneCharCompare =1;
4776 }
4777 if (strcasecmp(pszComparionValue, "PropertyIsNotEqualTo") == 0)
4778 {
4779 szCompare[0] = 'n';
4780 szCompare[1] = 'e';
4781 szCompare[2] = '\0';
4782
4783 szCompare2[0] = '!';
4784 szCompare2[1] = '=';
4785 szCompare2[2] = '\0';
4786
4787 bOneCharCompare =0;
4788 }
4789 else if (strcasecmp(pszComparionValue, "PropertyIsLike") == 0)
4790 {
4791 szCompare[0] = '=';
4792 szCompare[1] = '~';
4793 szCompare[2] = '\0';
4794
4795 szCompare2[0] = '~';
4796 szCompare2[1] = '*';
4797 szCompare2[2] = '\0';
4798
4799 bOneCharCompare =0;
4800 }
4801 else if (strcasecmp(pszComparionValue, "PropertyIsLessThan") == 0)
4802 {

Callers 2

msSLDGetAttributeNameFunction · 0.85
msSLDGetAttributeValueFunction · 0.85

Calls 6

strcasecmpFunction · 0.85
msStringSplitFunction · 0.85
msStrdupFunction · 0.85
msFreeCharArrayFunction · 0.85
msStringTrimBlanksFunction · 0.85
msReplaceSubstringFunction · 0.85

Tested by

no test coverage detected