summaryrefslogtreecommitdiffstats
path: root/src/H5Mprivate.h
blob: b97548b2b45108f7bb4e0f1da852823485da867a (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
/****************************************************************************
 * NCSA HDF                                                                 *
 * Software Development Group                                               *
 * National Center for Supercomputing Applications                          *
 * University of Illinois at Urbana-Champaign                               *
 * 605 E. Springfield, Champaign IL 61820                                   *
 *                                                                          *
 * For conditions of distribution and use, see the accompanying             *
 * hdf/COPYING file.                                                        *
 *                                                                          *
 ****************************************************************************/

/* $Id$ */

/*
 * This file contains macros & information for meta-objects
 */

#ifndef H5MPRIVATE_H
#define H5MPRIVATE_H

#include "H5Mproto.h"   /* Include Public Definitions */

/*
 * A function table record for accessing interfaces which use the "meta"
 *  interface to create/access/release objects.
 */

typedef struct meta_func_t
  {
    hobjtype_t type;            /* Object type this interface is for */
    hatom_t (*create) (hatom_t , hobjtype_t, const char *);   /* Object creation function */
    hatom_t (*access) (hatom_t );   /* Object access function */
    hatom_t (*copy) (hatom_t );     /* Object copy function */
    hatom_t (*find_name) (hatom_t , hobjtype_t, const char *); /* Find first object */
    uint32  (*name_len) (hatom_t );     /* Get length of object name */
    herr_t  (*get_name) (hatom_t , char *);     /* Get object name */
    herr_t  (*set_name) (hatom_t , const char *);   /* Set object name */
    hatom_t (*search) (hatom_t , hobjtype_t, const char *); /* Search for list of objects */
    hatom_t (*index) (hatom_t , hobjtype_t, uint32);    /* Get the OID for the n'th object */
    herr_t  (*flush) (hatom_t );    /* Flush the object to disk */
    herr_t  (*delete) (hatom_t );   /* Delete an object from file */
    hatom_t (*get_parent) (hatom_t );   /* Get the parent object of an object */
    herr_t  (*release) (hatom_t );  /* End access to an object */
  }
meta_func_t;

meta_func_t meta_func_arr[]={
    {   /* Template object meta-functions (defined in H5C.c) */
        H5_TEMPLATE,            /* File-Creation Template Type ID */
        H5C_create,             /* File-Creation Template Create */
        NULL,                   /* File-Creation Template Access */
        H5C_copy,               /* File-Creation Template Copy */
        NULL,                   /* File-Creation Template FindName */
        NULL,                   /* File-Creation Template NameLen */
        NULL,                   /* File-Creation Template GetName */
        NULL,                   /* File-Creation Template SetName */
        NULL,                   /* File-Creation Template Search */
        NULL,                   /* File-Creation Template Index */
        NULL,                   /* File-Creation Template Flush */
        NULL,                   /* File-Creation Template Delete */
        NULL,                   /* File-Creation Template GetParent */
        H5C_release             /* File-Creation Template Release */
    },
    {   /* Datatype object meta-functions (defined in H5T.c) */
        H5_DATATYPE,            /* Datatype Type ID */
        H5T_create,             /* Datatype Create */
        NULL,                   /* Datatype Access */
        NULL,                   /* Dataspace Copy */
        NULL,                   /* Datatype FindName */
        NULL,                   /* Datatype NameLen */
        NULL,                   /* Datatype GetName */
        NULL,                   /* Datatype SetName */
        NULL,                   /* Datatype Search */
        NULL,                   /* Datatype Index */
        NULL,                   /* Datatype Flush */
        NULL,                   /* Datatype Delete */
        NULL,                   /* Datatype GetParent */
        H5T_release             /* Datatype Release */
    },
    {   /* Dimensionality object meta-functions (defined in H5P.c) */
        H5_DATASPACE,           /* Dimensionality Type ID */
        H5P_create,             /* Dimensionality Create */
        NULL,                   /* Dimensionality Access */
        NULL,                   /* Dimensionality Copy */
        NULL,                   /* Dimensionality FindName */
        NULL,                   /* Dimensionality NameLen */
        NULL,                   /* Dimensionality GetName */
        NULL,                   /* Dimensionality SetName */
        NULL,                   /* Dimensionality Search */
        NULL,                   /* Dimensionality Index */
        NULL,                   /* Dimensionality Flush */
        NULL,                   /* Dimensionality Delete */
        NULL,                   /* Dimensionality GetParent */
        H5P_release             /* Dimensionality Release */
    }
  };

/* Private functions, not part of the publicly documented API */

#endif /* H5MPRIVATE_H */