Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
  6.  */
  7.  
  8. #ifndef dom_core_typeinfo_h_
  9. #define dom_core_typeinfo_h_
  10.  
  11. #include <stdbool.h>
  12.  
  13. #include <dom/core/exceptions.h>
  14. #include <dom/core/string.h>
  15.  
  16. typedef struct dom_type_info dom_type_info;
  17.  
  18. typedef enum {
  19.         DOM_TYPE_INFO_DERIVATION_RESTRICTION    = 0x00000001,
  20.         DOM_TYPE_INFO_DERIVATION_EXTENSION              = 0x00000002,
  21.         DOM_TYPE_INFO_DERIVATION_UNION                  = 0x00000004,
  22.         DOM_TYPE_INFO_DERIVATION_LIST                   = 0x00000008
  23. } dom_type_info_derivation_method;
  24.  
  25. dom_exception _dom_type_info_get_type_name(dom_type_info *ti,
  26.                 dom_string **ret);
  27. #define dom_type_info_get_type_name(t, r) _dom_type_info_get_type_name( \
  28.                 (dom_type_info *) (t), (r))
  29.  
  30.  
  31. dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti,
  32.                 dom_string **ret);
  33. #define dom_type_info_get_type_namespace(t, r) \
  34.                 _dom_type_info_get_type_namespace((dom_type_info *) (t), (r))
  35.  
  36.  
  37. dom_exception _dom_type_info_is_derived(dom_type_info *ti,
  38.                 dom_string *namespace, dom_string *name,
  39.                 dom_type_info_derivation_method method, bool *ret);
  40. #define dom_type_info_is_derived(t, s, n, m, r)  _dom_type_info_is_derived(\
  41.                 (dom_type_info *) (t), (s), (n), \
  42.                 (dom_type_info_derivation_method) (m), (bool *) (r))
  43.  
  44.  
  45. #endif
  46.