H5Tpublic.h 93 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895
  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2. * Copyright by The HDF Group. *
  3. * Copyright by the Board of Trustees of the University of Illinois. *
  4. * All rights reserved. *
  5. * *
  6. * This file is part of HDF5. The full HDF5 copyright notice, including *
  7. * terms governing use, modification, and redistribution, is contained in *
  8. * the COPYING file, which can be found at the root of the source code *
  9. * distribution tree, or in https://www.hdfgroup.org/licenses. *
  10. * If you do not have access to either file, you may request a copy from *
  11. * help@hdfgroup.org. *
  12. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  13. /*
  14. * This file contains public declarations for the H5T module.
  15. */
  16. #ifndef H5Tpublic_H
  17. #define H5Tpublic_H
  18. /* Public headers needed by this file */
  19. #include "H5public.h"
  20. #include "H5Ipublic.h"
  21. #define HOFFSET(S, M) (offsetof(S, M))
  22. /**
  23. * These are the various classes of datatypes
  24. * internal If this goes over 16 types (0-15), the file format will need to
  25. * change.
  26. */
  27. //! <!-- [H5T_class_t_snip] -->
  28. typedef enum H5T_class_t {
  29. H5T_NO_CLASS = -1, /**< error */
  30. H5T_INTEGER = 0, /**< integer types */
  31. H5T_FLOAT = 1, /**< floating-point types */
  32. H5T_TIME = 2, /**< date and time types */
  33. H5T_STRING = 3, /**< character string types */
  34. H5T_BITFIELD = 4, /**< bit field types */
  35. H5T_OPAQUE = 5, /**< opaque types */
  36. H5T_COMPOUND = 6, /**< compound types */
  37. H5T_REFERENCE = 7, /**< reference types */
  38. H5T_ENUM = 8, /**< enumeration types */
  39. H5T_VLEN = 9, /**< variable-Length types */
  40. H5T_ARRAY = 10, /**< array types */
  41. H5T_NCLASSES /**< sentinel: this must be last */
  42. } H5T_class_t;
  43. //! <!-- [H5T_class_t_snip] -->
  44. /**
  45. * Byte orders
  46. */
  47. //! <!-- [H5T_order_t_snip] -->
  48. typedef enum H5T_order_t {
  49. H5T_ORDER_ERROR = -1, /**< error */
  50. H5T_ORDER_LE = 0, /**< little endian */
  51. H5T_ORDER_BE = 1, /**< bit endian */
  52. H5T_ORDER_VAX = 2, /**< VAX mixed endian */
  53. H5T_ORDER_MIXED = 3, /**< Compound type with mixed member orders */
  54. H5T_ORDER_NONE = 4 /**< no particular order (strings, bits,..) */
  55. /*H5T_ORDER_NONE must be last */
  56. } H5T_order_t;
  57. //! <!-- [H5T_order_t_snip] -->
  58. /**
  59. * Types of integer sign schemes
  60. */
  61. //! <!-- [H5T_sign_t_snip] -->
  62. typedef enum H5T_sign_t {
  63. H5T_SGN_ERROR = -1, /**< error */
  64. H5T_SGN_NONE = 0, /**< this is an unsigned type */
  65. H5T_SGN_2 = 1, /**< two's complement */
  66. H5T_NSGN = 2 /** sentinel: this must be last! */
  67. } H5T_sign_t;
  68. //! <!-- [H5T_sign_t_snip] -->
  69. /**
  70. * Floating-point normalization schemes
  71. */
  72. //! <!-- [H5T_norm_t_snip] -->
  73. typedef enum H5T_norm_t {
  74. H5T_NORM_ERROR = -1, /**< error */
  75. H5T_NORM_IMPLIED = 0, /**< msb of mantissa isn't stored, always 1 */
  76. H5T_NORM_MSBSET = 1, /**< msb of mantissa is always 1 */
  77. H5T_NORM_NONE = 2 /**< not normalized */
  78. /*H5T_NORM_NONE must be last */
  79. } H5T_norm_t;
  80. //! <!-- [H5T_norm_t_snip] -->
  81. /**
  82. * Character set to use for text strings.
  83. * \internal Do not change these values since they appear in HDF5 files!
  84. */
  85. typedef enum H5T_cset_t {
  86. H5T_CSET_ERROR = -1, /**< error */
  87. H5T_CSET_ASCII = 0, /**< US ASCII */
  88. H5T_CSET_UTF8 = 1, /**< UTF-8 Unicode encoding */
  89. H5T_CSET_RESERVED_2 = 2, /**< reserved for later use */
  90. H5T_CSET_RESERVED_3 = 3, /**< reserved for later use */
  91. H5T_CSET_RESERVED_4 = 4, /**< reserved for later use */
  92. H5T_CSET_RESERVED_5 = 5, /**< reserved for later use */
  93. H5T_CSET_RESERVED_6 = 6, /**< reserved for later use */
  94. H5T_CSET_RESERVED_7 = 7, /**< reserved for later use */
  95. H5T_CSET_RESERVED_8 = 8, /**< reserved for later use */
  96. H5T_CSET_RESERVED_9 = 9, /**< reserved for later use */
  97. H5T_CSET_RESERVED_10 = 10, /**< reserved for later use */
  98. H5T_CSET_RESERVED_11 = 11, /**< reserved for later use */
  99. H5T_CSET_RESERVED_12 = 12, /**< reserved for later use */
  100. H5T_CSET_RESERVED_13 = 13, /**< reserved for later use */
  101. H5T_CSET_RESERVED_14 = 14, /**< reserved for later use */
  102. H5T_CSET_RESERVED_15 = 15 /**< reserved for later use */
  103. } H5T_cset_t;
  104. #define H5T_NCSET H5T_CSET_RESERVED_2 /*Number of character sets actually defined */
  105. /**
  106. * Type of padding to use in character strings.
  107. * \internal Do not change these values since they appear in HDF5 files!
  108. */
  109. typedef enum H5T_str_t {
  110. H5T_STR_ERROR = -1, /**< error */
  111. H5T_STR_NULLTERM = 0, /**< null terminate like in C */
  112. H5T_STR_NULLPAD = 1, /**< pad with nulls */
  113. H5T_STR_SPACEPAD = 2, /**< pad with spaces like in Fortran */
  114. H5T_STR_RESERVED_3 = 3, /**< reserved for later use */
  115. H5T_STR_RESERVED_4 = 4, /**< reserved for later use */
  116. H5T_STR_RESERVED_5 = 5, /**< reserved for later use */
  117. H5T_STR_RESERVED_6 = 6, /**< reserved for later use */
  118. H5T_STR_RESERVED_7 = 7, /**< reserved for later use */
  119. H5T_STR_RESERVED_8 = 8, /**< reserved for later use */
  120. H5T_STR_RESERVED_9 = 9, /**< reserved for later use */
  121. H5T_STR_RESERVED_10 = 10, /**< reserved for later use */
  122. H5T_STR_RESERVED_11 = 11, /**< reserved for later use */
  123. H5T_STR_RESERVED_12 = 12, /**< reserved for later use */
  124. H5T_STR_RESERVED_13 = 13, /**< reserved for later use */
  125. H5T_STR_RESERVED_14 = 14, /**< reserved for later use */
  126. H5T_STR_RESERVED_15 = 15 /**< reserved for later use */
  127. } H5T_str_t;
  128. #define H5T_NSTR H5T_STR_RESERVED_3 /*num H5T_str_t types actually defined */
  129. /**
  130. * Type of padding to use in other atomic types
  131. */
  132. //! <!-- [H5T_pad_t_snip] -->
  133. typedef enum H5T_pad_t {
  134. H5T_PAD_ERROR = -1, /**< error */
  135. H5T_PAD_ZERO = 0, /**< always set to zero */
  136. H5T_PAD_ONE = 1, /**< always set to one */
  137. H5T_PAD_BACKGROUND = 2, /**< set to background value */
  138. H5T_NPAD = 3 /**< sentinel: THIS MUST BE LAST */
  139. } H5T_pad_t;
  140. //! <!-- [H5T_pad_t_snip] -->
  141. /**
  142. * The order to retrieve atomic native datatype
  143. */
  144. //! <!-- [H5T_direction_t_snip] -->
  145. typedef enum H5T_direction_t {
  146. H5T_DIR_DEFAULT = 0, /**< default direction is ascending */
  147. H5T_DIR_ASCEND = 1, /**< in ascending order */
  148. H5T_DIR_DESCEND = 2 /**< in descending order */
  149. } H5T_direction_t;
  150. //! <!-- [H5T_direction_t_snip] -->
  151. /**
  152. * The exception type passed into the conversion callback function
  153. */
  154. typedef enum H5T_conv_except_t {
  155. H5T_CONV_EXCEPT_RANGE_HI = 0,
  156. /**< Source value is greater than destination's range */
  157. H5T_CONV_EXCEPT_RANGE_LOW = 1,
  158. /**< Source value is less than destination's range */
  159. H5T_CONV_EXCEPT_PRECISION = 2,
  160. /**< Source value loses precision in destination */
  161. H5T_CONV_EXCEPT_TRUNCATE = 3,
  162. /**< Source value is truncated in destination */
  163. H5T_CONV_EXCEPT_PINF = 4,
  164. /**< Source value is positive infinity */
  165. H5T_CONV_EXCEPT_NINF = 5,
  166. /**< Source value is negative infinity */
  167. H5T_CONV_EXCEPT_NAN = 6
  168. /**< Source value is \c NaN (not a number, including \c QNaN and \c SNaN) */
  169. } H5T_conv_except_t;
  170. /**
  171. * The return value from conversion callback function H5T_conv_except_func_t()
  172. */
  173. typedef enum H5T_conv_ret_t {
  174. H5T_CONV_ABORT = -1, /**< abort conversion */
  175. H5T_CONV_UNHANDLED = 0, /**< callback function failed to handle the exception */
  176. H5T_CONV_HANDLED = 1 /**< callback function handled the exception successfully */
  177. } H5T_conv_ret_t;
  178. /**
  179. * Variable Length Datatype struct in memory (This is only used for VL
  180. * sequences, not VL strings, which are stored in char *'s)
  181. */
  182. typedef struct {
  183. size_t len; /**< Length of VL data (in base type units) */
  184. void * p; /**< Pointer to VL data */
  185. } hvl_t;
  186. /* Variable Length String information */
  187. /**
  188. * Indicate that a string is variable length (null-terminated in C, instead of
  189. * fixed length)
  190. */
  191. #define H5T_VARIABLE SIZE_MAX
  192. /* Opaque information */
  193. /**
  194. * Maximum length of an opaque tag
  195. * \internal This could be raised without too much difficulty
  196. */
  197. #define H5T_OPAQUE_TAG_MAX 256
  198. #ifdef __cplusplus
  199. extern "C" {
  200. #endif
  201. //! <!-- [H5T_conv_except_func_t_snip] -->
  202. /**
  203. * \brief Exception handler.
  204. *
  205. * \param[in] except_type The kind of exception that occurred
  206. * \param[in] src_id Source datatype identifier
  207. * \param[in] dst_id Destination datatype identifier
  208. * \param[in] src_buf Source data buffer
  209. * \param[in,out] dst_buf Destination data buffer
  210. * \param[in,out] user_data Callback context
  211. * \returns Valid callback function return values are #H5T_CONV_ABORT,
  212. * #H5T_CONV_UNHANDLED and #H5T_CONV_HANDLED.
  213. *
  214. * \details If an exception like overflow happens during conversion, this
  215. * function is called if it's registered through H5Pset_type_conv_cb().
  216. *
  217. */
  218. typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id,
  219. void *src_buf, void *dst_buf, void *user_data);
  220. //! <!-- [H5T_conv_except_func_t_snip] -->
  221. /* When this header is included from a private header, don't make calls to H5open() */
  222. #undef H5OPEN
  223. #ifndef H5private_H
  224. #define H5OPEN H5open(),
  225. #else /* H5private_H */
  226. #define H5OPEN
  227. #endif /* H5private_H */
  228. /*
  229. * The IEEE floating point types in various byte orders.
  230. */
  231. /**
  232. * \ingroup PDTIEEE
  233. * 32-bit big-endian IEEE floating-point numbers
  234. */
  235. #define H5T_IEEE_F32BE (H5OPEN H5T_IEEE_F32BE_g)
  236. /**
  237. * \ingroup PDTIEEE
  238. * 32-bit little-endian IEEE floating-point numbers
  239. */
  240. #define H5T_IEEE_F32LE (H5OPEN H5T_IEEE_F32LE_g)
  241. /**
  242. * \ingroup PDTIEEE
  243. * 64-bit big-endian IEEE floating-point numbers
  244. */
  245. #define H5T_IEEE_F64BE (H5OPEN H5T_IEEE_F64BE_g)
  246. /**
  247. * \ingroup PDTIEEE
  248. * 64-bit little-endian IEEE floating-point numbers
  249. */
  250. #define H5T_IEEE_F64LE (H5OPEN H5T_IEEE_F64LE_g)
  251. H5_DLLVAR hid_t H5T_IEEE_F32BE_g;
  252. H5_DLLVAR hid_t H5T_IEEE_F32LE_g;
  253. H5_DLLVAR hid_t H5T_IEEE_F64BE_g;
  254. H5_DLLVAR hid_t H5T_IEEE_F64LE_g;
  255. /*
  256. * These are "standard" types. For instance, signed (2's complement) and
  257. * unsigned integers of various sizes and byte orders.
  258. */
  259. /**
  260. * \ingroup PDTSTD
  261. * 8-bit big-endian signed integers
  262. */
  263. #define H5T_STD_I8BE (H5OPEN H5T_STD_I8BE_g)
  264. /**
  265. * \ingroup PDTSTD
  266. * 8-bit little-endian signed integers
  267. */
  268. #define H5T_STD_I8LE (H5OPEN H5T_STD_I8LE_g)
  269. /**
  270. * \ingroup PDTSTD
  271. * 16-bit big-endian signed integers
  272. */
  273. #define H5T_STD_I16BE (H5OPEN H5T_STD_I16BE_g)
  274. /**
  275. * \ingroup PDTSTD
  276. * 16-bit little-endian signed integers
  277. */
  278. #define H5T_STD_I16LE (H5OPEN H5T_STD_I16LE_g)
  279. /**
  280. * \ingroup PDTSTD
  281. * 32-bit big-endian signed integers
  282. */
  283. #define H5T_STD_I32BE (H5OPEN H5T_STD_I32BE_g)
  284. /**
  285. * \ingroup PDTSTD
  286. * 32-bit little-endian signed integers
  287. */
  288. #define H5T_STD_I32LE (H5OPEN H5T_STD_I32LE_g)
  289. /**
  290. * \ingroup PDTSTD
  291. * 64-bit big-endian signed integers
  292. */
  293. #define H5T_STD_I64BE (H5OPEN H5T_STD_I64BE_g)
  294. /**
  295. * \ingroup PDTSTD
  296. * 64-bit little-endian signed integers
  297. */
  298. #define H5T_STD_I64LE (H5OPEN H5T_STD_I64LE_g)
  299. /**
  300. * \ingroup PDTSTD
  301. * 8-bit big-endian unsigned integers
  302. */
  303. #define H5T_STD_U8BE (H5OPEN H5T_STD_U8BE_g)
  304. /**
  305. * \ingroup PDTSTD
  306. * 8-bit little-endian unsigned integers
  307. */
  308. #define H5T_STD_U8LE (H5OPEN H5T_STD_U8LE_g)
  309. /**
  310. * \ingroup PDTSTD
  311. * 16-bit big-endian unsigned integers
  312. */
  313. #define H5T_STD_U16BE (H5OPEN H5T_STD_U16BE_g)
  314. /**
  315. * \ingroup PDTSTD
  316. * 16-bit little-endian unsigned integers
  317. */
  318. #define H5T_STD_U16LE (H5OPEN H5T_STD_U16LE_g)
  319. /**
  320. * \ingroup PDTSTD
  321. * 32-bit big-endian unsigned integers
  322. */
  323. #define H5T_STD_U32BE (H5OPEN H5T_STD_U32BE_g)
  324. /**
  325. * \ingroup PDTSTD
  326. * 32-bit little-endian unsigned integers
  327. */
  328. #define H5T_STD_U32LE (H5OPEN H5T_STD_U32LE_g)
  329. /**
  330. * \ingroup PDTSTD
  331. * 64-bit big-endian unsigned integers
  332. */
  333. #define H5T_STD_U64BE (H5OPEN H5T_STD_U64BE_g)
  334. /**
  335. * \ingroup PDTSTD
  336. * 64-bit little-endian unsigned integers
  337. */
  338. #define H5T_STD_U64LE (H5OPEN H5T_STD_U64LE_g)
  339. /**
  340. * \ingroup PDTSTD
  341. * 8-bit big-endian bitfield
  342. */
  343. #define H5T_STD_B8BE (H5OPEN H5T_STD_B8BE_g)
  344. /**
  345. * \ingroup PDTSTD
  346. * 8-bit little-endian bitfield
  347. */
  348. #define H5T_STD_B8LE (H5OPEN H5T_STD_B8LE_g)
  349. /**
  350. * \ingroup PDTSTD
  351. * 16-bit big-endian bitfield
  352. */
  353. #define H5T_STD_B16BE (H5OPEN H5T_STD_B16BE_g)
  354. /**
  355. * \ingroup PDTSTD
  356. * 16-bit little-endian bitfield
  357. */
  358. #define H5T_STD_B16LE (H5OPEN H5T_STD_B16LE_g)
  359. /**
  360. * \ingroup PDTSTD
  361. * 32-bit big-endian bitfield
  362. */
  363. #define H5T_STD_B32BE (H5OPEN H5T_STD_B32BE_g)
  364. /**
  365. * \ingroup PDTSTD
  366. * 32-bit little-endian bitfield
  367. */
  368. #define H5T_STD_B32LE (H5OPEN H5T_STD_B32LE_g)
  369. /**
  370. * \ingroup PDTSTD
  371. * 64-bit big-endian bitfield
  372. */
  373. #define H5T_STD_B64BE (H5OPEN H5T_STD_B64BE_g)
  374. /**
  375. * \ingroup PDTSTD
  376. * 64-bit little-endian bitfield
  377. */
  378. #define H5T_STD_B64LE (H5OPEN H5T_STD_B64LE_g)
  379. /**
  380. * \ingroup PDTSTD
  381. * Object reference
  382. */
  383. #define H5T_STD_REF_OBJ (H5OPEN H5T_STD_REF_OBJ_g)
  384. /**
  385. * \ingroup PDTSTD
  386. * Dataset region reference
  387. */
  388. #define H5T_STD_REF_DSETREG (H5OPEN H5T_STD_REF_DSETREG_g)
  389. /**
  390. * \ingroup PDTSTD
  391. * Generic reference
  392. */
  393. #define H5T_STD_REF (H5OPEN H5T_STD_REF_g)
  394. H5_DLLVAR hid_t H5T_STD_I8BE_g;
  395. H5_DLLVAR hid_t H5T_STD_I8LE_g;
  396. H5_DLLVAR hid_t H5T_STD_I16BE_g;
  397. H5_DLLVAR hid_t H5T_STD_I16LE_g;
  398. H5_DLLVAR hid_t H5T_STD_I32BE_g;
  399. H5_DLLVAR hid_t H5T_STD_I32LE_g;
  400. H5_DLLVAR hid_t H5T_STD_I64BE_g;
  401. H5_DLLVAR hid_t H5T_STD_I64LE_g;
  402. H5_DLLVAR hid_t H5T_STD_U8BE_g;
  403. H5_DLLVAR hid_t H5T_STD_U8LE_g;
  404. H5_DLLVAR hid_t H5T_STD_U16BE_g;
  405. H5_DLLVAR hid_t H5T_STD_U16LE_g;
  406. H5_DLLVAR hid_t H5T_STD_U32BE_g;
  407. H5_DLLVAR hid_t H5T_STD_U32LE_g;
  408. H5_DLLVAR hid_t H5T_STD_U64BE_g;
  409. H5_DLLVAR hid_t H5T_STD_U64LE_g;
  410. H5_DLLVAR hid_t H5T_STD_B8BE_g;
  411. H5_DLLVAR hid_t H5T_STD_B8LE_g;
  412. H5_DLLVAR hid_t H5T_STD_B16BE_g;
  413. H5_DLLVAR hid_t H5T_STD_B16LE_g;
  414. H5_DLLVAR hid_t H5T_STD_B32BE_g;
  415. H5_DLLVAR hid_t H5T_STD_B32LE_g;
  416. H5_DLLVAR hid_t H5T_STD_B64BE_g;
  417. H5_DLLVAR hid_t H5T_STD_B64LE_g;
  418. H5_DLLVAR hid_t H5T_STD_REF_OBJ_g;
  419. H5_DLLVAR hid_t H5T_STD_REF_DSETREG_g;
  420. H5_DLLVAR hid_t H5T_STD_REF_g;
  421. /*
  422. * Types which are particular to Unix.
  423. */
  424. /**
  425. * \ingroup PDTUNIX
  426. */
  427. #define H5T_UNIX_D32BE (H5OPEN H5T_UNIX_D32BE_g)
  428. /**
  429. * \ingroup PDTUNIX
  430. */
  431. #define H5T_UNIX_D32LE (H5OPEN H5T_UNIX_D32LE_g)
  432. /**
  433. * \ingroup PDTUNIX
  434. */
  435. #define H5T_UNIX_D64BE (H5OPEN H5T_UNIX_D64BE_g)
  436. /**
  437. * \ingroup PDTUNIX
  438. */
  439. #define H5T_UNIX_D64LE (H5OPEN H5T_UNIX_D64LE_g)
  440. H5_DLLVAR hid_t H5T_UNIX_D32BE_g;
  441. H5_DLLVAR hid_t H5T_UNIX_D32LE_g;
  442. H5_DLLVAR hid_t H5T_UNIX_D64BE_g;
  443. H5_DLLVAR hid_t H5T_UNIX_D64LE_g;
  444. /*
  445. * Types particular to the C language. String types use `bytes' instead
  446. * of `bits' as their size.
  447. */
  448. /**
  449. * \ingroup PDTS
  450. * String datatype in C (size defined in bytes rather than in bits)
  451. */
  452. #define H5T_C_S1 (H5OPEN H5T_C_S1_g)
  453. H5_DLLVAR hid_t H5T_C_S1_g;
  454. /*
  455. * Types particular to Fortran.
  456. */
  457. /**
  458. * \ingroup PDTS
  459. * String datatype in Fortran (as defined for the HDF5 C library)
  460. */
  461. #define H5T_FORTRAN_S1 (H5OPEN H5T_FORTRAN_S1_g)
  462. H5_DLLVAR hid_t H5T_FORTRAN_S1_g;
  463. /*
  464. * These types are for Intel CPU's. They are little endian with IEEE
  465. * floating point.
  466. */
  467. /**
  468. * \ingroup PDTX86
  469. * 8-bit little-endian signed (2's complement) integers for Intel CPUs
  470. */
  471. #define H5T_INTEL_I8 H5T_STD_I8LE
  472. /**
  473. * \ingroup PDTX86
  474. * 16-bit little-endian signed (2's complement) integers for Intel CPUs
  475. */
  476. #define H5T_INTEL_I16 H5T_STD_I16LE
  477. /**
  478. * \ingroup PDTX86
  479. * 32-bit little-endian signed (2's complement) integers for Intel CPUs
  480. */
  481. #define H5T_INTEL_I32 H5T_STD_I32LE
  482. /**
  483. * \ingroup PDTX86
  484. * 64-bit little-endian signed (2's complement) integers for Intel CPUs
  485. */
  486. #define H5T_INTEL_I64 H5T_STD_I64LE
  487. /**
  488. * \ingroup PDTX86
  489. * 8-bit little-endian unsigned integers for Intel CPUs
  490. */
  491. #define H5T_INTEL_U8 H5T_STD_U8LE
  492. /**
  493. * \ingroup PDTX86
  494. * 16-bit little-endian unsigned integers for Intel CPUs
  495. */
  496. #define H5T_INTEL_U16 H5T_STD_U16LE
  497. /**
  498. * \ingroup PDTX86
  499. * 32-bit little-endian unsigned integers for Intel CPUs
  500. */
  501. #define H5T_INTEL_U32 H5T_STD_U32LE
  502. /**
  503. * \ingroup PDTX86
  504. * 64-bit little-endian unsigned integers for Intel CPUs
  505. */
  506. #define H5T_INTEL_U64 H5T_STD_U64LE
  507. /**
  508. * \ingroup PDTX86
  509. * 8-bit little-endian bitfield for Intel CPUs
  510. */
  511. #define H5T_INTEL_B8 H5T_STD_B8LE
  512. /**
  513. * \ingroup PDTX86
  514. * 16-bit little-endian bitfield for Intel CPUs
  515. */
  516. #define H5T_INTEL_B16 H5T_STD_B16LE
  517. /**
  518. * \ingroup PDTX86
  519. * 32-bit little-endian bitfield for Intel CPUs
  520. */
  521. #define H5T_INTEL_B32 H5T_STD_B32LE
  522. /**
  523. * \ingroup PDTX86
  524. * 64-bit little-endian bitfield for Intel CPUs
  525. */
  526. #define H5T_INTEL_B64 H5T_STD_B64LE
  527. /**
  528. * \ingroup PDTX86
  529. * 32-bit little-endian IEEE floating-point numbers for Intel CPUs
  530. */
  531. #define H5T_INTEL_F32 H5T_IEEE_F32LE
  532. /**
  533. * \ingroup PDTX86
  534. * 64-bit little-endian IEEE floating-point numbers for Intel CPUs
  535. */
  536. #define H5T_INTEL_F64 H5T_IEEE_F64LE
  537. /*
  538. * These types are for DEC Alpha CPU's. They are little endian with IEEE
  539. * floating point.
  540. */
  541. /**
  542. * \ingroup PDTALPHA
  543. * 8-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
  544. */
  545. #define H5T_ALPHA_I8 H5T_STD_I8LE
  546. /**
  547. * \ingroup PDTALPHA
  548. * 16-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
  549. */
  550. #define H5T_ALPHA_I16 H5T_STD_I16LE
  551. /**
  552. * \ingroup PDTALPHA
  553. * 32-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
  554. */
  555. #define H5T_ALPHA_I32 H5T_STD_I32LE
  556. /**
  557. * \ingroup PDTALPHA
  558. * 64-bit little-endian signed (2's complement) integers for DEC Alpha CPUs
  559. */
  560. #define H5T_ALPHA_I64 H5T_STD_I64LE
  561. /**
  562. * \ingroup PDTALPHA
  563. * 8-bit little-endian unsigned integers for DEC Alpha CPUs
  564. */
  565. #define H5T_ALPHA_U8 H5T_STD_U8LE
  566. /**
  567. * \ingroup PDTALPHA
  568. * 16-bit little-endian unsigned integers for DEC Alpha CPUs
  569. */
  570. #define H5T_ALPHA_U16 H5T_STD_U16LE
  571. /**
  572. * \ingroup PDTALPHA
  573. * 32-bit little-endian unsigned integers for DEC Alpha CPUs
  574. */
  575. #define H5T_ALPHA_U32 H5T_STD_U32LE
  576. /**
  577. * \ingroup PDTALPHA
  578. * 64-bit little-endian unsigned integers for DEC Alpha CPUs
  579. */
  580. #define H5T_ALPHA_U64 H5T_STD_U64LE
  581. /**
  582. * \ingroup PDTALPHA
  583. * 8-bit little-endian bitfield for DEC Alpha CPUs
  584. */
  585. #define H5T_ALPHA_B8 H5T_STD_B8LE
  586. /**
  587. * \ingroup PDTALPHA
  588. * 16-bit little-endian bitfield for DEC Alpha CPUs
  589. */
  590. #define H5T_ALPHA_B16 H5T_STD_B16LE
  591. /**
  592. * \ingroup PDTALPHA
  593. * 32-bit little-endian bitfield for DEC Alpha CPUs
  594. */
  595. #define H5T_ALPHA_B32 H5T_STD_B32LE
  596. /**
  597. * \ingroup PDTALPHA
  598. * 64-bit little-endian bitfield for DEC Alpha CPUs
  599. */
  600. #define H5T_ALPHA_B64 H5T_STD_B64LE
  601. /**
  602. * \ingroup PDTALPHA
  603. * 32-bit little-endian IEEE floating-point numbers for DEC Alpha CPUs
  604. */
  605. #define H5T_ALPHA_F32 H5T_IEEE_F32LE
  606. /**
  607. * \ingroup PDTALPHA
  608. * 64-bit little-endian IEEE floating-point numbers for DEC Alpha CPUs
  609. */
  610. #define H5T_ALPHA_F64 H5T_IEEE_F64LE
  611. /*
  612. * These types are for MIPS cpu's commonly used in SGI systems. They are big
  613. * endian with IEEE floating point.
  614. */
  615. /**
  616. * \ingroup PDTMIPS
  617. * 8-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
  618. */
  619. #define H5T_MIPS_I8 H5T_STD_I8BE
  620. /**
  621. * \ingroup PDTMIPS
  622. * 16-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
  623. */
  624. #define H5T_MIPS_I16 H5T_STD_I16BE
  625. /**
  626. * \ingroup PDTMIPS
  627. * 32-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
  628. */
  629. #define H5T_MIPS_I32 H5T_STD_I32BE
  630. /**
  631. * \ingroup PDTMIPS
  632. * 64-bit big-endian signed (2's complement) integers for SGI MIPS CPUs
  633. */
  634. #define H5T_MIPS_I64 H5T_STD_I64BE
  635. /**
  636. * \ingroup PDTMIPS
  637. * 8-bit big-endian unsigned integers for SGI MIPS CPUs
  638. */
  639. #define H5T_MIPS_U8 H5T_STD_U8BE
  640. /**
  641. * \ingroup PDTMIPS
  642. * 16-bit big-endian unsigned integers for SGI MIPS CPUs
  643. */
  644. #define H5T_MIPS_U16 H5T_STD_U16BE
  645. /**
  646. * \ingroup PDTMIPS
  647. * 32-bit big-endian unsigned integers for SGI MIPS CPUs
  648. */
  649. #define H5T_MIPS_U32 H5T_STD_U32BE
  650. /**
  651. * \ingroup PDTMIPS
  652. * 64-bit big-endian unsigned integers for SGI MIPS CPUs
  653. */
  654. #define H5T_MIPS_U64 H5T_STD_U64BE
  655. /**
  656. * \ingroup PDTMIPS
  657. * 8-bit big-endian bitfield for SGI MIPS CPUs
  658. */
  659. #define H5T_MIPS_B8 H5T_STD_B8BE
  660. /**
  661. * \ingroup PDTMIPS
  662. * 16-bit big-endian bitfield for SGI MIPS CPUs
  663. */
  664. #define H5T_MIPS_B16 H5T_STD_B16BE
  665. /**
  666. * \ingroup PDTMIPS
  667. * 32-bit big-endian bitfield for SGI MIPS CPUs
  668. */
  669. #define H5T_MIPS_B32 H5T_STD_B32BE
  670. /**
  671. * \ingroup PDTMIPS
  672. * 64-bit big-endian bitfield for SGI MIPS CPUs
  673. */
  674. #define H5T_MIPS_B64 H5T_STD_B64BE
  675. /**
  676. * \ingroup PDTMIPS
  677. * 32-bit big-endian IEEE floating-point numbers for MIPS CPUs
  678. */
  679. #define H5T_MIPS_F32 H5T_IEEE_F32BE
  680. /**
  681. * \ingroup PDTMIPS
  682. * 64-bit big-endian IEEE floating-point numbers for MIPS CPUs
  683. */
  684. #define H5T_MIPS_F64 H5T_IEEE_F64BE
  685. /*
  686. * The VAX floating point types (i.e. in VAX byte order)
  687. */
  688. /**
  689. * \ingroup PDTALPHA
  690. * 32-bit VAX byte order floating-point numbers for OpenVMS on DEC Alpha CPUs
  691. */
  692. #define H5T_VAX_F32 (H5OPEN H5T_VAX_F32_g)
  693. /**
  694. * \ingroup PDTALPHA
  695. * 64-bit VAX byte order floating-point numbers for OpenVMS on DEC Alpha CPUs
  696. */
  697. #define H5T_VAX_F64 (H5OPEN H5T_VAX_F64_g)
  698. H5_DLLVAR hid_t H5T_VAX_F32_g;
  699. H5_DLLVAR hid_t H5T_VAX_F64_g;
  700. /*
  701. * The predefined native types. These are the types detected by H5detect and
  702. * they violate the naming scheme a little. Instead of a class name,
  703. * precision and byte order as the last component, they have a C-like type
  704. * name. If the type begins with `U' then it is the unsigned version of the
  705. * integer type; other integer types are signed. The type LLONG corresponds
  706. * to C's `long long' and LDOUBLE is `long double' (these types might be the
  707. * same as `LONG' and `DOUBLE' respectively).
  708. */
  709. /**
  710. * \ingroup PDTNAT
  711. * C-style \c char
  712. */
  713. #define H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR)
  714. /**
  715. * \ingroup PDTNAT
  716. * C-style \Code{signed char}
  717. */
  718. #define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g)
  719. /**
  720. * \ingroup PDTNAT
  721. * C-style \Code{unsigned char}
  722. */
  723. #define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g)
  724. /**
  725. * \ingroup PDTNAT
  726. * C-style \Code{short}
  727. */
  728. #define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g)
  729. /**
  730. * \ingroup PDTNAT
  731. * C-style \Code{unsigned short}
  732. */
  733. #define H5T_NATIVE_USHORT (H5OPEN H5T_NATIVE_USHORT_g)
  734. /**
  735. * \ingroup PDTNAT
  736. * C-style \Code{int}
  737. */
  738. #define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g)
  739. /**
  740. * \ingroup PDTNAT
  741. * C-style \Code{unsigned int}
  742. */
  743. #define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g)
  744. /**
  745. * \ingroup PDTNAT
  746. * C-style \Code{long}
  747. */
  748. #define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g)
  749. /**
  750. * \ingroup PDTNAT
  751. * C-style \Code{unsigned long}
  752. */
  753. #define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g)
  754. /**
  755. * \ingroup PDTNAT
  756. * C-style \Code{long long}
  757. */
  758. #define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g)
  759. /**
  760. * \ingroup PDTNAT
  761. * C-style \Code{unsigned long long}
  762. */
  763. #define H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g)
  764. /**
  765. * \ingroup PDTNAT
  766. * C-style \Code{float}
  767. */
  768. #define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g)
  769. /**
  770. * \ingroup PDTNAT
  771. * C-style \Code{double}
  772. */
  773. #define H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g)
  774. /**
  775. * \ingroup PDTNAT
  776. * C-style \Code{long double}
  777. */
  778. #define H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g)
  779. /**
  780. * \ingroup PDTNAT
  781. * HDF5 8-bit bitfield based on native types
  782. */
  783. #define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g)
  784. /**
  785. * \ingroup PDTNAT
  786. * HDF5 16-bit bitfield based on native types
  787. */
  788. #define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g)
  789. /**
  790. * \ingroup PDTNAT
  791. * HDF5 32-bit bitfield based on native types
  792. */
  793. #define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g)
  794. /**
  795. * \ingroup PDTNAT
  796. * HDF5 64-bit bitfield based on native types
  797. */
  798. #define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g)
  799. /**
  800. * \ingroup PDTNAT
  801. * HDF5 opaque unit based on native types
  802. */
  803. #define H5T_NATIVE_OPAQUE (H5OPEN H5T_NATIVE_OPAQUE_g)
  804. /**
  805. * \ingroup PDTNAT
  806. * HDF5 address type based on native types
  807. */
  808. #define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g)
  809. /**
  810. * \ingroup PDTNAT
  811. * HDF5 size type based on native types
  812. */
  813. #define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g)
  814. /**
  815. * \ingroup PDTNAT
  816. * HDF5 signed size type based on native types
  817. */
  818. #define H5T_NATIVE_HSSIZE (H5OPEN H5T_NATIVE_HSSIZE_g)
  819. /**
  820. * \ingroup PDTNAT
  821. * HDF5 error code type based on native types
  822. */
  823. #define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g)
  824. /**
  825. * \ingroup PDTNAT
  826. * HDF5 Boolean type based on native types
  827. */
  828. #define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g)
  829. H5_DLLVAR hid_t H5T_NATIVE_SCHAR_g;
  830. H5_DLLVAR hid_t H5T_NATIVE_UCHAR_g;
  831. H5_DLLVAR hid_t H5T_NATIVE_SHORT_g;
  832. H5_DLLVAR hid_t H5T_NATIVE_USHORT_g;
  833. H5_DLLVAR hid_t H5T_NATIVE_INT_g;
  834. H5_DLLVAR hid_t H5T_NATIVE_UINT_g;
  835. H5_DLLVAR hid_t H5T_NATIVE_LONG_g;
  836. H5_DLLVAR hid_t H5T_NATIVE_ULONG_g;
  837. H5_DLLVAR hid_t H5T_NATIVE_LLONG_g;
  838. H5_DLLVAR hid_t H5T_NATIVE_ULLONG_g;
  839. H5_DLLVAR hid_t H5T_NATIVE_FLOAT_g;
  840. H5_DLLVAR hid_t H5T_NATIVE_DOUBLE_g;
  841. H5_DLLVAR hid_t H5T_NATIVE_LDOUBLE_g;
  842. H5_DLLVAR hid_t H5T_NATIVE_B8_g;
  843. H5_DLLVAR hid_t H5T_NATIVE_B16_g;
  844. H5_DLLVAR hid_t H5T_NATIVE_B32_g;
  845. H5_DLLVAR hid_t H5T_NATIVE_B64_g;
  846. H5_DLLVAR hid_t H5T_NATIVE_OPAQUE_g;
  847. H5_DLLVAR hid_t H5T_NATIVE_HADDR_g;
  848. H5_DLLVAR hid_t H5T_NATIVE_HSIZE_g;
  849. H5_DLLVAR hid_t H5T_NATIVE_HSSIZE_g;
  850. H5_DLLVAR hid_t H5T_NATIVE_HERR_g;
  851. H5_DLLVAR hid_t H5T_NATIVE_HBOOL_g;
  852. /* C9x integer types */
  853. /**
  854. * \ingroup PDTC9x
  855. */
  856. #define H5T_NATIVE_INT8 (H5OPEN H5T_NATIVE_INT8_g)
  857. /**
  858. * \ingroup PDTC9x
  859. */
  860. #define H5T_NATIVE_UINT8 (H5OPEN H5T_NATIVE_UINT8_g)
  861. /**
  862. * \ingroup PDTC9x
  863. */
  864. #define H5T_NATIVE_INT_LEAST8 (H5OPEN H5T_NATIVE_INT_LEAST8_g)
  865. /**
  866. * \ingroup PDTC9x
  867. */
  868. #define H5T_NATIVE_UINT_LEAST8 (H5OPEN H5T_NATIVE_UINT_LEAST8_g)
  869. /**
  870. * \ingroup PDTC9x
  871. */
  872. #define H5T_NATIVE_INT_FAST8 (H5OPEN H5T_NATIVE_INT_FAST8_g)
  873. /**
  874. * \ingroup PDTC9x
  875. */
  876. #define H5T_NATIVE_UINT_FAST8 (H5OPEN H5T_NATIVE_UINT_FAST8_g)
  877. H5_DLLVAR hid_t H5T_NATIVE_INT8_g;
  878. H5_DLLVAR hid_t H5T_NATIVE_UINT8_g;
  879. H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST8_g;
  880. H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST8_g;
  881. H5_DLLVAR hid_t H5T_NATIVE_INT_FAST8_g;
  882. H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST8_g;
  883. /**
  884. * \ingroup PDTC9x
  885. */
  886. #define H5T_NATIVE_INT16 (H5OPEN H5T_NATIVE_INT16_g)
  887. /**
  888. * \ingroup PDTC9x
  889. */
  890. #define H5T_NATIVE_UINT16 (H5OPEN H5T_NATIVE_UINT16_g)
  891. /**
  892. * \ingroup PDTC9x
  893. */
  894. #define H5T_NATIVE_INT_LEAST16 (H5OPEN H5T_NATIVE_INT_LEAST16_g)
  895. /**
  896. * \ingroup PDTC9x
  897. */
  898. #define H5T_NATIVE_UINT_LEAST16 (H5OPEN H5T_NATIVE_UINT_LEAST16_g)
  899. /**
  900. * \ingroup PDTC9x
  901. */
  902. #define H5T_NATIVE_INT_FAST16 (H5OPEN H5T_NATIVE_INT_FAST16_g)
  903. /**
  904. * \ingroup PDTC9x
  905. */
  906. #define H5T_NATIVE_UINT_FAST16 (H5OPEN H5T_NATIVE_UINT_FAST16_g)
  907. H5_DLLVAR hid_t H5T_NATIVE_INT16_g;
  908. H5_DLLVAR hid_t H5T_NATIVE_UINT16_g;
  909. H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST16_g;
  910. H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST16_g;
  911. H5_DLLVAR hid_t H5T_NATIVE_INT_FAST16_g;
  912. H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST16_g;
  913. /**
  914. * \ingroup PDTC9x
  915. */
  916. #define H5T_NATIVE_INT32 (H5OPEN H5T_NATIVE_INT32_g)
  917. /**
  918. * \ingroup PDTC9x
  919. */
  920. #define H5T_NATIVE_UINT32 (H5OPEN H5T_NATIVE_UINT32_g)
  921. /**
  922. * \ingroup PDTC9x
  923. */
  924. #define H5T_NATIVE_INT_LEAST32 (H5OPEN H5T_NATIVE_INT_LEAST32_g)
  925. /**
  926. * \ingroup PDTC9x
  927. */
  928. #define H5T_NATIVE_UINT_LEAST32 (H5OPEN H5T_NATIVE_UINT_LEAST32_g)
  929. /**
  930. * \ingroup PDTC9x
  931. */
  932. #define H5T_NATIVE_INT_FAST32 (H5OPEN H5T_NATIVE_INT_FAST32_g)
  933. /**
  934. * \ingroup PDTC9x
  935. */
  936. #define H5T_NATIVE_UINT_FAST32 (H5OPEN H5T_NATIVE_UINT_FAST32_g)
  937. H5_DLLVAR hid_t H5T_NATIVE_INT32_g;
  938. H5_DLLVAR hid_t H5T_NATIVE_UINT32_g;
  939. H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST32_g;
  940. H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST32_g;
  941. H5_DLLVAR hid_t H5T_NATIVE_INT_FAST32_g;
  942. H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST32_g;
  943. /**
  944. * \ingroup PDTC9x
  945. */
  946. #define H5T_NATIVE_INT64 (H5OPEN H5T_NATIVE_INT64_g)
  947. /**
  948. * \ingroup PDTC9x
  949. */
  950. #define H5T_NATIVE_UINT64 (H5OPEN H5T_NATIVE_UINT64_g)
  951. /**
  952. * \ingroup PDTC9x
  953. */
  954. #define H5T_NATIVE_INT_LEAST64 (H5OPEN H5T_NATIVE_INT_LEAST64_g)
  955. /**
  956. * \ingroup PDTC9x
  957. */
  958. #define H5T_NATIVE_UINT_LEAST64 (H5OPEN H5T_NATIVE_UINT_LEAST64_g)
  959. /**
  960. * \ingroup PDTC9x
  961. */
  962. #define H5T_NATIVE_INT_FAST64 (H5OPEN H5T_NATIVE_INT_FAST64_g)
  963. /**
  964. * \ingroup PDTC9x
  965. */
  966. #define H5T_NATIVE_UINT_FAST64 (H5OPEN H5T_NATIVE_UINT_FAST64_g)
  967. H5_DLLVAR hid_t H5T_NATIVE_INT64_g;
  968. H5_DLLVAR hid_t H5T_NATIVE_UINT64_g;
  969. H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST64_g;
  970. H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST64_g;
  971. H5_DLLVAR hid_t H5T_NATIVE_INT_FAST64_g;
  972. H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g;
  973. /* Operations defined on all datatypes */
  974. /**
  975. * \ingroup H5T
  976. *
  977. * \brief Creates a new datatype.
  978. *
  979. * \param[in] type Class of datatype to create
  980. * \param[in] size Size, in bytes, of the datatype being created
  981. *
  982. * \return \hid_t{datatype}
  983. *
  984. * \details H5Tcreate() creates a new datatype of the specified class with the
  985. * specified number of bytes. This function is used only with the
  986. * following datatype classes:
  987. * - #H5T_COMPOUND
  988. * - #H5T_OPAQUE
  989. * - #H5T_ENUM
  990. * - #H5T_STRING
  991. *
  992. * Other datatypes, including integer and floating-point datatypes,
  993. * are typically created by using H5Tcopy() to copy and modify a
  994. * predefined datatype.
  995. *
  996. * When creating a variable-length string datatype, \p size must
  997. * be #H5T_VARIABLE; see \ref_vlen_strings.
  998. *
  999. * When creating a fixed-length string datatype, \p size will
  1000. * be the length of the string in bytes. The length of the
  1001. * string in characters will depend on i the encoding used; see
  1002. * H5Pset_char_encoding().
  1003. *
  1004. * ENUMs created with this function have a signed native integer
  1005. * base datatype. Use H5Tenum_create() if a different integer base
  1006. * datatype is required.
  1007. *
  1008. * The datatype identifier returned from this function should be
  1009. * released with H5Tclose or resource leaks will result.
  1010. *
  1011. * \see H5Tclose()
  1012. *
  1013. * \since 1.2.0
  1014. *
  1015. */
  1016. H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size);
  1017. /**
  1018. * \ingroup H5T
  1019. *
  1020. * \brief Copies an existing datatype.
  1021. *
  1022. * \type_id
  1023. *
  1024. * \return \hid_t{datatype}
  1025. *
  1026. * \details H5Tcopy() makes a copy of an existing datatype. The returned type
  1027. * is always transient and unlocked.
  1028. *
  1029. * The \p type_id argument can be either a datatype identifier,
  1030. * a predefined datatype (defined in H5Tpublic.h), or a dataset
  1031. * identifier. If \p type_id is a dataset identifier, this function
  1032. * returns a transient, modifiable datatype which is a copy of the
  1033. * dataset's datatype.
  1034. *
  1035. * The returned datatype identifier should be released with H5Tclose()
  1036. * to prevent resource leak.
  1037. *
  1038. */
  1039. H5_DLL hid_t H5Tcopy(hid_t type_id);
  1040. /**
  1041. * \ingroup H5T
  1042. *
  1043. * \brief Releases a datatype
  1044. *
  1045. * \type_id
  1046. *
  1047. * \return \herr_t
  1048. *
  1049. * \details H5Tclose() releases the datatype \p dtype_id. Further access
  1050. * through this datatype identifier is illegal. Failure to release
  1051. * a datatype with this call will result in resource leaks.
  1052. *
  1053. */
  1054. H5_DLL herr_t H5Tclose(hid_t type_id);
  1055. /**
  1056. * \ingroup H5T
  1057. *
  1058. * \brief Asynchronous version of H5Tclose().
  1059. *
  1060. */
  1061. H5_DLL herr_t H5Tclose_async(const char *app_file, const char *app_func, unsigned app_line, hid_t type_id,
  1062. hid_t es_id);
  1063. /**
  1064. * \ingroup H5T
  1065. *
  1066. * \brief Determines whether two datatype identifiers refer to the same datatype
  1067. *
  1068. * \type_id{type1_id}
  1069. * \type_id{type2_id}
  1070. *
  1071. * \return \htri_t
  1072. *
  1073. * \details H5Tequal() determines whether two datatype identifiers refer to
  1074. * the same datatype.
  1075. *
  1076. * \since 1.6 or earlier
  1077. *
  1078. */
  1079. H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id);
  1080. /**
  1081. * \ingroup H5T
  1082. *
  1083. * \brief Locks a datatype
  1084. *
  1085. * \type_id
  1086. *
  1087. * \return \herr_t
  1088. *
  1089. * \details H5Tlock() locks the datatype specified by the dtype_id identifier,
  1090. * making it read-only and non-destructible. This is normally done by
  1091. * the library for predefined datatypes so the application does not
  1092. * inadvertently change or delete a predefined type. Once a datatype
  1093. * is locked it can never be unlocked.
  1094. *
  1095. */
  1096. H5_DLL herr_t H5Tlock(hid_t type_id);
  1097. /**
  1098. * \ingroup H5T
  1099. *
  1100. * \brief Commits a transient datatype, linking it into the file and creating
  1101. * a new committed datatype
  1102. *
  1103. * \fg_loc_id
  1104. * \param[in] name Name given to committed datatype
  1105. * \type_id Identifier of datatype to be committed and, upon function’s
  1106. * return, identifier for the committed datatype
  1107. * \lcpl_id
  1108. * \tcpl_id
  1109. * \tapl_id
  1110. *
  1111. * \return \herr_t
  1112. *
  1113. * \details H5Tcommit2() saves a transient datatype as an immutable committed
  1114. * datatype in a file. The datatype specified by \p dtype_id is
  1115. * committed to the file with the name name at the location specified
  1116. * by \p loc_id and with the datatype creation and access property
  1117. * lists \p tcpl_id and \p tapl_id, respectively.
  1118. *
  1119. * \p loc_id may be a file identifier, or a group identifier within
  1120. * that file. \p name may be either an absolute path in the file or
  1121. * a relative path from \p loc_id naming the newly-commited datatype.
  1122. *
  1123. * The link creation property list, \p lcpl_id, governs creation of
  1124. * the link(s) by which the new committed datatype is accessed and
  1125. * the creation of any intermediate groups that may be missing.
  1126. *
  1127. * Once committed, this datatype may be used to define the datatype
  1128. * of any other dataset or attribute in the file.
  1129. *
  1130. * This function will not accept a datatype that cannot actually hold
  1131. * information. This currently includes compound datatypes with no
  1132. * fields and enumerated datatypes with no members.
  1133. *
  1134. * Committed datatypes are sometimes referred to as named datatypes.
  1135. *
  1136. * \version 1.8.7 Function modified in this release to reject datatypes that
  1137. * will not accommodate actual data, such as a compound datatype
  1138. * with no fields or an enumerated datatype with no members.
  1139. *
  1140. * \since 1.8.0
  1141. *
  1142. */
  1143. H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id,
  1144. hid_t tapl_id);
  1145. /**
  1146. * \ingroup H5T
  1147. *
  1148. * \brief Asynchronous version of H5Tcommit2().
  1149. *
  1150. */
  1151. H5_DLL herr_t H5Tcommit_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
  1152. const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id,
  1153. hid_t es_id);
  1154. /**
  1155. * --------------------------------------------------------------------------
  1156. * \ingroup H5T
  1157. *
  1158. * \brief Opens a committed (named) datatype
  1159. *
  1160. * \fgdta_loc_id
  1161. * \param[in] name Name of the datatype to open
  1162. * \tapl_id
  1163. *
  1164. * \return \hid_t{datatype}
  1165. *
  1166. * \details H5Topen2() opens a committed datatype at the location specified
  1167. * by \p loc_id and returns an identifier for the datatype. \p
  1168. * loc_id is either a file or group identifier. The identifier should
  1169. * eventually be closed by calling H5Tclose() to release resources.
  1170. *
  1171. * The committed datatype is opened with the datatype access property
  1172. * list tapl_id.
  1173. *
  1174. * \since 1.8.0
  1175. *
  1176. */
  1177. H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id);
  1178. /**
  1179. * \ingroup H5T
  1180. *
  1181. * \brief Asynchronous version of H5Topen2().
  1182. *
  1183. */
  1184. H5_DLL hid_t H5Topen_async(const char *app_file, const char *app_func, unsigned app_line, hid_t loc_id,
  1185. const char *name, hid_t tapl_id, hid_t es_id);
  1186. /**
  1187. * \ingroup H5T
  1188. *
  1189. * \brief Commits a transient datatype to a file, creating a new named
  1190. * datatype, but does not link it into the file structure
  1191. *
  1192. * \fg_loc_id
  1193. * \type_id
  1194. * \tcpl_id
  1195. * \tapl_id
  1196. *
  1197. * \return \herr_t
  1198. *
  1199. * \details H5Tcommit_anon() commits a transient datatype (not immutable)
  1200. * to a file, turning it into a named datatype with the specified
  1201. * creation and property lists. With default property lists,
  1202. * #H5P_DEFAULT, H5Tcommit_anon() provides similar functionality to
  1203. * that of H5Tcommit(), with the differences described below.
  1204. *
  1205. * #H5P_DEFAULT can be passed in for the datatype creation property
  1206. * list identifier, \p tcpl_id. The datatype access property list
  1207. * identifier, \p tapl_id, is provided for future functionality and
  1208. * is not used at this time. This parameter should always be passed
  1209. * as the value #H5P_DEFAULT.
  1210. *
  1211. * Note that H5Tcommit_anon() does not link this newly-committed
  1212. * datatype into the file. After the H5Tcommit_anon() call, the
  1213. * datatype identifier \p type_id must be linked into the HDF5 file
  1214. * structure with H5Olink() or it will be deleted from the file when
  1215. * the file is closed.
  1216. *
  1217. * The differences between this function and H5Tcommit() are as follows:
  1218. * \li H5Tcommit_anon() explicitly includes property lists,
  1219. * which provides for greater control of the creation process
  1220. * and of the properties of the new named datatype. H5Tcommit()
  1221. * always uses default properties.
  1222. * \li H5Tcommit_anon() neither provides the new named datatype’s
  1223. * name nor links it into the HDF5 file structure; those actions
  1224. * must be performed separately through a call to H5Olink(),
  1225. * which offers greater control over linking.
  1226. *
  1227. * This function will not accept a datatype that cannot actually
  1228. * hold data. This currently includes compound datatypes with no
  1229. * fields and enumerated datatypes with no members.
  1230. *
  1231. * \version 1.8.7 Function modified in this release to reject datatypes that
  1232. * will not accommodate actual data, such as a compound datatype
  1233. * with no fields or an enumerated datatype with no members.
  1234. *
  1235. * \since 1.2.0
  1236. *
  1237. */
  1238. H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id);
  1239. /**
  1240. * \ingroup H5T
  1241. *
  1242. * \brief Returns a copy of a datatype's creation property list
  1243. *
  1244. * \type_id
  1245. *
  1246. * \return \hid_t{datatype creation property list}
  1247. *
  1248. * \details H5Tget_create_plist() returns a property list identifier
  1249. * for the datatype creation property list associated with the datatype
  1250. * specified by \p type_id.
  1251. *
  1252. * The creation property list identifier should be released with
  1253. * H5Pclose() to prevent memory leaks.
  1254. *
  1255. * \since 1.8.0
  1256. *
  1257. */
  1258. H5_DLL hid_t H5Tget_create_plist(hid_t type_id);
  1259. /**
  1260. * \ingroup H5T
  1261. *
  1262. * \brief Determines whether a datatype is a committed type or a transient type
  1263. *
  1264. * \type_id
  1265. *
  1266. * \return \htri_t
  1267. *
  1268. * \details H5Tcommitted() queries a type to determine whether the type
  1269. * specified by the \p dtype_id identifier is a committed (formerly
  1270. * known as a \Emph{named}) type or a transient type. If this function returns
  1271. * a positive value, then the type is committed (that is, it has been
  1272. * committed, perhaps by some other application). Datasets which
  1273. * return committed datatypes with H5Dget_type() are able to share
  1274. * the datatype with other datasets in the same file.
  1275. *
  1276. * \version 1.8.0 Fortran API was added
  1277. *
  1278. * \since 1.6 or earlier
  1279. *
  1280. */
  1281. H5_DLL htri_t H5Tcommitted(hid_t type_id);
  1282. /**
  1283. * \ingroup H5T
  1284. *
  1285. * \brief Encodes a datatype object description into a binary buffer
  1286. *
  1287. * \param[in] obj_id Identifier of the object to be encoded
  1288. * \param[in,out] buf Buffer for the object to be encoded into.
  1289. * \param[in,out] nalloc IN: The size of the allocated buffer
  1290. * OUT: The size of the buffer needed
  1291. *
  1292. * \return \herr_t
  1293. *
  1294. * \details H5Tencode() Given datatype identifier, H5Tencode() converts a
  1295. * datatype description into binary form in a buffer. Using this
  1296. * binary form in the buffer, a datatype object can be reconstructed
  1297. * using H5Tdecode() to return a new object handle (\ref hid_t) for
  1298. * this datatype.
  1299. *
  1300. * If the provided buffer is NULL, only the size of buffer needed is
  1301. * returned through \p nalloc.
  1302. *
  1303. * A preliminary H5Tencode() call can be made to find out the size
  1304. * of the buffer needed. This value is returned as \p nalloc. That
  1305. * value can then be assigned to \p nalloc for a second H5Tencode()
  1306. * call, which will retrieve the actual encoded object.
  1307. *
  1308. * If the library finds that \p nalloc is not big enough for the
  1309. * object, it simply returns the size of the buffer needed through
  1310. * \p nalloc without encoding the provided buffer.
  1311. *
  1312. * \since 1.2.0
  1313. *
  1314. */
  1315. H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
  1316. /**
  1317. * \ingroup H5T
  1318. *
  1319. * \brief Decodes a binary object description of datatype and return a new
  1320. * object handle
  1321. *
  1322. * \param[in] buf Buffer for the datatype object to be decoded
  1323. *
  1324. * \return \hid_t{datatype}
  1325. *
  1326. * \details H5Tdecode() Given an object description of datatype in binary in a
  1327. * buffer, H5Tdecode() reconstructs the HDF5 datatype object and
  1328. * returns a new object handle for it. The binary description of
  1329. * the object is encoded by H5Tencode(). User is responsible for
  1330. * passing in the right buffer.
  1331. *
  1332. * The datatype identifier returned by this function can be released
  1333. * with H5Tclose() when the identifier is no longer needed so that
  1334. * resource leaks will not develop.
  1335. *
  1336. */
  1337. H5_DLL hid_t H5Tdecode(const void *buf);
  1338. /**
  1339. * \ingroup H5T
  1340. *
  1341. * \brief Flushes all buffers associated with a committed datatype to disk
  1342. *
  1343. * \type_id
  1344. *
  1345. * \return \herr_t
  1346. *
  1347. * \details H5Tflush() causes all buffers associated with a committed datatype
  1348. * \p type_id to be immediately flushed to disk without removing the
  1349. * data from the cache.
  1350. *
  1351. * HDF5 does not possess full control over buffering. H5Tflush()
  1352. * flushes the internal HDF5 buffers and then asks the operating
  1353. * system (the OS) to flush the system buffers for the open
  1354. * files. After that, the OS is responsible for ensuring that the
  1355. * data is actually flushed to disk.
  1356. *
  1357. * \return \herr_t
  1358. *
  1359. * \since 1.10.0 C function introduced with this release.
  1360. *
  1361. * \see H5Dflush()
  1362. * H5Drefresh()
  1363. * H5Tflush()
  1364. * H5Grefresh()
  1365. * H5Oflush()
  1366. * H5Orefresh()
  1367. * H5Tflush()
  1368. * H5Trefresh()
  1369. * H5Fstart_swmr_write()
  1370. * H5Pget_append_flush()
  1371. * H5Pget_object_flush_cb()
  1372. * H5Pset_append_flush()
  1373. * H5Pset_object_flush_cb()
  1374. *
  1375. */
  1376. H5_DLL herr_t H5Tflush(hid_t type_id);
  1377. /**
  1378. * \ingroup H5T
  1379. *
  1380. * \brief Refreshes all buffers associated with a committed datatype
  1381. *
  1382. * \type_id
  1383. *
  1384. * \return \herr_t
  1385. *
  1386. * \details H5Trefresh() causes all buffers associated with a committed
  1387. * datatype to be cleared and immediately re-loaded with updated
  1388. * contents from disk.
  1389. *
  1390. * This function essentially closes the datatype, evicts all
  1391. * metadata associated with it from the cache, and then re-opens the
  1392. * datatype. The reopened datatype is automatically re-registered
  1393. * with the same identifier.
  1394. *
  1395. * \since 1.2.0
  1396. *
  1397. */
  1398. H5_DLL herr_t H5Trefresh(hid_t type_id);
  1399. /* Operations defined on compound datatypes */
  1400. /**
  1401. * \ingroup COMPOUND
  1402. *
  1403. * \brief Adds a new member to a compound datatype.
  1404. *
  1405. * \type_id{parent_id}
  1406. * \param[in] name Name of the field to insert
  1407. * \param[in] offset Offset in memory structure of the field to insert
  1408. * \param[in] member_id Datatype identifier of the field to insert
  1409. *
  1410. * \return \herr_t
  1411. *
  1412. * \details H5Tinsert() adds another member to the compound datatype, specified
  1413. * \p type_id.
  1414. *
  1415. * The new member has a \p name which must be unique within the
  1416. * compound datatype. The \p offset argument defines the start of the
  1417. * member in an instance of the compound datatype, and \p member_id
  1418. * is the datatype identifier of the new member.
  1419. *
  1420. * \note Members of a compound datatype do not have to be atomic
  1421. * datatypes; a compound datatype can have a member which is a
  1422. * compound datatype.
  1423. *
  1424. * \since 1.2.0
  1425. *
  1426. */
  1427. H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id);
  1428. /**
  1429. * \ingroup COMPOUND
  1430. *
  1431. * \brief Recursively removes padding from within a compound datatype
  1432. *
  1433. * \type_id
  1434. *
  1435. * \return \herr_t
  1436. *
  1437. * \details H5Tpack() recursively removes padding from within a compound
  1438. * datatype to make it more efficient (space-wise) to store that data.
  1439. *
  1440. * \since 1.2.0
  1441. *
  1442. */
  1443. H5_DLL herr_t H5Tpack(hid_t type_id);
  1444. /* Operations defined on enumeration datatypes */
  1445. /**
  1446. * \ingroup ENUM
  1447. *
  1448. * \brief Creates a new enumeration datatype
  1449. *
  1450. * \param[in] base_id Datatype identifier for the base datatype. Must be an
  1451. * integer datatype
  1452. *
  1453. * \return \hid_t{enumeration datatype}
  1454. *
  1455. * \details H5Tenum_create() creates a new enumeration datatype based on the
  1456. * specified base datatype, dtype_id, which must be an integer datatype.
  1457. *
  1458. * If a particular architecture datatype is required, a little endian
  1459. * or big endian datatype for example, use a native datatype as the
  1460. * base datatype and use H5Tconvert() on values as they are read
  1461. * from or written to a dataset.
  1462. *
  1463. * \since 1.2.0
  1464. *
  1465. */
  1466. H5_DLL hid_t H5Tenum_create(hid_t base_id);
  1467. /**
  1468. * \ingroup ENUM
  1469. *
  1470. * \brief Inserts a new enumeration datatype member
  1471. *
  1472. * \type_id{type}
  1473. * \param[in] name Name of the new member
  1474. * \param[in] value Pointer to the value of the new member
  1475. *
  1476. * \return \herr_t
  1477. *
  1478. * \details H5Tenum_insert() inserts a new enumeration datatype member into an
  1479. * enumeration datatype.
  1480. *
  1481. * \p type_id is the datatype identifier for the enumeration datatype,
  1482. * \p name is the name of the new member, and \p value points to the
  1483. * value of the new member.
  1484. *
  1485. * \p name and \p value must both be unique within \p dtype_id.
  1486. *
  1487. * \p value points to data which must be of the integer base datatype
  1488. * used when the enumeration datatype was created. If a particular
  1489. * architecture datatype is required, a little endian or big endian
  1490. * datatype for example, use a native datatype as the base datatype
  1491. * and use H5Tconvert() on values as they are read from or written
  1492. * to a dataset.
  1493. *
  1494. * \since 1.2.0
  1495. *
  1496. */
  1497. H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value);
  1498. /**
  1499. * \ingroup ENUM
  1500. *
  1501. * \brief Returns the symbol name corresponding to a specified member of an
  1502. * enumeration datatype
  1503. *
  1504. * \type_id{type}
  1505. * \param[in] value Value of the enumeration datatype
  1506. * \param[out] name Buffer for output of the symbol name
  1507. * \param[in] size Anticipated size of the symbol name, in bytes
  1508. *
  1509. * \return Returns a non-negative value if successful. Otherwise returns a
  1510. * negative value
  1511. *
  1512. * \details H5Tenum_nameof() finds the symbol name that corresponds to the
  1513. * specified \p value of the enumeration datatype \p type.
  1514. *
  1515. * At most \p size characters of the symbol \p name are copied into
  1516. * the \p name buffer. If the entire symbol name and null terminator
  1517. * do not fit in the name buffer, then as many characters as possible
  1518. * are copied (not null terminated) and the function fails.
  1519. *
  1520. * \since 1.2.0
  1521. *
  1522. */
  1523. H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name /*out*/, size_t size);
  1524. /**
  1525. * \ingroup ENUM
  1526. *
  1527. * \brief Returns the value corresponding to a specified member of an
  1528. * enumeration datatype
  1529. *
  1530. * \type_id{type}
  1531. * \param[in] name Symbol name of the enumeration datatype
  1532. * \param[out] value Buffer for the value of the enumeration datatype
  1533. *
  1534. * \return \herr_t
  1535. *
  1536. * \details H5Tenum_valueof() finds the value that corresponds to the
  1537. * specified name of the enumeration datatype \p dtype_id.
  1538. *
  1539. * Values returned in \p value will be of the enumerated type’s
  1540. * base type, that is, the datatype used by H5Tenum_create() when
  1541. * the enumerated type was created.
  1542. *
  1543. * The \p value buffer must be at least large enough to hold a value
  1544. * of that base type. If the size is unknown, you can determine it
  1545. * with H5Tget_size().
  1546. *
  1547. * \since 1.2.0
  1548. *
  1549. */
  1550. H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name, void *value /*out*/);
  1551. /* Operations defined on variable-length datatypes */
  1552. /**
  1553. * \ingroup VLEN
  1554. *
  1555. * \brief Creates a new variable-length array datatype
  1556. *
  1557. * \type_id{base_id}, the element type of the datatype to create
  1558. *
  1559. * \return \hid_t{variable-length datatype}
  1560. *
  1561. * \details H5Tvlen_create() creates a new one-dimensional array datatype of
  1562. * variable-length (VL) with the base datatype \p base_id.
  1563. *
  1564. * This one-dimensional array often represents a data sequence of the
  1565. * base datatype, such as characters for character sequences or vertex
  1566. * coordinates for polygon lists. The base type specified for the VL
  1567. * datatype can be any HDF5 datatype, including another VL datatype, a
  1568. * compound datatype, or an atomic datatype.
  1569. *
  1570. * When necessary, use H5Tget_super() to determine the base type of
  1571. * the VL datatype.
  1572. *
  1573. * The datatype identifier returned from this function should be
  1574. * released with H5Tclose() or resource leaks will result. Under
  1575. * certain circumstances, H5Dvlen_reclaim() must also be used.
  1576. *
  1577. * \attention H5Tvlen_create() cannot be used to create a variable-length
  1578. * string datatype. H5Tvlen_create() called with a string or
  1579. * character base type creates a variable-length sequence of strings
  1580. * (a variable-length, 1-dimensional array), with each element of
  1581. * the array being of the string or character base type.\n
  1582. * To create a variable-length string datatype, see \ref_vlen_strings.
  1583. *
  1584. */
  1585. H5_DLL hid_t H5Tvlen_create(hid_t base_id);
  1586. /* Operations defined on array datatypes */
  1587. /**
  1588. * \ingroup ARRAY
  1589. *
  1590. * \brief Creates an array datatype object
  1591. *
  1592. * \param[in] base_id Datatype identifier for the array base datatype
  1593. * \param[in] ndims Rank of the array
  1594. * \param[in] dim Size of each array dimension
  1595. *
  1596. * \return \hid_t{array datatype}
  1597. *
  1598. * \details H5Tarray_create2() creates a new array datatype object.\n\n
  1599. * \p base_id is the datatype of every element of the array, i.e.,
  1600. * of the number at each position in the array.
  1601. *
  1602. * \p ndims is the number of dimensions and the size of each dimension
  1603. * is specified in the array \p dim. The value of \p rank is
  1604. * currently limited to #H5S_MAX_RANK and must be greater than 0
  1605. * (zero). All dimension sizes specified in \p dim must be greater
  1606. * than 0 (zero).
  1607. *
  1608. * \since 1.8.0
  1609. *
  1610. */
  1611. H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */]);
  1612. /**
  1613. * \ingroup ARRAY
  1614. *
  1615. * \brief Returns the rank of an array datatype
  1616. *
  1617. * \type_id
  1618. *
  1619. * \return Returns the rank of the array if successful; otherwise returns a
  1620. * negative value.
  1621. *
  1622. * \details H5Tget_array_ndims() returns the rank, i.e., the number of
  1623. * dimensions, of an array datatype object.
  1624. *
  1625. * \since 1.2.0
  1626. *
  1627. */
  1628. H5_DLL int H5Tget_array_ndims(hid_t type_id);
  1629. /**
  1630. * \ingroup ARRAY
  1631. *
  1632. * \brief Retrieves sizes of array dimensions
  1633. *
  1634. * \type_id
  1635. * \param[out] dims Sizes of array dimensions
  1636. *
  1637. * \return Returns the non-negative number of dimensions of the array type
  1638. * if successful; otherwise returns a negative value.
  1639. *
  1640. * \details H5Tget_array_dims2() returns the sizes of the dimensions of the
  1641. * specified array datatype object in the array \p dims.
  1642. *
  1643. * \since 1.2.0
  1644. *
  1645. */
  1646. H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]);
  1647. /* Operations defined on opaque datatypes */
  1648. /**
  1649. * \ingroup OPAQUE
  1650. *
  1651. * \brief Tags an opaque datatype
  1652. *
  1653. * \type_id{type} of an opaque datatype
  1654. * \param[in] tag Descriptive ASCII string with which the opaque datatype is
  1655. * to be tagged
  1656. *
  1657. * \return \herr_t
  1658. *
  1659. * \details H5Tset_tag() tags an opaque datatype \p type with a descriptive
  1660. * ASCII identifier, \p tag.
  1661. *
  1662. * \p tag is intended to provide a concise description; the maximum
  1663. * size is hard-coded in the HDF5 library as 256 bytes
  1664. * (#H5T_OPAQUE_TAG_MAX).
  1665. *
  1666. * \version 1.6.5 The #H5T_OPAQUE_TAG_MAX macro constant, specifying the
  1667. * maximum size of an opaque datatype tag, was added in
  1668. * H5Tpublic.h.
  1669. *
  1670. */
  1671. H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag);
  1672. /**
  1673. * \ingroup OPAQUE
  1674. *
  1675. * \brief Gets the tag associated with an opaque datatype
  1676. *
  1677. * \type_id{type} of an opaque datatype
  1678. *
  1679. * \return Returns a pointer to an allocated string if successful; otherwise
  1680. * returns NULL.
  1681. *
  1682. * \details H5Tget_tag() returns the tag associated with the opaque datatype
  1683. * \p type.
  1684. *
  1685. * \attention The tag is returned via a pointer to an allocated string, which
  1686. * the caller must free.
  1687. *
  1688. */
  1689. H5_DLL char *H5Tget_tag(hid_t type);
  1690. /* Querying property values */
  1691. /**
  1692. * \ingroup H5T
  1693. *
  1694. * \brief Returns the base datatype from which a datatype is derived
  1695. *
  1696. * \type_id{type}
  1697. *
  1698. * \return \hid_t{datatype}
  1699. *
  1700. * \details H5Tget_super() returns the base datatype from which the datatype
  1701. * \p type_id is derived. In the case of an enumeration type, the
  1702. * return value is an integer type.
  1703. *
  1704. * The datatype identifier returned by this function must be released
  1705. * with H5Tclose() when the identifier is no longer needed so that
  1706. * resource leaks will not develop.
  1707. *
  1708. */
  1709. H5_DLL hid_t H5Tget_super(hid_t type);
  1710. /**
  1711. * \ingroup H5T
  1712. *
  1713. * \brief Returns a datatype class
  1714. *
  1715. * \type_id
  1716. *
  1717. * \return Returns the datatype class if successful; otherwise #H5T_NO_CLASS.
  1718. *
  1719. * \details H5Tget_class() returns the class of the datatype \p type_id.
  1720. * Valid class identifiers, as defined in H5Tpublic.h, are:
  1721. * \snippet this H5T_class_t_snip
  1722. *
  1723. * \note The library returns #H5T_STRING for both fixed-length and
  1724. * variable-length strings.
  1725. *
  1726. * \note Unsupported datatype: The time datatype class, #H5T_TIME,
  1727. * is not supported. If #H5T_TIME is used, the resulting data will
  1728. * be readable and modifiable only on the originating computing
  1729. * platform; it will not be portable to other platforms.
  1730. *
  1731. */
  1732. H5_DLL H5T_class_t H5Tget_class(hid_t type_id);
  1733. /**
  1734. * \ingroup H5T
  1735. *
  1736. * \brief Determines whether a datatype contains any datatypes of the given
  1737. * datatype class
  1738. *
  1739. * \type_id
  1740. * \param[in] cls Datatype class
  1741. *
  1742. * \return \htri_t
  1743. *
  1744. * \details H5Tdetect_class() determines whether the datatype specified in
  1745. * \p type_id contains any datatypes of the datatype class specified
  1746. * in \p dtype_class.
  1747. *
  1748. * This function is useful primarily in recursively examining all the
  1749. * fields and/or base types of compound, array, and variable-length
  1750. * datatypes.
  1751. *
  1752. * Valid class identifiers, as defined in H5Tpublic.h, are:
  1753. * \snippet this H5T_class_t_snip
  1754. *
  1755. * \since 1.6.0
  1756. *
  1757. */
  1758. H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls);
  1759. /**
  1760. * \ingroup H5T
  1761. *
  1762. * \brief Returns the size of a datatype
  1763. *
  1764. * \type_id
  1765. *
  1766. * \return Returns the size of the datatype in bytes if successful; otherwise,
  1767. * returns 0.
  1768. *
  1769. * \details H5Tget_size() returns the size of a datatype in bytes.
  1770. * \li For atomic datatypes, array datatypes, compound datatypes, and
  1771. * other datatypes of a constant size, the returned value is the
  1772. * size of the actual datatype in bytes.
  1773. * \li For variable-length string datatypes the returned value is
  1774. * the size of the pointer to the actual string, or \c sizeof(\c
  1775. * char \c *). This function does not return the size of actual
  1776. * variable-length string data.
  1777. * \li For variable-length sequence datatypes (see H5Tvlen_create()),
  1778. * the returned value is the size of the \p hvl_t struct, or \c
  1779. * sizeof(\p hvl_t). The \p hvl_t struct contains a pointer to the
  1780. * actual data and a size value. This function does not return the
  1781. * size of actual variable-length sequence data.
  1782. *
  1783. * \see H5Tset_size()
  1784. *
  1785. * \since 1.2.0
  1786. */
  1787. H5_DLL size_t H5Tget_size(hid_t type_id);
  1788. /**
  1789. * \ingroup ATOM
  1790. *
  1791. * \brief Returns the byte order of an atomic datatype
  1792. *
  1793. * \type_id
  1794. *
  1795. * \return Returns a byte order constant if successful; otherwise returns
  1796. * #H5T_ORDER_ERROR (-1)
  1797. *
  1798. * \details H5Tget_order() returns the byte order of an atomic datatype.
  1799. * Possible return values are:
  1800. * \snippet this H5T_order_t_snip
  1801. * Members of a compound datatype need not have the same byte
  1802. * order. If members of a compound datatype have more than one of
  1803. * little endian, big endian, or VAX byte order, H5Tget_order() will
  1804. * return #H5T_ORDER_MIXED for the compound datatype. A byte order of
  1805. * #H5T_ORDER_NONE will, however, be ignored; for example, if one or
  1806. * more members of a compound datatype have byte order #H5T_ORDER_NONE
  1807. * but all other members have byte order #H5T_ORDER_LE, H5Tget_order()
  1808. * will return #H5T_ORDER_LE for the compound datatype.
  1809. *
  1810. * \since 1.2.0
  1811. *
  1812. */
  1813. H5_DLL H5T_order_t H5Tget_order(hid_t type_id);
  1814. /**
  1815. * \ingroup ATOM
  1816. *
  1817. * \brief Returns the precision of an atomic datatype
  1818. *
  1819. * \type_id
  1820. *
  1821. * \return Returns the number of significant bits if successful; otherwise 0
  1822. *
  1823. * \details H5Tget_precision() returns the precision of an atomic datatype
  1824. * (for example, integer or float) or a datatype whose base (parent)
  1825. * type is an atomic type (for example, array, enum and variable
  1826. * length). The precision is the number of significant bits which,
  1827. * unless padding is present, is 8 times larger than the value
  1828. * returned by H5Tget_size().
  1829. *
  1830. * \since 1.2.0
  1831. *
  1832. */
  1833. H5_DLL size_t H5Tget_precision(hid_t type_id);
  1834. /**
  1835. * \ingroup ATOM
  1836. *
  1837. * \brief Retrieves the bit offset of the first significant bit
  1838. *
  1839. * \type_id
  1840. *
  1841. * \return Returns an offset value if successful; otherwise returns a
  1842. * negative value.
  1843. *
  1844. * \details H5Tget_offset() retrieves the bit offset of the first significant
  1845. * bit. The significant bits of an atomic datum can be offset from the
  1846. * beginning of the memory for that datum by an amount of padding. The
  1847. * 'offset' property specifies the number of bits of padding that
  1848. * appear to the "right of" the value. That is, if we have a 32-bit
  1849. * datum with 16-bits of precision having the value 0x1122 then it
  1850. * will be laid out in memory as (from small byte address toward
  1851. * larger byte addresses):
  1852. * \code{.unparsed}
  1853. * 0: [ pad] [0x11] [0x22] [ pad]
  1854. * 1: [ pad] [0x22] [0x11] [ pad]
  1855. * 2: [0x11] [ pad] [ pad] [0x22]
  1856. * 3: [0x22] [ pad] [ pad] [0x11]
  1857. * \endcode
  1858. *
  1859. * \since 1.2.0
  1860. *
  1861. */
  1862. H5_DLL int H5Tget_offset(hid_t type_id);
  1863. /**
  1864. * \ingroup ATOM
  1865. *
  1866. * \brief Retrieves the padding type of the least and most-significant bit padding
  1867. *
  1868. * \type_id
  1869. * \param[out] lsb Buffer for the least-significant bit padding type
  1870. * \param[out] msb Buffer for the most-significant bit padding type
  1871. *
  1872. * \return \herr_t
  1873. *
  1874. * \details H5Tget_pad() retrieves the padding type of the least and
  1875. * most-significant bit padding. Valid padding types are:
  1876. * \snippet this H5T_pad_t_snip
  1877. *
  1878. * \since 1.2.0
  1879. *
  1880. */
  1881. H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb /*out*/, H5T_pad_t *msb /*out*/);
  1882. /**
  1883. * \ingroup ATOM
  1884. *
  1885. * \brief Retrieves the sign type for an integer type
  1886. *
  1887. * \type_id
  1888. *
  1889. * \return Returns a valid sign type if successful; otherwise #H5T_SGN_ERROR (-1)
  1890. *
  1891. * \details H5Tget_sign() retrieves the sign type for an integer type.
  1892. * Valid types are:
  1893. * \snippet this H5T_sign_t_snip
  1894. *
  1895. * \since 1.2.0
  1896. *
  1897. */
  1898. H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id);
  1899. /**
  1900. * \ingroup ATOM
  1901. *
  1902. * \brief Retrieves floating point datatype bit field information
  1903. *
  1904. * \type_id
  1905. * \param[out] spos Pointer to location to return floating-point sign bit
  1906. * \param[out] epos Pointer to location to return exponent bit-position
  1907. * \param[out] esize Pointer to location to return size of exponent in bits
  1908. * \param[out] mpos Pointer to location to return mantissa bit-position
  1909. * \param[out] msize Pointer to location to return size of mantissa in bits
  1910. *
  1911. * \return \herr_t
  1912. *
  1913. * \details H5Tget_fields() retrieves information about the locations of
  1914. * the various bit fields of a floating point datatype. The field
  1915. * positions are bit positions in the significant region of the
  1916. * datatype. Bits are numbered with the least significant bit number
  1917. * zero. Any (or even all) of the arguments can be null pointers.
  1918. *
  1919. * \since 1.2.0
  1920. *
  1921. */
  1922. H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos /*out*/, size_t *epos /*out*/, size_t *esize /*out*/,
  1923. size_t *mpos /*out*/, size_t *msize /*out*/);
  1924. /**
  1925. * \ingroup ATOM
  1926. *
  1927. * \brief Retrieves the exponent bias of a floating-point type
  1928. *
  1929. * \type_id
  1930. *
  1931. * \return Returns the bias if successful and 0, otherwise.
  1932. *
  1933. * \details H5Tget_ebias() retrieves the exponent bias of a floating-point type.
  1934. *
  1935. * \since 1.2.0
  1936. *
  1937. */
  1938. H5_DLL size_t H5Tget_ebias(hid_t type_id);
  1939. /**
  1940. * --------------------------------------------------------------------------
  1941. * \ingroup ATOM
  1942. *
  1943. * \brief Retrieves mantissa normalization of a floating-point datatype
  1944. *
  1945. * \type_id
  1946. *
  1947. * \return Returns a valid normalization type if successful; otherwise
  1948. * returns #H5T_NORM_ERROR (-1)
  1949. *
  1950. * \details H5Tget_norm() retrieves the mantissa normalization of a
  1951. * floating-point datatype. Valid normalization types are:
  1952. * \snippet this H5T_norm_t_snip
  1953. *
  1954. * \since 1.2.0
  1955. *
  1956. */
  1957. H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id);
  1958. /**
  1959. * \ingroup ATOM
  1960. *
  1961. * \brief Retrieves the internal padding type for unused bits in floating-point
  1962. * datatypes
  1963. *
  1964. * \type_id
  1965. *
  1966. * \return Returns a valid padding type if successful; otherwise returns
  1967. * #H5T_PAD_ERROR (-1).
  1968. *
  1969. * \details H5Tget_inpad() retrieves the internal padding type for unused
  1970. * bits in floating-point datatypes. Valid padding types are:
  1971. * \snippet this H5T_pad_t_snip
  1972. *
  1973. * \since 1.2.0
  1974. *
  1975. */
  1976. H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id);
  1977. /**
  1978. * \ingroup ATOM
  1979. *
  1980. * \brief Retrieves the type of padding used for a string datatype
  1981. *
  1982. * \type_id
  1983. *
  1984. * \return Returns a valid string of the padding if successful; otherwise
  1985. * returns #H5T_STR_ERROR (-1)
  1986. *
  1987. * \details H5Tget_strpad() retrieves the type of padding used for a string
  1988. * datatype.
  1989. *
  1990. * The string padding type is set with H5Tset_strpad(). Possible
  1991. * values returned are:
  1992. * \str_pad_type
  1993. *
  1994. * \since 1.2.0
  1995. *
  1996. */
  1997. H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id);
  1998. /**
  1999. * \ingroup COMPOUND ENUM
  2000. *
  2001. * \brief Retrieves the number of elements in a compound or enumeration datatype
  2002. *
  2003. * \type_id
  2004. *
  2005. * \return Returns the number of elements if successful; otherwise returns a
  2006. * negative value.
  2007. *
  2008. * \details H5Tget_nmembers() retrieves the number of fields in a compound
  2009. * datatype or the number of members of an enumeration datatype.
  2010. *
  2011. * \since 1.2.0
  2012. *
  2013. */
  2014. H5_DLL int H5Tget_nmembers(hid_t type_id);
  2015. /**
  2016. * \ingroup COMPOUND ENUM
  2017. *
  2018. * \brief Retrieves the name of a compound or enumeration datatype member
  2019. *
  2020. * \type_id
  2021. * \param[in] membno Zero-based index of the field or element
  2022. *
  2023. * \return Returns a valid pointer to a string allocated with malloc() if
  2024. * successful; otherwise returns NULL.
  2025. *
  2026. * \details H5Tget_member_name() retrieves the name of a field of a compound
  2027. * datatype or an element of an enumeration datatype.
  2028. *
  2029. * The index of the target field or element is specified in \p
  2030. * member_no. Compound datatype fields and enumeration datatype
  2031. * elements are stored in no particular order with index values of
  2032. * 0 through N-1, where N is the value returned by H5Tget_nmembers().
  2033. *
  2034. * The HDF5 library allocates a buffer to receive the name of
  2035. * the field. The caller must subsequently free the buffer with
  2036. * H5free_memory().
  2037. *
  2038. * \since 1.2.0
  2039. *
  2040. */
  2041. H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno);
  2042. /**
  2043. * \ingroup COMPOUND ENUM
  2044. *
  2045. * \brief Retrieves the index of a compound or enumeration datatype member
  2046. *
  2047. * \type_id
  2048. * \param[in] name Name of the field or member
  2049. *
  2050. * \return \herr_t
  2051. *
  2052. * \details H5Tget_member_index() retrieves the index of a field of a compound
  2053. * datatype or an element of an enumeration datatype.
  2054. *
  2055. * The name of the target field or element is specified by \p name.
  2056. *
  2057. * Fields are stored in no particular order with index values of 0
  2058. * through N-1, where N is the value returned by H5Tget_nmembers() .
  2059. *
  2060. * \since 1.2.0
  2061. *
  2062. */
  2063. H5_DLL int H5Tget_member_index(hid_t type_id, const char *name);
  2064. /**
  2065. * \ingroup COMPOUND
  2066. *
  2067. * \brief Retrieves the offset of a field of a compound datatype
  2068. *
  2069. * \type_id
  2070. * \param[in] membno Zero-based index of the field or element
  2071. *
  2072. * \return Returns the byte offset of the field if successful; otherwise
  2073. * returns 0 (zero).
  2074. *
  2075. * \details H5Tget_member_offset() retrieves the byte offset of the beginning
  2076. * of a field within a compound datatype with respect to the beginning
  2077. * of the compound datatype datum.
  2078. *
  2079. * Note that zero is a valid offset and that this function will fail
  2080. * only if a call to H5Tget_member_class() fails with the same arguments.
  2081. *
  2082. * \version 1.6.4 \p member_no parameter type changed to unsigned.
  2083. *
  2084. * \since 1.2.0
  2085. *
  2086. */
  2087. H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno);
  2088. /**
  2089. * \ingroup COMPOUND
  2090. *
  2091. * \brief Returns datatype class of compound datatype member
  2092. *
  2093. * \type_id
  2094. * \param[in] membno Zero-based index of the field or element
  2095. *
  2096. * \return Returns the datatype class, a non-negative value, if successful;
  2097. * otherwise returns a negative value.
  2098. *
  2099. * \details Given a compound datatype, \p dtype_id, H5Tget_member_class()
  2100. * returns the datatype class of the member specified by \p member_no.
  2101. *
  2102. * Valid class identifiers, as defined in H5Tpublic.h, are:
  2103. * \snippet this H5T_class_t_snip
  2104. *
  2105. * \since 1.2.0
  2106. *
  2107. */
  2108. H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno);
  2109. /**
  2110. * \ingroup COMPOUND
  2111. *
  2112. * \brief Returns the datatype of the specified member
  2113. *
  2114. * \type_id
  2115. * \param[in] membno Zero-based index of the field or element
  2116. *
  2117. * \return Returns the identifier of a copy of the datatype of the field if
  2118. * successful; otherwise returns a negative value.
  2119. *
  2120. * \details H5Tget_member_type() returns the datatype of the specified member.
  2121. * The caller should invoke H5Tclose() to release resources associated
  2122. * with the type.
  2123. *
  2124. * \version 1.6.4 \p membno parameter type changed to unsigned.
  2125. *
  2126. * \since 1.2.0
  2127. *
  2128. */
  2129. H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno);
  2130. /**
  2131. * \ingroup ENUM
  2132. *
  2133. * \brief Returns the value of an enumeration datatype member
  2134. *
  2135. * \type_id
  2136. * \param[in] membno Number of the enumeration datatype member
  2137. * \param[out] value Buffer for the value of the enumeration datatype member
  2138. *
  2139. * \return \herr_t
  2140. *
  2141. * \details H5Tget_member_value() returns the value of the enumeration datatype
  2142. * member \p member_no.
  2143. *
  2144. * The member value is returned in a user-supplied buffer pointed to
  2145. * by \p value. Values returned in \p value will be of the enumerated
  2146. * type’s base type, that is, the datatype used by H5Tenum_create()
  2147. * when the enumerated type was created.
  2148. *
  2149. * The value buffer must be at least large enough to hold a value
  2150. * of that base type. If the size is unknown, you can determine it
  2151. * with H5Tget_size().
  2152. *
  2153. * \since 1.2.0
  2154. *
  2155. */
  2156. H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value /*out*/);
  2157. /**
  2158. * \ingroup ATOM
  2159. *
  2160. * \brief Retrieves the character set type of a string datatype
  2161. *
  2162. * \type_id
  2163. *
  2164. * \return Returns a valid character set type if successful; otherwise
  2165. * #H5T_CSET_ERROR (-1).
  2166. *
  2167. * \details H5Tget_cset() retrieves the character set type of a string datatype.
  2168. * Valid character set types are:
  2169. * \csets
  2170. *
  2171. * \since 1.2.0
  2172. *
  2173. */
  2174. H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id);
  2175. /**
  2176. * \ingroup ATOM
  2177. *
  2178. * \brief Determines whether datatype is a variable-length string
  2179. *
  2180. * \type_id
  2181. *
  2182. * \return Returns:
  2183. * \li a positive value if the specified datatype is a variable-length
  2184. * string
  2185. * \li 0 if the specified datatype is not a variable-length string
  2186. * \li a negative value when the function fails
  2187. *
  2188. * \details H5Tis_variable_str() determines whether the datatype identified
  2189. * by \p dtype_id is a variable-length string.
  2190. *
  2191. * This function can be used to distinguish between fixed and
  2192. * variable-length string datatypes.
  2193. *
  2194. * \since 1.6.0
  2195. *
  2196. */
  2197. H5_DLL htri_t H5Tis_variable_str(hid_t type_id);
  2198. /**
  2199. * \ingroup H5T
  2200. *
  2201. * \brief Returns the native datatype identifier of a specified datatype
  2202. *
  2203. * \type_id
  2204. * \param[in] direction Direction of search
  2205. *
  2206. * \return \hid_t{native datatype}
  2207. *
  2208. * \details H5Tget_native_type() returns the equivalent native datatype
  2209. * identifier for the datatype specified by \p type_id.
  2210. *
  2211. * H5Tget_native_type() is designed primarily to facilitate use of
  2212. * the H5Dread() function, for which users otherwise must undertake a
  2213. * multi-step process to determine the native datatype of a dataset
  2214. * prior to reading it into memory. This function can be used for
  2215. * the following purposes:
  2216. *
  2217. * \li To determine the native datatype of an atomic datatype
  2218. * \li To determine the base datatype of an array, enumerated, or
  2219. * variable-length datatype
  2220. * \li To determine the native atomic datatypes of the individual
  2221. * components of a compound datatype
  2222. *
  2223. * For example, if \p type_id is a compound datatype, the returned
  2224. * datatype identifier will be for a similar compound datatype with
  2225. * each element converted to the corresponding native datatype;
  2226. * nested compound datatypes will be unwound. If \p type_id is an
  2227. * array, the returned datatype identifier will be for the native
  2228. * datatype of a single array element.
  2229. *
  2230. * H5Tget_native_type() selects the first matching native datatype
  2231. * from the following list:
  2232. *
  2233. * \li #H5T_NATIVE_CHAR
  2234. * \li #H5T_NATIVE_SHORT
  2235. * \li #H5T_NATIVE_INT
  2236. * \li #H5T_NATIVE_LONG
  2237. * \li #H5T_NATIVE_LLONG
  2238. *
  2239. * \li #H5T_NATIVE_UCHAR
  2240. * \li #H5T_NATIVE_USHORT
  2241. * \li #H5T_NATIVE_UINT
  2242. * \li #H5T_NATIVE_ULONG
  2243. * \li #H5T_NATIVE_ULLONG
  2244. *
  2245. * \li #H5T_NATIVE_FLOAT
  2246. * \li #H5T_NATIVE_DOUBLE
  2247. * \li #H5T_NATIVE_LDOUBLE
  2248. *
  2249. * \li #H5T_NATIVE_B8
  2250. * \li #H5T_NATIVE_B16
  2251. * \li #H5T_NATIVE_B32
  2252. * \li #H5T_NATIVE_B64
  2253. *
  2254. * The direction parameter indicates the order in which the library
  2255. * searches for a native datatype match. Valid values for direction
  2256. * are as follows:
  2257. * \snippet this H5T_direction_t_snip
  2258. *
  2259. * H5Tget_native_type() is designed primarily for use with integer,
  2260. * floating point, and bitfield datatypes. String, time, opaque, and
  2261. * reference datatypes are returned as a copy of dtype_id. See above
  2262. * for compound, array, enumerated, and variable-length datatypes.
  2263. *
  2264. * The identifier returned by H5Tget_native_type() should eventually
  2265. * be closed by calling H5Tclose() to release resources.
  2266. *
  2267. * \note Please note that a datatype is actually an object
  2268. * identifier or handle returned from opening the datatype. It
  2269. * is not persistent and its value can be different from one HDF5
  2270. * session to the next.
  2271. *
  2272. * \note H5Tequal() can be used to compare datatypes.
  2273. *
  2274. * \note HDF5 High Level APIs that may also be of interest are: H5LTdtype_to_text()
  2275. * creates a text description of a datatype. H5LTtext_to_dtype() creates an
  2276. * HDF5 datatype given a text description.
  2277. *
  2278. * \since 1.6.0
  2279. *
  2280. */
  2281. H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction);
  2282. /* Setting property values */
  2283. /**
  2284. * \ingroup H5T
  2285. *
  2286. * \brief Sets size for a datatype.
  2287. *
  2288. * \type_id
  2289. * \param[in] size New datatype size is bytes or #H5T_VARIABLE
  2290. *
  2291. * \return \herr_t
  2292. *
  2293. * \details H5Tset_size() sets the total size, \p size, in bytes, for a
  2294. * datatype.
  2295. *
  2296. * \p size must have a positive value, unless it is passed in as
  2297. * #H5T_VARIABLE and the datatype is a string datatype.
  2298. *
  2299. * \li Numeric datatypes: If the datatype is atomic and the size
  2300. * is decreased so that significant bits of the datatype extend
  2301. * beyond the edge of the new size, then the offset property of the
  2302. * datatype is decreased toward zero. If the offset becomes zero
  2303. * and the significant bits of the datatype still hang over the edge
  2304. * of the new size, then the number of significant bits is decreased.
  2305. *
  2306. * \li String or character datatypes: The size set for a string
  2307. * datatype should include space for the null-terminator character,
  2308. * otherwise it will not be stored on (or retrieved from)
  2309. * disk. Adjusting the size of a string automatically sets the
  2310. * precision to \p 8*size.
  2311. *
  2312. * \li Variable-length string datatypes: If \p dtype_id is a
  2313. * variable-length string, size must normally be set to #H5T_VARIABLE.
  2314. * See \ref_vlen_strings.
  2315. *
  2316. * \li Compound datatypes: This function may be used to increase or
  2317. * decrease the size of a compound datatype, but the function will
  2318. * fail if the new size is too small to accommodate all member fields.
  2319. *
  2320. * \li Ineligible datatypes: This function cannot be used with
  2321. * enumerated datatypes (#H5T_ENUM), array datatypes (#H5T_ARRAY),
  2322. * variable-length array datatypes (#H5T_VLEN), or reference datatypes
  2323. * (#H5T_REFERENCE).
  2324. *
  2325. * \see H5Tget_size()
  2326. *
  2327. * \since 1.2.0
  2328. *
  2329. */
  2330. H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size);
  2331. /**
  2332. * \ingroup ATOM
  2333. *
  2334. * \brief Sets the byte order of a datatype
  2335. *
  2336. * \type_id
  2337. * \param[in] order Byte order constant
  2338. *
  2339. * \return \herr_t
  2340. *
  2341. * \details H5Tset_order() sets the byte order of a datatype.\n
  2342. * Byte order can currently be set to any of the following:
  2343. * \snippet this H5T_order_t_snip
  2344. * #H5T_ORDER_MIXED (3) is a valid value for order only when
  2345. * returned by the function H5Tget_order(); it cannot be set with
  2346. * H5Tset_order().
  2347. *
  2348. * #H5T_ORDER_NONE (4) is a valid value for order, but it has no
  2349. * effect. It is valid only for fixed-length strings and object and
  2350. * region references and specifies “no particular order.”
  2351. *
  2352. * The byte order of a derived datatype is initially the same as
  2353. * that of the parent type, but can be changed with H5Tset_order().
  2354. *
  2355. * This function cannot be used with a datatype after it has been
  2356. * committed.
  2357. *
  2358. * \note Special considerations:
  2359. * \li ENUM datatypes: Byte order must be set before any member on
  2360. * an ENUM is defined.
  2361. * \li Compound datatypes: Byte order is set individually on each member
  2362. * of a compound datatype; members of a compound datatype need not
  2363. * have the same byte order.
  2364. * \li Opaque datatypes: Byte order can be set but has no effect.
  2365. *
  2366. * \since 1.2.0
  2367. *
  2368. */
  2369. H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order);
  2370. /**
  2371. * \ingroup ATOM
  2372. *
  2373. * \brief Sets the precision of an atomic datatype
  2374. *
  2375. * \type_id
  2376. * \param[in] prec Number of bits of precision for datatype
  2377. *
  2378. * \return \herr_t
  2379. *
  2380. * \details H5Tset_precision() sets the precision of an atomic datatype. The
  2381. * precision is the number of significant bits which, unless
  2382. * padding is present, is 8 times larger than the value returned
  2383. * by H5Tget_size().
  2384. *
  2385. * If the precision is increased then the offset is decreased and
  2386. * then the size is increased to insure that significant bits do not
  2387. * "hang over" the edge of the datatype.
  2388. *
  2389. * Changing the precision of an #H5T_STRING automatically changes
  2390. * the size as well. The precision must be a multiple of 8.
  2391. *
  2392. * When decreasing the precision of a floating point type, set the
  2393. * locations and sizes of the sign, mantissa, and exponent fields
  2394. * first.
  2395. *
  2396. * \since 1.2.0
  2397. *
  2398. */
  2399. H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec);
  2400. /**
  2401. * \ingroup ATOM
  2402. *
  2403. * \brief Sets the bit offset of the first significant bit
  2404. *
  2405. * \type_id
  2406. * \param[in] offset Offset of first significant bit
  2407. *
  2408. * \return \herr_t
  2409. *
  2410. * \details H5Tset_offset() sets the bit offset of the first significant
  2411. * bit. The significant bits of an atomic datum can be offset from
  2412. * the beginning of the memory for that datum by an amount of
  2413. * padding. The offset property specifies the number of bits of
  2414. * padding that appear “to the right of” the value. That is,
  2415. * if we have a 32-bit datum with 16-bits of precision having the
  2416. * value 0x1122, then it will be laid out in memory as (from small
  2417. * byte address toward larger byte addresses):
  2418. * \code{.unparsed}
  2419. * 0: [ pad] [0x11] [0x22] [ pad]
  2420. * 1: [ pad] [0x22] [0x11] [ pad]
  2421. * 2: [0x11] [ pad] [ pad] [0x22]
  2422. * 3: [0x22] [ pad] [ pad] [0x11]
  2423. * \endcode
  2424. * If the offset is incremented then the total size is incremented
  2425. * also if necessary to prevent significant bits of the value from
  2426. * hanging over the edge of the datatype.
  2427. *
  2428. * The offset of an #H5T_STRING cannot be set to anything but zero.
  2429. *
  2430. * \since 1.2.0
  2431. *
  2432. */
  2433. H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset);
  2434. /**
  2435. * \ingroup ATOM
  2436. *
  2437. * \brief Sets the least and most-significant bits padding types
  2438. *
  2439. * \type_id
  2440. * \param[in] lsb Padding type for least-significant bits
  2441. * \param[in] msb Padding type for most-significant bits
  2442. *
  2443. * \return \herr_t
  2444. *
  2445. * \details H5Tset_pad() sets the least and most-significant bits padding types.
  2446. * Available values are:
  2447. * \padding_type
  2448. *
  2449. * \since 1.2.0
  2450. *
  2451. */
  2452. H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb);
  2453. /**
  2454. * \ingroup ATOM
  2455. *
  2456. * \brief Sets the sign property for an integer type
  2457. *
  2458. * \type_id
  2459. * \param[in] sign Sign type
  2460. *
  2461. * \return \herr_t
  2462. *
  2463. * \details H5Tset_sign() sets the sign property for an integer type:
  2464. * \sign_prop
  2465. *
  2466. * \since 1.2.0
  2467. *
  2468. */
  2469. H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign);
  2470. /**
  2471. * \ingroup ATOM
  2472. *
  2473. * \brief Sets locations and sizes of floating point bit fields
  2474. *
  2475. * \type_id
  2476. * \param[in] spos Sign position, i.e., the bit offset of the floating-point
  2477. * sign bit
  2478. * \param[in] epos Exponent bit position
  2479. * \param[in] esize Size of exponent in bits
  2480. * \param[in] mpos Mantissa bit position
  2481. * \param[in] msize Size of mantissa in bits
  2482. *
  2483. * \return \herr_t
  2484. *
  2485. * \details H5Tset_fields() sets the locations and sizes of the various
  2486. * floating-point bit fields. The field positions are bit positions
  2487. * in the significant region of the datatype. Bits are numbered with
  2488. * the least significant bit number zero.
  2489. *
  2490. * Fields are not allowed to extend beyond the number of bits of
  2491. * precision, nor are they allowed to overlap with one another.
  2492. *
  2493. * \since 1.2.0
  2494. *
  2495. */
  2496. H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize);
  2497. /**
  2498. * \ingroup ATOM
  2499. *
  2500. * \brief Sets the exponent bias of a floating-point type
  2501. *
  2502. * \type_id
  2503. * \param[in] ebias Exponent bias value
  2504. *
  2505. * \return \herr_t
  2506. *
  2507. * \details H5Tset_ebias() sets the exponent bias of a floating-point type.
  2508. *
  2509. * \since 1.2.0
  2510. *
  2511. */
  2512. H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias);
  2513. /**
  2514. * \ingroup ATOM
  2515. *
  2516. * \brief Sets the mantissa normalization of a floating-point datatype
  2517. *
  2518. * \type_id
  2519. * \param[in] norm Mantissa normalization type
  2520. *
  2521. * \return \herr_t
  2522. *
  2523. * \details H5Tset_norm() sets the mantissa normalization of a floating-point
  2524. * datatype. Valid normalization types are:
  2525. * \snippet this H5T_norm_t_snip
  2526. *
  2527. * \since 1.2.0
  2528. *
  2529. */
  2530. H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm);
  2531. /**
  2532. * \ingroup ATOM
  2533. *
  2534. * \brief Fills unused internal floating-point bits
  2535. *
  2536. * \type_id
  2537. * \param[in] pad Padding type
  2538. *
  2539. * \return \herr_t
  2540. *
  2541. * \details H5Tset_inpad() If any internal bits of a floating point-type are
  2542. * unused (that is, those significant bits which are not part of the
  2543. * sign, exponent, or mantissa), then H5Tset_inpad() will be filled
  2544. * according to the value of the padding value property inpad. Valid
  2545. * padding types are:
  2546. * \snippet this H5T_pad_t_snip
  2547. *
  2548. * \since 1.2.0
  2549. *
  2550. */
  2551. H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad);
  2552. /**
  2553. * \ingroup ATOM
  2554. *
  2555. * \brief Sets character set to be used in a string or character datatype
  2556. *
  2557. * \type_id
  2558. * \param[in] cset Character set type
  2559. *
  2560. * \return \herr_t
  2561. *
  2562. * \details H5Tset_cset() sets the character set to be used in a dataset with
  2563. * a string or character datatype.
  2564. *
  2565. * Valid values for cset include the following:
  2566. * \csets
  2567. * For example, if the character set for the datatype \p type_id is set
  2568. * to #H5T_CSET_UTF8, string or character data of datatype dtype_id
  2569. * will be encoded using the UTF-8 Unicode character set.
  2570. *
  2571. * ASCII and UTF-8 Unicode are the only currently supported character
  2572. * encodings. Extended ASCII encodings (for example, ISO 8859) are
  2573. * not supported. This encoding policy is not enforced by the HDF5
  2574. * library. Using encodings other than ASCII and UTF-8 can lead to
  2575. * compatibility and usability problems.
  2576. *
  2577. * Note that H5Tset_cset() sets the character set for a character or
  2578. * string datatype while H5Pset_char_encoding() sets the character
  2579. * set used for an HDF5 link or attribute name.
  2580. *
  2581. * \since 1.2.0
  2582. *
  2583. */
  2584. H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset);
  2585. /**
  2586. * \ingroup ATOM
  2587. *
  2588. * \brief Defines the type of padding used for character strings
  2589. *
  2590. * \type_id
  2591. * \param[in] strpad String padding type
  2592. *
  2593. * \return \herr_t
  2594. *
  2595. * \details H5Tset_strpad() defines the type of padding used for a string
  2596. * datatype.
  2597. *
  2598. * The method used to store character strings differs with the
  2599. * programming language. C usually null terminates strings while
  2600. * Fortran left-justifies and space-pads strings.
  2601. *
  2602. * Valid values of \p strpad are as follows:
  2603. * \str_pad_type
  2604. * When converting from a longer string to a shorter string, the
  2605. * behavior is as follows. If the shorter string is #H5T_STR_NULLPAD
  2606. * or #H5T_STR_SPACEPAD, then the string is simply truncated. If
  2607. * the short string is #H5T_STR_NULLTERM, it is truncated and a null
  2608. * terminator is appended.
  2609. *
  2610. * When converting from a shorter string to a longer string, the
  2611. * longer string is padded on the end by appending nulls or spaces.
  2612. *
  2613. * \since 1.2.0
  2614. *
  2615. */
  2616. H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad);
  2617. /**
  2618. * --------------------------------------------------------------------------
  2619. * \ingroup CONV
  2620. *
  2621. * \brief Converts data from one specified datatype to another
  2622. *
  2623. * \type_id{src_id} of source datatype
  2624. * \type_id{dst_id} of destination datatype
  2625. * \param[in] nelmts Size of array \p buf
  2626. * \param[in,out] buf Array containing pre- and post-conversion values
  2627. * \param[in] background Optional background buffer
  2628. * \dxpl_id{plist_id}
  2629. *
  2630. * \return \herr_t
  2631. *
  2632. * \details H5Tconvert() converts \p nelmts elements from a source datatype,
  2633. * specified by \p src_id, to a destination datatype, \p dst_id. The
  2634. * source elements are packed in \p buf and on return the destination
  2635. * elements will be packed in \p buf. That is, the conversion is
  2636. * performed in place.
  2637. *
  2638. * The optional background buffer is for use with compound datatypes.
  2639. * It is an array of \p nelmts values for the destination datatype
  2640. * which can then be merged with the converted values to recreate the
  2641. * compound datatype. For instance, background might be an array of
  2642. * structs with the \c a and \c b fields already initialized and the
  2643. * conversion of buf supplies the \c c and \c d field values.
  2644. *
  2645. * The parameter \p plist_id contains the dataset transfer property list
  2646. * identifier which is passed to the conversion functions. As of
  2647. * Release 1.2, this parameter is only used to pass along the
  2648. * variable-length datatype custom allocation information.
  2649. *
  2650. * \note H5Tconvert() will not resize the buffer \p buf; it must be large
  2651. * enough to hold the larger of the input and output data.
  2652. *
  2653. * \version 1.6.3 \p nelmts parameter type changed to size_t.
  2654. * \version 1.4.0 \p nelmts parameter type changed to hsize_t.
  2655. *
  2656. */
  2657. H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background,
  2658. hid_t plist_id);
  2659. /**
  2660. * \ingroup VLEN
  2661. *
  2662. * \brief Reclaims the variable length (VL) datatype memory buffers
  2663. *
  2664. * \type_id
  2665. * \space_id
  2666. * \dxpl_id{plist_id} used to create the buffer
  2667. * \param[in] buf Pointer to the buffer to be reclaimed
  2668. *
  2669. * \return \herr_t
  2670. *
  2671. * \details H5Treclaim() reclaims memory buffers created to store VL datatypes.
  2672. * It only frees the variable length data in the selection defined in
  2673. * the dataspace specified by \p space_id. The dataset transfer
  2674. * property list \p plist_id is required to find the correct
  2675. * allocation and/or free methods for the variable-length data in the
  2676. * buffer.
  2677. *
  2678. * \since 1.12.0
  2679. *
  2680. */
  2681. H5_DLL herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf);
  2682. /* Symbols defined for compatibility with previous versions of the HDF5 API.
  2683. *
  2684. * Use of these symbols is deprecated.
  2685. */
  2686. /* API Wrappers for async routines */
  2687. /* (Must be defined _after_ the function prototype) */
  2688. /* (And must only defined when included in application code, not the library) */
  2689. #ifndef H5T_MODULE
  2690. #define H5Tcommit_async(...) H5Tcommit_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
  2691. #define H5Topen_async(...) H5Topen_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
  2692. #define H5Tclose_async(...) H5Tclose_async(__FILE__, __func__, __LINE__, __VA_ARGS__)
  2693. /* Define "wrapper" versions of function calls, to allow compile-time values to
  2694. * be passed in by language wrapper or library layer on top of HDF5. */
  2695. #define H5Tcommit_async_wrap H5_NO_EXPAND(H5Tcommit_async)
  2696. #define H5Topen_async_wrap H5_NO_EXPAND(H5Topen_async)
  2697. #define H5Tclose_async_wrap H5_NO_EXPAND(H5Tclose_async)
  2698. #endif /* H5T_MODULE */
  2699. #ifndef H5_NO_DEPRECATED_SYMBOLS
  2700. /* Macros */
  2701. /* Typedefs */
  2702. /* Function prototypes */
  2703. /**
  2704. * \ingroup H5T
  2705. *
  2706. * \brief Commits a transient datatype to a file, creating a new named datatype
  2707. *
  2708. * \fg_loc_id
  2709. * \param[in] name Name given to committed datatype
  2710. * \param[in] type_id Identifier of datatype to be committed
  2711. *
  2712. * \return \herr_t
  2713. *
  2714. * \deprecated This function has been renamed from H5Tcommit() and is
  2715. * deprecated in favor of the macro #H5Tcommit or the function
  2716. * H5Tcommit2().
  2717. *
  2718. * \details H5Tcommit1() commits the transient datatype (not immutable) to
  2719. * a file, turning it into a named datatype.
  2720. *
  2721. * The datatype \p dtype_id is committed as a named datatype at the
  2722. * location \p loc_id, which is either a file or group identifier,
  2723. * with the name \p name.
  2724. *
  2725. * \p name can be a relative path based at \p loc_id or an absolute
  2726. * path from the root of the file. Use of this function requires
  2727. * that any intermediate groups specified in the path already exist.
  2728. *
  2729. * As is the case for any object in a group, the length of the name
  2730. * of a named datatype is not limited.
  2731. *
  2732. * See H5Tcommit_anon() for a discussion of the differences between
  2733. * H5Tcommit() and H5Tcommit_anon().
  2734. *
  2735. * This function will not accept a datatype that cannot actually
  2736. * hold data. This currently includes compound datatypes with no
  2737. * fields and enumerated datatypes with no members.
  2738. *
  2739. * \version 1.8.7 Function modified in this release to reject datatypes that
  2740. * will not accommodate actual data, such as a compound datatype with
  2741. * no fields or an enumerated datatype with no members.
  2742. * \version 1.8.0 C function H5Tcommit() renamed to H5Tcommit1() and deprecated
  2743. * in this release.
  2744. * \since 1.2.0
  2745. *
  2746. */
  2747. H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id);
  2748. /**
  2749. * \ingroup H5T
  2750. *
  2751. * \brief Opens a named datatype
  2752. *
  2753. * \fg_loc_id
  2754. * \param[in] name A datatype name, defined within the specified file or group
  2755. *
  2756. * \return \herr_t
  2757. *
  2758. * \deprecated This function has been renamed from H5Topen() and is
  2759. * deprecated in favor of the macro #H5Topen or the function
  2760. * H5Topen2().
  2761. *
  2762. * \details H5Topen1() opens a named datatype at the location specified by
  2763. * \p loc_id and returns an identifier for the datatype. \p loc_id
  2764. * can be either a file or group identifier. The identifier should
  2765. * eventually be closed by calling H5Tclose() to release resources.
  2766. *
  2767. * \version 1.8.0 Function H5Topen() renamed to H5Topen1() and deprecated in
  2768. * this release.
  2769. *
  2770. * \since 1.2.0
  2771. *
  2772. */
  2773. H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name);
  2774. /**
  2775. * \ingroup ARRAY
  2776. *
  2777. * \brief Creates an array datatype object
  2778. *
  2779. * \param[in] base_id Datatype identifier for the array base datatype
  2780. * \param[in] ndims Rank of the array
  2781. * \param[in] dim Size of each array dimension
  2782. * \param[in] perm Dimension permutation (Currently not implemented.)
  2783. *
  2784. * \return \hid_t{array datatype}
  2785. *
  2786. * \deprecated This function has been renamed from H5Tarray_create() and is
  2787. * deprecated in favor of the macro #H5Tarray_create or the function
  2788. * H5Tarray_create2().
  2789. *
  2790. * \details H5Tarray_create1() creates a new array datatype object.\n\n
  2791. * \p base_id is the datatype of every element of the array, i.e.,
  2792. * of the number at each position in the array.
  2793. *
  2794. * \p rank is the number of dimensions and the size of each dimension
  2795. * is specified in the array dims. The value of rank is currently
  2796. * limited to #H5S_MAX_RANK and must be greater than 0 (zero). All
  2797. * dimension sizes specified in dims must be greater than 0 (zero).
  2798. *
  2799. * The array \p perm is designed to contain the dimension permutation,
  2800. * i.e. C versus FORTRAN array order. (The parameter perm is
  2801. * currently unused and is not yet implemented.)
  2802. *
  2803. * \version 1.8.0 Function H5Tarray_create() renamed to H5Tarray_create1()
  2804. * and deprecated in this release.
  2805. * \since 1.4.0
  2806. *
  2807. */
  2808. H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
  2809. const int perm[/* ndims */]);
  2810. /**
  2811. * \ingroup ARRAY
  2812. *
  2813. * \brief Retrieves sizes of array dimensions
  2814. *
  2815. * \type_id
  2816. * \param[out] dims Sizes of array dimensions
  2817. * \param[out] perm Dimension permutations (This parameter is not used.)
  2818. *
  2819. * \return Returns the non-negative number of dimensions of the array type
  2820. * if successful; otherwise, returns a negative value.
  2821. *
  2822. * \deprecated This function has been renamed from H5Tget_array_dims() and is
  2823. * deprecated in favor of the macro #H5Tget_array_dims or the
  2824. * function H5Tget_array_dims2().
  2825. *
  2826. * \details H5Tget_array_dims1() returns the sizes of the dimensions and
  2827. * the dimension permutations of the specified array datatype object.
  2828. *
  2829. * The sizes of the dimensions are returned in the array \p dims.
  2830. *
  2831. * \version 1.8.0 Function H5Tarray_create() renamed to H5Tarray_create1()
  2832. * and deprecated in this release.
  2833. * \since 1.2.0
  2834. *
  2835. */
  2836. H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]);
  2837. #endif /* H5_NO_DEPRECATED_SYMBOLS */
  2838. #ifdef __cplusplus
  2839. }
  2840. #endif
  2841. #endif /* H5Tpublic_H */