summaryrefslogtreecommitdiffstats
path: root/doc/html/H5T/H5Tcopy.htm
blob: 5faf6d61b72b87f23e4ca7ff66aab219be4393ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!-- NEW PAGE -->
<!-- HEADER RIGHT "H5Tcopy" -->
<hr>
<dl>
<dt><strong>Name:</strong> <a name="Datatype-Copy">H5Tcopy</a>
<dt><strong>Signature:</strong>
    <dd><em>hid_t </em><code>H5Tcopy</code>(<em>hid_t </em><code>type_id</code>)
<dt><strong>Purpose:</strong>
    <dd>Copies an existing datatype.  
<dt><strong>Description:</strong>
    <dd><code>H5Tcopy</code> copies an existing datatype.  
        The returned type is always transient and unlocked.  
        <p>
        The <code>type_id</code> argument can be either a datatype
        identifier, a predefined datatype (defined in 
        <code>H5Tpublic.h</code>), or a dataset identifier.
        If <code>type_id</code> is a dataset identifier instead of a 
        datatype identifier, then this function returns a transient, 
        modifiable datatype which is a copy of the dataset's datatype.
        <p>
        The datatype identifier returned should be released with 
        <code>H5Tclose</code> or resource leaks will occur.  
<!--
        <p>
        Native datatypes supported by the library are:
        <ul> <dl>
            <dt>H5T_NATIVE_CHAR
                <dd> Native character type, declare dataset array as 'char'
            <dt>H5T_NATIVE_UCHAR
                <dd> Native unsigned character type, declare dataset array as 'unsigned char'
            <dt>H5T_NATIVE_SHORT
                <dd> Native short type, declare dataset array as 'short'
            <dt>H5T_NATIVE_USHORT
                <dd> Native unsigned short type, declare dataset array as 'unsigned short'
            <dt>H5T_NATIVE_INT
                <dd> Native int type, declare dataset array as 'int'
            <dt>H5T_NATIVE_UINT
                <dd> Native unsigned int type, declare dataset array as 'unsigned int'
            <dt>H5T_NATIVE_LONG
                <dd> Native long type, declare dataset array as 'unsigned long'
            <dt>H5T_NATIVE_ULONG
                <dd> Native unsigned long type, declare dataset array as 'unsigned long'
            <dt>H5T_NATIVE_LLONG
                <dd> Native long long type, declare dataset array as 'unsigned long long'
            <dt>H5T_NATIVE_ULLONG
                <dd> Native unsigned long long type, declare dataset array as 'unsigned long long'
            <dt>H5T_NATIVE_INT8
                <dd> Native signed 8-bit type, declare dataset array as 'int8'
            <dt>H5T_NATIVE_UINT8
                <dd> Native unsigned 8-bit type, declare dataset array as 'uint8'
            <dt>H5T_NATIVE_INT16
                <dd> Native signed 16-bit type, declare dataset array as 'int16'
            <dt>H5T_NATIVE_UINT16
                <dd> Native unsigned 16-bit type, declare dataset array as 'uint16'
            <dt>H5T_NATIVE_INT32
                <dd> Native signed 32-bit type, declare dataset array as 'int32'
            <dt>H5T_NATIVE_UINT32
                <dd> Native unsigned 32-bit type, declare dataset array as 'uint32'
            <dt>H5T_NATIVE_INT64
                <dd> Native signed 64-bit type, declare dataset array as 'uint64'
            <dt>H5T_NATIVE_UINT64
                <dd> Native unsigned 64-bit type, declare dataset array as 'uint64'
            <dt>H5T_NATIVE_FLOAT
                <dd> Native single-precision float type, declare dataset array as 'float'
            <dt>H5T_NATIVE_DOUBLE
                <dd> Native double-precision float type, declare dataset array as 'double'
            <dt>H5T_NATIVE_HSIZE
                <dd> Native size_t type, declare dataset array as 'hsize_t'
            <dt>H5T_NATIVE_HSSIZE
                <dd> Native signed size_t type, declare dataset array as 'hssize_t'
            <dt>H5T_NATIVE_HERR
                <dd> Native error type, declare dataset array as 'herr_t'
            <dt>H5T_NATIVE_HBOOL
                <dd> Native boolean type, declare dataset array as 'hbool_t'
        </dl> </ul>
-->
<dt><strong>Parameters:</strong>
    <ul><table>
        <tr>
		    <td valign="top"><em>hid_t</em>&nbsp;<code>type_id&nbsp;&nbsp;&nbsp;&nbsp;</code></td>
            <td valign="top">Identifier of datatype to copy.  Can be a datatype
                identifier, a predefined datatype (defined in 
                <code>H5Tpublic.h</code>), or a dataset identifier.</td></tr>
    </table></ul>
<dt><strong>Returns:</strong>
    <dd>Returns a datatype identifier if successful;
        otherwise returns a negative value
<dt><strong>Fortran90 Interface:</strong> h5tcopy_f
    <dd>
	<pre>
SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr) 
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: type_id      ! Datatype identifier 
  INTEGER(HID_T), INTENT(OUT) :: new_type_id ! Identifier of datatype's copy 
  INTEGER, INTENT(OUT) :: hdferr             ! Error code
                                             ! 0 on success and -1 on failure
END SUBROUTINE h5tcopy_f
	</pre>		
		
		<!--<dt><strong>Non-C API(s):</strong>
    	<dd>
        
        <img src="Graphics/Java.gif"> 
        <img src="Graphics/C++.gif">
        -->
</dl>