summaryrefslogtreecommitdiff
path: root/src/core/typeinfo.c
diff options
context:
space:
mode:
authorBo Yang <struggleyb.nku@gmail.com>2009-08-11 11:17:23 +0000
committerBo Yang <struggleyb.nku@gmail.com>2009-08-11 11:17:23 +0000
commitaba54ed61e31df318abdfa165f971a11ce084608 (patch)
tree433c8bcde94fc7a6e6f2e5cbf23842a84db98146 /src/core/typeinfo.c
parent4a8212d783b6d848ac5e23b2a5151caf19ce0a4f (diff)
downloadlibdom-aba54ed61e31df318abdfa165f971a11ce084608.tar.gz
libdom-aba54ed61e31df318abdfa165f971a11ce084608.tar.bz2
Merge the branches/struggleyb/libdom-remain back to trunk.
svn path=/trunk/dom/; revision=9191
Diffstat (limited to 'src/core/typeinfo.c')
-rw-r--r--src/core/typeinfo.c80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/core/typeinfo.c b/src/core/typeinfo.c
new file mode 100644
index 0000000..4ebefcd
--- /dev/null
+++ b/src/core/typeinfo.c
@@ -0,0 +1,80 @@
+/*
+ * This file is part of libdom.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
+ */
+
+#include <dom/core/typeinfo.h>
+#include <dom/core/string.h>
+
+#include "utils/utils.h"
+
+/* TypeInfo object */
+struct dom_type_info {
+ struct lwc_string_s *type; /**< Type name */
+ struct lwc_string_s *namespace; /**< Type namespace */
+};
+
+/**
+ * Get the type name of this dom_type_info
+ *
+ * \param ti The dom_type_info
+ * \param ret The name
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ *
+ * We don't support this API now, so this function call always
+ * return DOM_NOT_SUPPORTED_ERR.
+ */
+dom_exception _dom_type_info_get_type_name(dom_type_info *ti,
+ struct dom_string **ret)
+{
+ UNUSED(ti);
+ UNUSED(ret);
+
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
+ * Get the namespace of this type info
+ *
+ * \param ti The dom_type_info
+ * \param ret The namespace
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ *
+ * We don't support this API now, so this function call always
+ * return DOM_NOT_SUPPORTED_ERR.
+ */
+dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti,
+ struct dom_string **ret)
+{
+ UNUSED(ti);
+ UNUSED(ret);
+ return DOM_NOT_SUPPORTED_ERR;
+}
+
+/**
+ * Whether this type info is derived from another one
+ *
+ * \param ti The dom_type_info
+ * \param namespace The namespace of name
+ * \param name The name of the base typeinfo
+ * \param method The deriving method
+ * \param ret The return value
+ * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
+ *
+ * We don't support this API now, so this function call always
+ * return DOM_NOT_SUPPORTED_ERR.
+ */
+dom_exception _dom_type_info_is_derived(dom_type_info *ti,
+ struct dom_string *namespace, struct dom_string *name,
+ dom_type_info_derivation_method method, bool *ret)
+{
+ UNUSED(ti);
+ UNUSED(namespace);
+ UNUSED(name);
+ UNUSED(method);
+ UNUSED(ret);
+ return DOM_NOT_SUPPORTED_ERR;
+}
+