1"use strict";(self.webpackChunkpdftools_doc=self.webpackChunkpdftools_doc||[]).push([["11139"],{87638(e,r,n){n.r(r),n.d(r,{metadata:()=>t,default:()=>h,frontMatter:()=>o,contentTitle:()=>d,toc:()=>a,assets:()=>l});var t=JSON.parse('{"id":"api-references/technical-notes/c-notes","title":"C technical notes","description":"Technical details about Toolbox add-on for C.","source":"@site/toolbox-add-on_versioned_docs/version-1.8/api-references/technical-notes/c-notes.mdx","sourceDirName":"api-references/technical-notes","slug":"/api-references/technical-notes/c-notes","permalink":"/docs/toolbox-add-on/1.8/api-references/technical-notes/c-notes","draft":false,"unlisted":false,"tags":[{"inline":false,"label":"Toolbox add-on","permalink":"/docs/toolbox-add-on/1.8/tags/toolbox-add-on","description":"General documentation and guides for the Pdftools Toolbox add-on PDF manipulation library."},{"inline":false,"label":"Technical notes","permalink":"/docs/toolbox-add-on/1.8/tags/technical-notes","description":"Technical notes and in-depth information about the Toolbox add-on."},{"inline":false,"label":"Pdf library in c","permalink":"/docs/toolbox-add-on/1.8/tags/pdf-library-in-c","description":"Documentation and code samples for using the Toolbox add-on in C applications."}],"version":"1.8","frontMatter":{"title":"C technical notes","description":"Technical details about Toolbox add-on for C.","sidebar_label":"C","tags":["Toolbox add-on","Technical notes","PDF library in C"]},"sidebar":"toolboxAddOn","previous":{"title":"General technical notes","permalink":"/docs/toolbox-add-on/1.8/api-references/technical-notes/general-notes"},"next":{"title":"Java","permalink":"/docs/toolbox-add-on/1.8/api-references/technical-notes/java-notes"}}'),s=n(474848),i=n(28453);n(327154),n(729694);let o={title:"C technical notes",description:"Technical details about Toolbox add-on for C.",sidebar_label:"C",tags:["Toolbox add-on","Technical notes","PDF library in C"]},d,l={},a=[{value:"Namespaces, classes, and methods",id:"namespaces-classes-and-methods",level:2},{value:"Objects",id:"objects",level:2},{value:"Type casting",id:"type-casting",level:3},{value:"Properties",id:"properties",level:2},{value:"Error handling",id:"error-handling",level:2},{value:"Strings",id:"strings",level:2},{value:"String return values",id:"string-return-values",level:3},{value:"Streams",id:"streams",level:2},{value:"Arrays",id:"arrays",level:2},{value:"Lists",id:"lists",level:2},{value:"Maps",id:"maps",level:2}];function c(e){let r={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.p,{children:"Learn about specifics and technical details about Toolbox add-on for C."}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["For the full API reference for the Toolbox add-on, see the ",(0,s.jsx)(r.a,{href:"https://api-reference.pdf-tools.com/pdfsdk/1.12/cdoc/files.html",children:"C API reference"}),"."]})}),"\n",(0,s.jsx)(r.h2,{id:"namespaces-classes-and-methods",children:"Namespaces, classes, and methods"}),"\n",(0,s.jsxs)(r.p,{children:["The C programming language uses function prefixes and handles instead of namespaces and classes to model interfaces. In the Toolbox add-on, all the types used, including handles and enumerations, are defined in the ",(0,s.jsx)(r.code,{children:"PdfTools_Types.h"})," header file."]}),"\n",(0,s.jsx)(r.p,{children:"Types have the following naming scheme:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"T\u2039prefix\u203A_\u2039type\u203A\n"})}),"\n",(0,s.jsxs)(r.p,{children:["where ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A"})," is a shortened namespace prefix and ",(0,s.jsx)(r.code,{children:"\u2039type\u203A"})," is the name of the type."]}),"\n",(0,s.jsxs)(r.p,{children:["Similarly, the Toolbox add-on defines functions, collected in header files ",(0,s.jsx)(r.code,{children:"Pdftools_\u2039sub-prefix\u203A.h"})," with the following naming convention:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039type\u203A_\u2039name\u203A\n"})}),"\n",(0,s.jsxs)(r.p,{children:["where ",(0,s.jsx)(r.code,{children:"\u2039type\u203A"})," is the class name and ",(0,s.jsx)(r.code,{children:"\u2039name\u203A"})," is the name of the function."]}),"\n",(0,s.jsx)(r.h2,{id:"objects",children:"Objects"}),"\n",(0,s.jsxs)(r.p,{children:["Objects in the Toolbox add-on for C package interface are represented by object handles. Some types are disposable, meaning that you must close them by calling ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039type\u203A_Close"}),". Release all other types by calling ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_Release"}),"."]}),"\n",(0,s.jsx)(r.h3,{id:"type-casting",children:"Type casting"}),"\n",(0,s.jsxs)(r.p,{children:["The Toolbox add-on uses a class hierarchy to model parent-child relationships, where a parent type\n",(0,s.jsx)(r.code,{children:"T\u2039prefix\u203A_\u2039parentType\u203A"}),"\ncan have derived child types\n",(0,s.jsx)(r.code,{children:"T\u2039prefix\u203A_\u2039childType\u203A"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"Downcasting is necessary, for example, to call the functions of an object\u2019s parent class. In this case, a handle of the child type can be cast using a simple C-style cast:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"(T\u2039prefix\u203A_\u2039parentType\u203A*)pChildTypeHandle\n"})}),"\n",(0,s.jsxs)(r.p,{children:["Upcasting is also possible using a C-style cast. Prior to casting, the child type of the handle can be determined using the ",(0,s.jsx)(r.code,{children:"GetType"})," function of the parent class:"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"(T\u2039prefix\u203A_\u2039parentType\u203AType) iChildType = \u2039prefix\u203A_\u2039parentType\u203A_GetType(pParentTypeHandle);\n"})}),"\n",(0,s.jsx)(r.h2,{id:"properties",children:"Properties"}),"\n",(0,s.jsxs)(r.p,{children:["Properties are modeled with setter and getter functions ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039type\u203A_Get\u2039name\u203A"})," and ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203A"}),", where ",(0,s.jsx)(r.code,{children:"\u2039name\u203A"})," is the name of the property."]}),"\n",(0,s.jsx)(r.h2,{id:"error-handling",children:"Error handling"}),"\n",(0,s.jsx)(r.p,{children:"After calling a function, detect any errors as follows:"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["If the return type of the function is ",(0,s.jsx)(r.code,{children:"BOOL"})," or a pointer, and the return value is ",(0,s.jsx)(r.code,{children:"FALSE"})," or ",(0,s.jsx)(r.code,{children:"NULL"})," respectively, call the ",(0,s.jsx)(r.code,{children:"PdfTools_GetLastError"})," function. If this method returns ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_Success"}),", then no error has occurred and the return value is legitimate."]}),"\n",(0,s.jsxs)(r.li,{children:["If the return type of the function is not a Boolean or a pointer, call the ",(0,s.jsx)(r.code,{children:"PdfTools_GetLastError"})," function. If this method returns ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_Success"}),", then no error has occurred."]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["More information about the error can be acquired from the ",(0,s.jsx)(r.code,{children:"PdfToolsGetLastErrorMessage"})," function."]}),"\n",(0,s.jsx)(r.h2,{id:"strings",children:"Strings"}),"\n",(0,s.jsx)(r.p,{children:"All functions involving strings are provided in two different flavors:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["UTF-16 function with suffix ",(0,s.jsx)(r.code,{children:"W"}),", that uses ",(0,s.jsx)(r.code,{children:"WCHAR"})," as the parameter type."]}),"\n",(0,s.jsxs)(r.li,{children:["Multi-byte character set function with suffix ",(0,s.jsx)(r.code,{children:"A"}),", that uses ",(0,s.jsx)(r.code,{children:"char"})," as the parameter type. The concrete character set that is used depends on the platform:","\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["On Windows, the current ANSI code page (",(0,s.jsx)(r.code,{children:"CP_ACP"}),") is assumed."]}),"\n",(0,s.jsxs)(r.li,{children:["On Linux or macOS, the current C encoding (",(0,s.jsx)(r.code,{children:"LC_CTYPE"}),") is used."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:"In addition to the function names with suffix, there\u2019s a macro without suffix for each function pair.\nThe macro resolves to one of the function variants:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"W"})," if ",(0,s.jsx)(r.code,{children:"_UNICODE"})," is defined."]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:"A"})," if ",(0,s.jsx)(r.code,{children:"_UNICODE"})," is not defined."]}),"\n"]}),"\n",(0,s.jsxs)(r.admonition,{title:"Example",type:"info",children:[(0,s.jsxs)(r.p,{children:["Signature example of an API string property setter, where ",(0,s.jsx)(r.code,{children:"\u2039name\u203A"})," stands for the property\u2019s name:"]}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-c",children:"// Multibyte encoding:\nvoid \u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203AA(T\u2039prefix\u203A_\u2039type\u203A* pHandle, const char* szString);\n// UTF-16:\nvoid \u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203AW(T\u2039prefix\u203A_\u2039type\u203A* pHandle, const WCHAR* szString);\n#ifdef _UNICODE\n#define \u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203A \u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203AW\n#else\n#define \u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203A \u2039prefix\u203A_\u2039type\u203A_Set\u2039name\u203AA\n#endif\n"})})]}),"\n",(0,s.jsx)(r.h3,{id:"string-return-values",children:"String return values"}),"\n",(0,s.jsx)(r.p,{children:"In C, functions that return a string have a special behavior.\nInstead of returning the string, those functions take a buffer and a size as the last parameters and write into that buffer.\nThe return value is the amount of data written to the buffer."}),"\n",(0,s.jsxs)(r.p,{children:["To determine the required buffer size, call the function with ",(0,s.jsx)(r.code,{children:"NULL"})," as the buffer argument. Calling a function with a buffer size that is too small results in an error."]}),"\n",(0,s.jsxs)(r.p,{children:["Multibyte character set functions (with the suffix ",(0,s.jsx)(r.code,{children:"A"}),") that return a string may fail to correctly encode the string in the encoding of the current operating system. In this case, the return value is 0 and no error code is set."]}),"\n",(0,s.jsxs)(r.p,{children:["To prevent such failures, use the UTF-16 (",(0,s.jsx)(r.code,{children:"W"}),") functions on Windows or use operating systems with a Unicode code page."]}),"\n",(0,s.jsxs)(r.admonition,{title:"Example",type:"info",children:[(0,s.jsx)(r.p,{children:"Signature example usage of an API string property getter (Error handling is omitted):"}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-c",children:"size_t PdfTools_Sdk_GetVersionA(char* pBuffer, size_t nBufferSize);\n"})}),(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-c",children:"size_t nBufferSize = PdfTools_Sdk_GetVersionA(NULL, 0);\nchar* pBuffer = malloc(nBufferSize * sizeof char);\nnBufferSize = PdfTools_Sdk_GetVersionA(pBuffer, nBufferSize);\n"})})]}),"\n",(0,s.jsx)(r.h2,{id:"streams",children:"Streams"}),"\n",(0,s.jsxs)(r.p,{children:["Streams are modeled by means of a set of callbacks and a context pointer, grouped in a struct ",(0,s.jsx)(r.code,{children:"TPdfToolsSys_StreamDescriptor"}),".\nAn implementation for ",(0,s.jsx)(r.code,{children:"FILE*"})," is provided in the header file ",(0,s.jsx)(r.code,{children:"PdfTools_PdfToolsSys.h"}),". (Search for the ",(0,s.jsx)(r.code,{children:"PdfToolsSysCreateFILEStreamDescriptor"})," function.)"]}),"\n",(0,s.jsx)(r.h2,{id:"arrays",children:"Arrays"}),"\n",(0,s.jsxs)(r.p,{children:["In C, arrays work similarly to strings. Array parameters consist of a pointer to a buffer and a size parameter specifying the number of array elements.\nFunctions that return an array take a buffer and a size as last parameters and write into that buffer. The return value is the number of elements written to the buffer. A return value of ",(0,s.jsx)(r.code,{children:"(size_t)-1"})," indicates an error.\nTo determine the required buffer size, call the function with ",(0,s.jsx)(r.code,{children:"NULL"})," as the buffer argument.\nCalling the function with a buffer size that is too small results in an error."]}),"\n",(0,s.jsx)(r.h2,{id:"lists",children:"Lists"}),"\n",(0,s.jsxs)(r.p,{children:["Every list type ",(0,s.jsx)(r.code,{children:"T\u2039prefix\u203A_\u2039list\u203A"})," provides a subset of the following functions, where ",(0,s.jsx)(r.code,{children:"T\u2039prefix\u203A_\u2039eltype\u203A"})," stands for the type of the contained elements:"]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Function"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Possible errors"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"int"})," ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039list\u203A_GetCount(T\u2039prefix\u203A_\u2039list\u203A*)"})]}),(0,s.jsx)(r.td,{children:"Get the number of elements in the list."}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"})})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"T\u2039prefix\u203A_\u2039eltype\u203A*"})," ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039list\u203A_Get(T\u2039prefix\u203A_\u2039list\u203A*, int index)"})]}),(0,s.jsx)(r.td,{children:"Get an element of the list."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"BOOL"})," ",(0,s.jsx)(r.code,{children:"\u2039prefix\u203A_\u2039list\u203A_Add(T\u2039prefix\u203A_\u2039list\u203A*, T\u2039prefix\u203A_\u2039eltype\u203A*)"})]}),(0,s.jsx)(r.td,{children:"Add an element to the end of the list."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"maps",children:"Maps"}),"\n",(0,s.jsxs)(r.p,{children:["A map is a dictionary with unique keys and associated values. Currently, the only key\xadtype in all maps in the API is\na string. Every map type ",(0,s.jsx)(r.code,{children:"T\u2039pre\u203A_\u2039map\u203A"})," provides a subset of the following functions, where ",(0,s.jsx)(r.code,{children:"T\u2039pre\u203A_\u2039eltype\u203A"})," is the type of the contained values."]}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Function"}),(0,s.jsx)(r.th,{children:"Description"}),(0,s.jsx)(r.th,{children:"Possible errors"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"int"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetSize(T\u2039pre\u203A_\u2039map\u203A*)"})]}),(0,s.jsx)(r.td,{children:"The number of key-\xadvalue pairs in the map."}),(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"})})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"int"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetBegin(T\u2039pre\u203A_\u2039map\u203A*)"})]}),(0,s.jsxs)(r.td,{children:["Get the position of the first entry in the map. The order of the entries is arbitrary and not significant. ",(0,s.jsx)("br",{})," If the returned position differs from ",(0,s.jsx)
1(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetEnd"}),", then the position can be used to retrieve the map entry with ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetKey"})," and ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetValue"}),". ",(0,s.jsx)("br",{})," Use ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203AGetNext"})," to get the position of the next entry."]}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"int"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetEnd(T\u2039pre\u203A_\u2039map\u203A*)"})]}),(0,s.jsxs)(r.td,{children:["Get the end position of the map. ",(0,s.jsx)("br",{}),"This position does not correspond to an actual entry in the map. It must be used to determine whether the end of the map has been reached when using ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetBegin"})," and ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetNext"}),"."]}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"int"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetNext(T\u2039pre\u203A_\u2039map\u203A*, int it)"})]}),(0,s.jsxs)(r.td,{children:["Get the position of the next entry in the map. The order of the entries is arbitrary and not significant. ",(0,s.jsx)("br",{})," If the returned position differs from ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetEnd"}),", then the position can be used to retrieve the map entry with ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetKey"})," and ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetValue"}),"."]}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"int"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetA(T\u2039pre\u203A_\u2039map\u203A*, const char* szKey)"})]}),(0,s.jsxs)(r.td,{children:["Get the position of a key in the map. ",(0,s.jsx)("br",{})," If no error occurred, then the position can be used to get the corresponding value with ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetValue"}),"."]}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_NotFound"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"size_t"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetKeyA(T\u2039pre\u203A_\u2039map\u203A*, int it, char*, size_t)"})]}),(0,s.jsx)(r.td,{children:"Get the key of the entry given a position."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"T\u2039pre\u203A_\u2039eltype\u203A* \u2039pre\u203A_\u2039map\u203A_GetValue(T\u2039pre\u203A_\u2039map\u203A*, int it)"})}),(0,s.jsx)(r.td,{children:"Get the value of the entry given a position."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"BOOL"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_SetA(T\u2039pre\u203A_\u2039map\u203A*, const char* szKey, T\u2039pre\u203A_\u2039eltype\u203A* pValue)"})]}),(0,s.jsxs)(r.td,{children:["Set the value of an entry for a given key. ",(0,s.jsx)("br",{}
1)," This operation invalidates all positions previously returned by ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetBegin"}),", ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetEnd"}),", ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_GetNext"}),", and ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_Get"}),"."]}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"BOOL"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_SetValue(T\u2039pre\u203A_\u2039map\u203A*, int it, T\u2039pre\u203A_\u2039eltype\u203A* pValue)"})]}),(0,s.jsx)(r.td,{children:"Set the value of the entry at a position in the map."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"BOOL"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_Clear(T\u2039pre\u203A_\u2039map\u203A*)"})]}),(0,s.jsx)(r.td,{children:"Remove all entries from the map."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"BOOL"})," ",(0,s.jsx)(r.code,{children:"\u2039pre\u203A_\u2039map\u203A_Remove(T\u2039pre\u203A_\u2039map\u203A*, int it)"})]}),(0,s.jsx)(r.td,{children:"Remove the entry at a position in the map."}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalState"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_UnsupportedOperation"}),", ",(0,s.jsx)(r.code,{children:"ePdfTools_Error_IllegalArgument"})]})]})]})]})]})}function h(e={}){let{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},617539(e,r,n){n.r(r),n.d(r,{default:()=>t});let t={tabList:"tabList_zI5C",tabItem:"tabItem_yeRP"}},327154(e,r,n){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e){let r=(0,o.default)(),n=(0,a.useTabsContextValue)(e);
1return s.default.createElement(a.TabsProvider,{value:n,key:String(r)},s.default.createElement(x,{className:e.className},(0,a.sanitizeTabsChildren)(e.children)))};let s=t(n(296540)),i=n(911988),o=t(n(19863)),d=t(n(571508)),l=n(892181),a=n(113042),c=t(n(617539));function h({className:e}){let{selectedValue:r,selectValue:n,tabValues:t,block:i}=(0,a.useTabs)(),o=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.useScrollPositionBlocker)(),x=e=>{let s=e.currentTarget,i=t[o.indexOf(s)].value;i!==r&&(p(s),n(i))},f=e=>{let r=null;switch(e.key){case"Enter":x(e);break;case"ArrowRight":{let n=o.indexOf(e.currentTarget)+1;r=o[n]??o[0];break}case"ArrowLeft":{let n=o.indexOf(e.currentTarget)-1;r=o[n]??o[o.length-1]}}r?.focus()};return s.default.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,d.default)("tabs",{"tabs--block":i},e)},t.map(({value:e,label:n,attributes:t})=>s.default.createElement("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,key:e,ref:e=>{o.push(e)},onKeyDown:f,onClick:x,...t,className:(0,d.default)("tabs__item",c.default.tabItem,t?.className,{"tabs__item--active":r===e})},n??e)))}function p({children:e}){return s.default.createElement("div",{className:"margin-top--md"},e)}function x({className:e,children:r}){return s.default.createElement("div",{className:(0,d.default)(i.ThemeClassNames.tabs.container,"tabs-container",c.default.tabList)},s.default.createElement(h,{className:e}),s.default.createElement(p,null,r))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.