25 #include <osl/endian.h>
26 #include <rtl/string.hxx>
27 #include <rtl/ustring.hxx>
39 OString toByteString(rtl_uString
const * str) {
41 str->buffer, str->length, RTL_TEXTENCODING_UTF8,
42 OUSTRING_TO_OSTRING_CVTFLAGS);
49 #define BLOP_OFFSET_MAGIC 0
50 #define BLOP_OFFSET_SIZE (BLOP_OFFSET_MAGIC + sizeof(sal_uInt32))
51 #define BLOP_OFFSET_MINOR (BLOP_OFFSET_SIZE + sizeof(sal_uInt32))
52 #define BLOP_OFFSET_MAJOR (BLOP_OFFSET_MINOR + sizeof(sal_uInt16))
53 #define BLOP_OFFSET_N_ENTRIES (BLOP_OFFSET_MAJOR + sizeof(sal_uInt16))
54 #define BLOP_HEADER_N_ENTRIES 6
56 #define BLOP_FIELD_N_ENTRIES 6
58 #define BLOP_METHOD_N_ENTRIES 5
60 #define BLOP_PARAM_N_ENTRIES 3
62 #define BLOP_REFERENCE_N_ENTRIES 4
66 if (!wstring)
return 0;
70 while (b[0] || b[1]) b +=
sizeof(sal_uInt16);
72 return ((b - wstring) /
sizeof(sal_uInt16));
77 sal_uInt32 len = rtl_ustr_getLength(v) + 1;
81 for (i = 0; i < len; i++)
83 buff +=
writeUINT16(buff, static_cast<sal_uInt16>(v[i]));
86 return (buff - buffer);
100 for (i = 0; i < (len - 1); i++)
111 return (buff - buffer);
124 #ifdef REGTYPE_IEEE_NATIVE
130 return sizeof(sal_uInt32);
147 #ifdef REGTYPE_IEEE_NATIVE
148 # ifdef OSL_BIGENDIAN
159 return (
sizeof(sal_uInt32) +
sizeof(sal_uInt32));
184 struct CPInfo* m_next;
188 CPInfo(
CPInfoTag tag,
struct CPInfo* prev);
195 CPInfo::CPInfo(
CPInfoTag tag,
struct CPInfo* prev)
209 sal_uInt32
size =
sizeof(sal_uInt32) +
sizeof(sal_uInt16) ;
220 size +=
sizeof(sal_Int16);
223 size +=
sizeof(sal_uInt16);
226 size +=
sizeof(sal_Int32);
229 size +=
sizeof(sal_uInt32);
232 size +=
sizeof(sal_Int64);
235 size +=
sizeof(sal_uInt64);
238 size +=
sizeof(sal_uInt32);
241 size +=
sizeof(sal_uInt32) +
sizeof(sal_uInt32);
244 size += (rtl_ustr_getLength(
m_value.aConst.aString) + 1) *
sizeof(sal_uInt16);
247 size += strlen(
m_value.aUtf8) + 1;
250 size +=
sizeof(sal_uInt32) +
sizeof(sal_uInt16) +
sizeof(sal_uInt16) +
sizeof(sal_uInt32) +
sizeof(sal_uInt32);
260 sal_uInt32 CPInfo::toBlop(
sal_uInt8* buffer)
265 buff +=
writeUINT16(buff, static_cast<sal_uInt16>(m_tag));
274 buff, static_cast< sal_uInt8 >(
m_value.aConst.aByte));
317 return (buff - buffer);
343 void setData(
const OString& name,
344 const OString& typeName,
346 const OString& fileName,
359 FieldEntry::~FieldEntry()
363 m_constValue.aString &&
367 delete[] m_constValue.aString;
371 void FieldEntry::setData(
const OString& name,
372 const OString& typeName,
374 const OString& fileName,
379 std::unique_ptr<sal_Unicode[]> newValue;
381 sal_Int32
n = rtl_ustr_getLength(constValue.
aString) + 1;
387 m_typeName = typeName;
389 m_fileName = fileName;
393 m_constValue.aString &&
397 delete[] m_constValue.aString;
401 m_constValueType = constValueType;
405 if (constValue.
aString ==
nullptr)
409 m_constValue.aString = newValue.release();
414 m_constValue = constValue;
434 void setData(
const OString& typeName,
439 ParamEntry::ParamEntry()
444 void ParamEntry::setData(
const OString& typeName,
449 m_typeName = typeName;
470 void setData(
const OString& name,
476 ReferenceEntry::ReferenceEntry()
482 void ReferenceEntry::setData(
const OString& name,
504 OString m_returnTypeName;
506 sal_uInt16 m_paramCount;
507 std::unique_ptr<ParamEntry[]> m_params;
508 sal_uInt16 m_excCount;
509 std::unique_ptr<OString[]> m_excNames;
514 void setData(
const OString& name,
515 const OString& returnTypeName,
517 sal_uInt16 paramCount,
519 const OString& doku);
521 void setExcName(sal_uInt16 excIndex,
const OString& name)
const;
525 void reallocParams(sal_uInt16 size);
526 void reallocExcs(sal_uInt16 size);
529 MethodEntry::MethodEntry()
536 void MethodEntry::setData(
const OString& name,
537 const OString& returnTypeName,
539 sal_uInt16 paramCount,
544 m_returnTypeName = returnTypeName;
549 reallocParams(paramCount);
550 reallocExcs(excCount);
553 void MethodEntry::setExcName(sal_uInt16 excIndex,
const OString& name)
const
555 if (excIndex < m_excCount)
557 m_excNames[excIndex] = name;
561 void MethodEntry::reallocParams(sal_uInt16 size)
563 ParamEntry* newParams;
566 newParams =
new ParamEntry[size];
573 sal_uInt16 mn = std::min(size, m_paramCount);
575 for (i = 0; i < mn; i++)
577 newParams[i].setData(m_params[i].m_typeName, m_params[i].m_name, m_params[i].m_mode);
584 m_params.reset( newParams );
587 void MethodEntry::reallocExcs(sal_uInt16 size)
589 OString* newExcNames;
592 newExcNames =
new OString[size];
594 newExcNames =
nullptr;
597 sal_uInt16 mn = std::min(size, m_excCount);
599 for (i = 0; i < mn; i++)
601 newExcNames[i] = m_excNames[i];
605 m_excNames.reset( newExcNames );
624 sal_uInt16 m_nSuperTypes;
625 std::unique_ptr<OString[]>
629 sal_uInt16 m_fieldCount;
631 sal_uInt16 m_methodCount;
632 MethodEntry* m_methods;
633 sal_uInt16 m_referenceCount;
634 ReferenceEntry* m_references;
636 std::unique_ptr<sal_uInt8[]> m_blop;
637 sal_uInt32 m_blopSize;
640 OString
const & documentation,
641 OString
const & fileName,
644 const OString& typeName,
645 sal_uInt16 superTypeCount,
646 sal_uInt16 FieldCount,
647 sal_uInt16 methodCount,
648 sal_uInt16 referenceCount);
652 void setSuperType(sal_uInt16 index, OString
const & name)
const;
658 OString
const & documentation,
659 OString
const & fileName,
662 const OString& typeName,
663 sal_uInt16 superTypeCount,
664 sal_uInt16 fieldCount,
665 sal_uInt16 methodCount,
666 sal_uInt16 referenceCount)
670 static_cast< enum RTTypeClass >(
671 RTTypeClass | (published ? RT_TYPE_PUBLISHED : 0)))
672 , m_typeName(typeName)
673 , m_nSuperTypes(superTypeCount)
674 , m_doku(documentation)
675 , m_fileName(fileName)
676 , m_fieldCount(fieldCount)
678 , m_methodCount(methodCount)
680 , m_referenceCount(referenceCount)
681 , m_references(nullptr)
684 if (m_nSuperTypes > 0)
686 m_superTypeNames.reset(
new OString[m_nSuperTypes] );
693 m_methods =
new MethodEntry[methodCount];
695 if (m_referenceCount)
696 m_references =
new ReferenceEntry[referenceCount];
699 TypeWriter::~TypeWriter()
707 if (m_referenceCount)
708 delete[] m_references;
711 void TypeWriter::setSuperType(sal_uInt16 index, OString
const & name)
const
713 m_superTypeNames[index] = name;
716 void TypeWriter::createBlop()
720 std::unique_ptr<sal_uInt8[]> pBlopFields;
721 std::unique_ptr<sal_uInt8[]> pBlopMethods;
722 std::unique_ptr<sal_uInt8[]> pBlopReferences;
724 sal_uInt32 blopFieldsSize = 0;
725 sal_uInt32 blopMethodsSize = 0;
726 sal_uInt32 blopReferenceSize = 0;
729 sal_uInt16 cpIndexThisName = 0;
730 std::unique_ptr<sal_uInt16[]> cpIndexSuperNames;
731 sal_uInt16 cpIndexDoku = 0;
732 sal_uInt16 cpIndexFileName = 0;
733 CPInfo* pInfo =
nullptr;
735 sal_uInt16 entrySize =
sizeof(sal_uInt16);
742 sal_uInt32 blopSize = blopHeaderEntrySize;
746 pInfo->m_value.aUtf8 = m_typeName.getStr();
747 cpIndexThisName = pInfo->m_index;
750 blopSize += entrySize;
755 blopSize += m_nSuperTypes * entrySize;
757 cpIndexSuperNames.reset(
new sal_uInt16[m_nSuperTypes]);
759 for (sal_uInt32 i=0; i < m_nSuperTypes; i++)
762 pInfo->m_value.aUtf8 = m_superTypeNames[i].getStr();
763 cpIndexSuperNames[i] = pInfo->m_index;
768 if (!m_doku.isEmpty())
771 pInfo->m_value.aUtf8 = m_doku.getStr();
772 cpIndexDoku = pInfo->m_index;
776 if (!m_fileName.isEmpty())
779 pInfo->m_value.aUtf8 = m_fileName.getStr();
780 cpIndexFileName = pInfo->m_index;
784 blopSize +=
sizeof(sal_uInt16);
788 sal_uInt16 cpIndexName = 0;
789 sal_uInt16 cpIndexTypeName = 0;
790 sal_uInt16 cpIndexValue = 0;
791 sal_uInt16 cpIndexDoku2 = 0;
792 sal_uInt16 cpIndexFileName2 = 0;
795 blopFieldsSize =
sizeof(sal_uInt16) + (m_fieldCount * blopFieldEntrySize);
797 blopSize += blopFieldsSize;
799 pBlopFields.reset(
new sal_uInt8[blopFieldsSize]);
800 pBuffer = pBlopFields.get();
804 for (sal_uInt16 i = 0; i < m_fieldCount; i++)
810 cpIndexFileName2 = 0;
812 pBuffer +=
writeUINT16(pBuffer, static_cast<sal_uInt16>(m_fields[i].m_access));
814 if (!m_fields[i].
m_name.isEmpty())
817 pInfo->m_value.aUtf8 = m_fields[i].m_name.getStr();
818 cpIndexName = pInfo->m_index;
822 if (!m_fields[i].m_typeName.isEmpty())
825 pInfo->m_value.aUtf8 = m_fields[i].m_typeName.getStr();
826 cpIndexTypeName = pInfo->m_index;
832 pInfo =
new CPInfo(static_cast<CPInfoTag>(m_fields[i].m_constValueType), pInfo);
833 pInfo->m_value.aConst = m_fields[i].m_constValue;
834 cpIndexValue = pInfo->m_index;
838 if (!m_fields[i].m_doku.isEmpty())
841 pInfo->m_value.aUtf8 = m_fields[i].m_doku.getStr();
842 cpIndexDoku2 = pInfo->m_index;
846 if (!m_fields[i].m_fileName.isEmpty())
849 pInfo->m_value.aUtf8 = m_fields[i].m_fileName.getStr();
850 cpIndexFileName2 = pInfo->m_index;
857 blopSize +=
sizeof(sal_uInt16);
861 std::unique_ptr<sal_uInt16[]> pMethodEntrySize(
new sal_uInt16[m_methodCount] );
862 sal_uInt16 cpIndexName = 0;
863 sal_uInt16 cpIndexReturn = 0;
864 sal_uInt16 cpIndexDoku2 = 0;
867 blopMethodsSize = (2 *
sizeof(sal_uInt16));
869 for (sal_uInt16 i = 0; i < m_methodCount; i++)
871 pMethodEntrySize[i] =
static_cast<sal_uInt16
>( blopMethodEntrySize +
873 (m_methods[i].m_paramCount * blopParamEntrySize) +
875 (m_methods[i].m_excCount *
sizeof(sal_uInt16)) );
877 blopMethodsSize += pMethodEntrySize[i];
880 pBlopMethods.reset(
new sal_uInt8[blopMethodsSize]);
882 blopSize += blopMethodsSize;
884 pBuffer = pBlopMethods.get();
889 for (sal_uInt16 i = 0; i < m_methodCount; i++)
894 pBuffer +=
writeUINT16(pBuffer, pMethodEntrySize[i]);
897 sal::static_int_cast< sal_uInt16 >(m_methods[i].m_mode));
899 if (!m_methods[i].
m_name.isEmpty())
902 pInfo->m_value.aUtf8 = m_methods[i].m_name.getStr();
903 cpIndexName = pInfo->m_index;
908 if (!m_methods[i].m_returnTypeName.isEmpty())
911 pInfo->m_value.aUtf8 = m_methods[i].m_returnTypeName.getStr();
912 cpIndexReturn = pInfo->m_index;
916 if (!m_methods[i].m_doku.isEmpty())
919 pInfo->m_value.aUtf8 = m_methods[i].m_doku.getStr();
920 cpIndexDoku2 = pInfo->m_index;
926 pBuffer +=
writeUINT16(pBuffer, m_methods[i].m_paramCount);
928 for (j = 0; j < m_methods[i].m_paramCount; j++)
930 if (!m_methods[i].m_params[j].m_typeName.isEmpty())
933 pInfo->m_value.aUtf8 = m_methods[i].m_params[j].m_typeName.getStr();
934 cpIndexName = pInfo->m_index;
941 sal::static_int_cast< sal_uInt16 >(
942 m_methods[i].m_params[j].m_mode));
944 if (!m_methods[i].m_params[j].
m_name.isEmpty())
947 pInfo->m_value.aUtf8 = m_methods[i].m_params[j].m_name.getStr();
948 cpIndexName = pInfo->m_index;
954 pBuffer +=
writeUINT16(pBuffer, m_methods[i].m_excCount);
956 for (j = 0; j < m_methods[i].m_excCount; j++)
958 if (!m_methods[i].m_excNames[j].isEmpty())
961 pInfo->m_value.aUtf8 = m_methods[i].m_excNames[j].getStr();
962 cpIndexName = pInfo->m_index;
971 blopSize += entrySize;
973 if (m_referenceCount)
975 sal_uInt16 cpIndexName = 0;
976 sal_uInt16 cpIndexDoku2 = 0;
979 blopReferenceSize = entrySize + (m_referenceCount * blopReferenceEntrySize);
981 blopSize += blopReferenceSize;
983 pBlopReferences.reset(
new sal_uInt8[blopReferenceSize]);
984 pBuffer = pBlopReferences.get();
988 for (sal_uInt16 i = 0; i < m_referenceCount; i++)
992 sal::static_int_cast< sal_uInt16 >(m_references[i].m_type));
997 if (!m_references[i].
m_name.isEmpty())
1000 pInfo->m_value.aUtf8 = m_references[i].m_name.getStr();
1001 cpIndexName = pInfo->m_index;
1005 if (!m_references[i].m_doku.isEmpty())
1008 pInfo->m_value.aUtf8 = m_references[i].m_doku.getStr();
1009 cpIndexDoku2 = pInfo->m_index;
1013 pBuffer +=
writeUINT16(pBuffer, static_cast<sal_uInt16>(m_references[i].m_access));
1019 pInfo = root.m_next;
1020 sal_uInt32 cpBlopSize = 0;
1021 sal_uInt16 cpCount = 0;
1025 cpBlopSize += pInfo->getBlopSize();
1027 pInfo = pInfo->m_next;
1030 blopSize += cpBlopSize;
1031 blopSize +=
sizeof(sal_uInt16);
1047 pBuffer +=
writeUINT16(pBuffer, static_cast<sal_uInt16>(m_typeClass));
1057 for (sal_uInt32 i=0; i < m_nSuperTypes; i++)
1059 pBuffer +=
writeUINT16(pBuffer, cpIndexSuperNames[i]);
1061 cpIndexSuperNames.reset();
1067 pInfo = root.m_next;
1071 CPInfo* pNextInfo = pInfo->m_next;
1073 pBuffer += pInfo->toBlop(pBuffer);
1079 auto writeList = [&pBuffer](
1084 memcpy(pBuffer, data, size);
1090 writeList(m_fieldCount, pBlopFields.get(), blopFieldsSize);
1093 writeList(m_methodCount, pBlopMethods.get(), blopMethodsSize);
1096 writeList(m_referenceCount, pBlopReferences.get(), blopReferenceSize);
1098 m_blop.reset( blop );
1099 m_blopSize = blopSize;
1114 TypeWriter* pEntry =
static_cast<TypeWriter*
>(hEntry);
1116 if (pEntry !=
nullptr)
1118 if (--pEntry->m_refCount == 0)
1124 void * handle, sal_uInt16 index, rtl_uString
const * documentation,
1125 rtl_uString
const * fileName,
RTFieldAccess flags, rtl_uString
const * name,
1126 rtl_uString
const * typeName,
RTValueType valueType,
1131 static_cast< TypeWriter *
>(handle)->m_fields[
index].setData(
1132 toByteString(name), toByteString(typeName),
1133 toByteString(documentation), toByteString(fileName), flags,
1134 valueType, valueValue);
1135 }
catch (std::bad_alloc &) {
1143 rtl_uString
const * name,
1144 rtl_uString
const * typeName,
1145 rtl_uString
const * doku,
1146 rtl_uString
const * fileName,
1152 hEntry, index, doku, fileName, access, name, typeName, valueType,
1157 void * handle, sal_uInt16 index, rtl_uString
const * documentation,
1159 rtl_uString
const * returnTypeName, sal_uInt16 parameterCount,
1160 sal_uInt16 exceptionCount)
1164 static_cast< TypeWriter *
>(handle)->m_methods[
index].setData(
1165 toByteString(name), toByteString(returnTypeName), flags,
1166 parameterCount, exceptionCount, toByteString(documentation));
1167 }
catch (std::bad_alloc &) {
1174 void const * handle, sal_uInt16 methodIndex, sal_uInt16 parameterIndex,
1175 RTParamMode flags, rtl_uString
const * name, rtl_uString
const * typeName)
1179 static_cast< TypeWriter
const *
>(handle)->
1180 m_methods[methodIndex].m_params[parameterIndex].setData(
1181 toByteString(typeName), toByteString(name), flags);
1182 }
catch (std::bad_alloc &) {
1189 void const * handle, sal_uInt16 methodIndex, sal_uInt16 exceptionIndex,
1190 rtl_uString
const * typeName)
1194 static_cast< TypeWriter
const *
>(handle)->m_methods[methodIndex].setExcName(
1195 exceptionIndex, toByteString(typeName));
1196 }
catch (std::bad_alloc &) {
1205 TypeWriter * writer =
static_cast< TypeWriter *
>(handle);
1206 if (!writer->m_blop) {
1208 writer->createBlop();
1209 }
catch (std::bad_alloc &) {
1213 *size = writer->m_blopSize;
1214 return writer->m_blop.get();
1220 return static_cast< sal_uInt8 const *
>(
1232 void * handle, sal_uInt16 index, rtl_uString
const * documentation,
1237 static_cast< TypeWriter *
>(handle)->m_references[
index].setData(
1238 toByteString(typeName), sort, toByteString(documentation), flags);
1239 }
catch (std::bad_alloc &) {
1247 rtl_uString
const * fileName, RTTypeClass typeClass,
sal_Bool published,
1248 rtl_uString
const * typeName, sal_uInt16 superTypeCount,
1249 sal_uInt16 fieldCount, sal_uInt16 methodCount, sal_uInt16 referenceCount)
1253 return new TypeWriter(
1254 version, toByteString(documentation), toByteString(fileName),
1255 typeClass, published, toByteString(typeName), superTypeCount,
1256 fieldCount, methodCount, referenceCount);
1257 }
catch (std::bad_alloc &) {
1263 delete static_cast< TypeWriter *
>(handle);
1267 void const * handle, sal_uInt16 index, rtl_uString
const * typeName)
1271 static_cast< TypeWriter
const *
>(handle)->setSuperType(
1272 index, toByteString(typeName));
1273 }
catch (std::bad_alloc &) {
1280 RTTypeClass typeClass, rtl_uString
const * typeName, rtl_uString
const * superTypeName,
1281 sal_uInt16 fieldCount)
1284 sal_uInt16 superTypeCount = rtl_uString_getLength(superTypeName) == 0
1288 superTypeCount, fieldCount, 0, 0);
1289 if (superTypeCount > 0) {
1298 const OUString& typeName,
1299 const OUString& superTypeName,
1300 sal_uInt16 fieldCount)
1305 superTypeName.pData,
1315 const OUString& name,
1316 const OUString& typeName,
1317 const OUString& doku,
1318 const OUString& fileName,
sal_uInt32 readString(const sal_uInt8 *buffer, sal_Unicode *v, sal_uInt32 maxSize)
const size_t count(pCandidateA->getBorderLines().size())
RTParamMode
specifies the mode of a parameter.
indicates an invalid parameter mode
sal_uInt32 writeUINT16(sal_uInt8 *buffer, sal_uInt16 v)
RTReferenceType
specifies the type of a reference used in a service description.
sal_uInt32 writeBYTE(sal_uInt8 *buffer, sal_uInt8 v)
void TYPEREG_CALLTYPE typereg_writer_destroy(void *handle) SAL_THROW_EXTERN_C()
Destroys a type writer.
RTValueType m_type
stores the type of the constant value.
sal_uInt32 writeUINT64(sal_uInt8 *buffer, sal_uInt64 v)
sal_Bool TYPEREG_CALLTYPE typereg_writer_setFieldData(void *handle, sal_uInt16 index, rtl_uString const *documentation, rtl_uString const *fileName, RTFieldAccess flags, rtl_uString const *name, rtl_uString const *typeName, RTValueType valueType, RTConstValueUnion valueValue) SAL_THROW_EXTERN_C()
Sets the data of a field of a type writer.
static sal_uInt32 TYPEREG_CALLTYPE getBlopSize(TypeWriterImpl hEntry)
sal_uInt32 writeString(sal_uInt8 *buffer, const sal_Unicode *v)
const sal_uInt16 minorVersion
sal_Bool TYPEREG_CALLTYPE typereg_writer_setMethodExceptionTypeName(void const *handle, sal_uInt16 methodIndex, sal_uInt16 exceptionIndex, rtl_uString const *typeName) SAL_THROW_EXTERN_C()
Sets an exception type name of a method of a type writer.
static void TYPEREG_CALLTYPE release(TypeWriterImpl hEntry)
#define SAL_THROW_EXTERN_C()
#define BLOP_OFFSET_N_ENTRIES
const sal_uInt16 majorVersion
typereg_Version
The version of a binary blob that represents a UNOIDL type.
sal_Unicode const * aString
#define TYPEREG_CALLTYPE
specifies the calling convention for type reader/writer api
RTConstValueUnion m_value
stores the value of the constant.
const sal_Unicode NULL_WSTRING[1]
const sal_uInt8 * getBlop()
returns a pointer to the new type blob.
specifies a variable container for field values.
sal_uInt32 writeDouble(sal_uInt8 *buffer, double v)
#define BLOP_HEADER_N_ENTRIES
#define BLOP_REFERENCE_N_ENTRIES
void const *TYPEREG_CALLTYPE typereg_writer_getBlob(void *handle, sal_uInt32 *size) SAL_THROW_EXTERN_C()
Returns the blob of a type writer.
sal_uInt32 writeINT16(sal_uInt8 *buffer, sal_Int16 v)
sal_uInt32 readUINT16(const sal_uInt8 *buffer, sal_uInt16 &v)
void setFieldData(sal_uInt16 index, const OUString &name, const OUString &typeName, const OUString &doku, const OUString &fileName, RTFieldAccess access, const RTConstValue &constValue)
sets the data for a field member of a type blob.
RTTypeClass
specifies the typeclass of a binary type blob.
sal_uInt32 writeFloat(sal_uInt8 *buffer, float v)
#define BLOP_FIELD_N_ENTRIES
sal_uInt32 writeINT32(sal_uInt8 *buffer, sal_Int32 v)
exports com.sun.star.chart2. data
sal_uInt32 UINT16StringLen(const sal_uInt8 *wstring)
RTValueType
specifies the type of a field value.
void *TYPEREG_CALLTYPE typereg_writer_create(typereg_Version version, rtl_uString const *documentation, rtl_uString const *fileName, RTTypeClass typeClass, sal_Bool published, rtl_uString const *typeName, sal_uInt16 superTypeCount, sal_uInt16 fieldCount, sal_uInt16 methodCount, sal_uInt16 referenceCount) SAL_THROW_EXTERN_C()
Creates a type writer working on a binary blob that represents a UNOIDL type.
#define BLOP_PARAM_N_ENTRIES
sal_Bool TYPEREG_CALLTYPE typereg_writer_setReferenceData(void *handle, sal_uInt16 index, rtl_uString const *documentation, RTReferenceType sort, RTFieldAccess flags, rtl_uString const *typeName) SAL_THROW_EXTERN_C()
Sets the data of a reference of a type writer.
static void TYPEREG_CALLTYPE setFieldData(TypeWriterImpl hEntry, sal_uInt16 index, rtl_uString const *name, rtl_uString const *typeName, rtl_uString const *doku, rtl_uString const *fileName, RTFieldAccess access, RTValueType valueType, RTConstValueUnion constValue)
FieldEntry(sal_uInt32 nType, sal_uInt32 nStart, sal_uInt32 nEnd)
RTMethodMode
specifies the mode of a method.
sal_Bool TYPEREG_CALLTYPE typereg_writer_setSuperTypeName(void const *handle, sal_uInt16 index, rtl_uString const *typeName) SAL_THROW_EXTERN_C()
Sets the type name of a super type of a type writer.
sal_uInt32 writeUtf8(sal_uInt8 *buffer, const char *v)
sal_uInt32 writeUINT32(sal_uInt8 *buffer, sal_uInt32 v)
sal_uInt32 getBlopSize()
returns the size of the new type blob in bytes.
static TypeWriterImpl TYPEREG_CALLTYPE createEntry(RTTypeClass typeClass, rtl_uString const *typeName, rtl_uString const *superTypeName, sal_uInt16 fieldCount)
sal_Bool TYPEREG_CALLTYPE typereg_writer_setMethodData(void *handle, sal_uInt16 index, rtl_uString const *documentation, RTMethodMode flags, rtl_uString const *name, rtl_uString const *returnTypeName, sal_uInt16 parameterCount, sal_uInt16 exceptionCount) SAL_THROW_EXTERN_C()
Sets the data of a method of a type writer.
#define BLOP_METHOD_N_ENTRIES
~RegistryTypeWriter()
Destructor.
Denotes the original version of UNOIDL type blobs.
static const sal_uInt8 *TYPEREG_CALLTYPE getBlop(TypeWriterImpl hEntry)
TypeWriterImpl m_hImpl
stores the handle of an implementation class
RTFieldAccess
specifies the type for the field access.
RegistryTypeWriter(RTTypeClass RTTypeClass, const OUString &typeName, const OUString &superTypeName, sal_uInt16 fieldCount)
Constructor.
sal_Bool TYPEREG_CALLTYPE typereg_writer_setMethodParameterData(void const *handle, sal_uInt16 methodIndex, sal_uInt16 parameterIndex, RTParamMode flags, rtl_uString const *name, rtl_uString const *typeName) SAL_THROW_EXTERN_C()
Sets the data of a parameter of a method of a type writer.
void * TypeWriterImpl
Implementation handle.
specifies a helper class for const values.