00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CUFO_TAG_H
00019 #define CUFO_TAG_H
00020
00021 #include <cufo/fwd.h>
00022 #include <cuoo/fwd.h>
00023 #include <cu/idr.h>
00024
00025 CU_BEGIN_DECLARATIONS
00026
00027 extern cufo_namespace_t cufoP_culibs_namespace;
00028 extern cuoo_type_t cufoP_namespace_type, cufoP_tag_type;
00029
00030
00031
00032
00033 struct cufo_namespace;
00034
00035 CU_SINLINE cufo_namespace_t cufo_namespace(char const *url)
00036 { return (cufo_namespace_t)cu_idr_by_cstr(url); }
00037
00038 CU_SINLINE cu_idr_t
00039 cufo_namespace_url_idr(cufo_namespace_t ns)
00040 { return (cu_idr_t)ns; }
00041
00042 CU_SINLINE char const *
00043 cufo_namespace_url(cufo_namespace_t ns)
00044 { return cu_idr_to_cstr(cufo_namespace_url_idr(ns)); }
00045
00046 CU_SINLINE cufo_namespace_t cufo_culibs_namespace(void)
00047 { return cufoP_culibs_namespace; }
00048
00049 struct cufo_tag
00050 {
00051 CUOO_HCOBJ
00052 cufo_namespace_t ns;
00053 cu_idr_t idr;
00054 };
00055
00056 CU_SINLINE cuoo_type_t
00057 cufo_tag_type()
00058 { return cufoP_tag_type; }
00059
00060 cufo_tag_t
00061 cufo_tag(cufo_namespace_t ns, char const *name);
00062
00063 CU_SINLINE cufo_namespace_t
00064 cufo_tag_space(cufo_tag_t tag)
00065 { return tag->ns; }
00066
00067 CU_SINLINE char const *
00068 cufo_tag_name(cufo_tag_t tag)
00069 { return cu_idr_to_cstr(tag->idr); }
00070
00071 CU_SINLINE cu_idr_t
00072 cufo_tag_name_idr(cufo_tag_t tag)
00073 { return tag->idr; }
00074
00075
00076 CU_END_DECLARATIONS
00077
00078 #endif