MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / generateSpecificAttributes

Method generateSpecificAttributes

src/common/IntlUtil.cpp:87–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87string IntlUtil::generateSpecificAttributes(Jrd::CharSet* cs, SpecificAttributesMap& map)
88{
89 SpecificAttributesMap::Accessor accessor(&map);
90
91 bool found = accessor.getFirst();
92 string s;
93
94 while (found)
95 {
96 UCHAR c[sizeof(ULONG)];
97 ULONG size;
98
99 SpecificAttribute* attribute = accessor.current();
100
101 s += escapeAttribute(cs, attribute->first);
102
103 const USHORT equalChar = '=';
104
105 size = cs->getConvFromUnicode().convert(
106 sizeof(equalChar), (const UCHAR*) &equalChar, sizeof(c), c);
107
108 s.append((const char*) &c, size);
109
110 s += escapeAttribute(cs, attribute->second);
111
112 found = accessor.getNext();
113
114 if (found)
115 {
116 const USHORT semiColonChar = ';';
117 size = cs->getConvFromUnicode().convert(
118 sizeof(semiColonChar), (const UCHAR*) &semiColonChar, sizeof(c), c);
119
120 s.append((const char*) &c, size);
121 }
122 }
123
124 return s;
125}
126
127
128bool IntlUtil::parseSpecificAttributes(Jrd::CharSet* cs, ULONG len, const UCHAR* s,

Callers

nothing calls this directly

Calls 6

getConvFromUnicodeMethod · 0.80
getFirstMethod · 0.45
currentMethod · 0.45
convertMethod · 0.45
appendMethod · 0.45
getNextMethod · 0.45

Tested by

no test coverage detected