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

Class CharSetContainer

src/jrd/intl.cpp:141–181  ·  view source on GitHub ↗

Classes and structures used internally to this file and intl implementation

Source from the content-addressed store, hash-verified

139
140// Classes and structures used internally to this file and intl implementation
141class CharSetContainer
142{
143public:
144 CharSetContainer(MemoryPool& p, USHORT cs_id, const SubtypeInfo* info);
145
146 void release(thread_db* tdbb)
147 {
148 for (FB_SIZE_T i = 0; i < charset_collations.getCount(); i++)
149 {
150 if (charset_collations[i])
151 charset_collations[i]->release(tdbb);
152 }
153 }
154
155 void destroy(thread_db* tdbb)
156 {
157 cs->destroy();
158 for (FB_SIZE_T i = 0; i < charset_collations.getCount(); i++)
159 {
160 if (charset_collations[i])
161 charset_collations[i]->destroy(tdbb);
162 }
163 }
164
165 CharSet* getCharSet() { return cs; }
166
167 Collation* lookupCollation(thread_db* tdbb, USHORT tt_id);
168 void unloadCollation(thread_db* tdbb, USHORT tt_id);
169
170 CsConvert lookupConverter(thread_db* tdbb, CHARSET_ID to_cs);
171
172 static CharSetContainer* lookupCharset(thread_db* tdbb, USHORT ttype);
173 static Lock* createCollationLock(thread_db* tdbb, USHORT ttype, void* object = NULL);
174
175private:
176 static bool lookupInternalCharSet(USHORT id, SubtypeInfo* info);
177
178private:
179 Firebird::Array<Collation*> charset_collations;
180 CharSet* cs;
181};
182
183
184CharSetContainer* CharSetContainer::lookupCharset(thread_db* tdbb, USHORT ttype)

Callers 1

lookupCharsetMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected