Usermode/libc++ - Basic C++ runtime implementation
[tpg/acess2.git] / Usermode / Libraries / libc++.so_src / typeinfo.cc
diff --git a/Usermode/Libraries/libc++.so_src/typeinfo.cc b/Usermode/Libraries/libc++.so_src/typeinfo.cc
new file mode 100644 (file)
index 0000000..b0a9b3e
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Acess2 C++ Library
+ * - By John Hodge (thePowersGang)
+ *
+ * typeinfo.cc
+ * - typeid and dynamic_cast
+ */
+#include <typeinfo>
+
+namespace std {
+
+type_info::~type_info()
+{
+       // nop
+}
+
+bool type_info::operator==(const type_info& other) const
+{
+       return this->__type_name == other.__type_name;
+}
+
+bool type_info::operator!=(const type_info& other) const
+{
+       return this->__type_name != other.__type_name;
+}
+
+bool type_info::before(const type_info& other) const
+{
+       return this->__type_name < other.__type_name;
+}
+
+const char *type_info::name() const
+{
+       return this->__type_name;
+}
+
+// Private
+type_info::type_info(const type_info& rhs):
+       __type_name(rhs.__type_name)
+{
+}
+type_info& type_info::operator=(const type_info& rhs)
+{
+       __type_name = rhs.__type_name;
+       return *this;
+}
+
+
+};     // namespace std
+

UCC git Repository :: git.ucc.asn.au