virtual bool
operator==(const type_decl&) const;
- bool operator!=(const type_decl&)const;
+ virtual bool
+ operator!=(const type_base&)const;
+
+ virtual bool
+ operator!=(const decl_base&)const;
+
+ virtual bool
+ operator!=(const type_decl&)const;
virtual void
get_qualified_name(interned_string& qualified_name,
bool
operator==(const subrange_type& o) const;
+ bool
+ operator!=(const decl_base& o) const;
+
+ bool
+ operator!=(const type_base& o) const;
+
bool
operator!=(const subrange_type& o) const;
const std::list<template_parameter_sptr>&
get_template_parameters() const;
+ virtual bool
+ operator==(const decl_base& o) const;
+
virtual bool
operator==(const template_decl& o) const;
virtual bool
operator==(const type_base&) const;
+ virtual bool
+ operator==(const type_decl&) const;
+
+ virtual bool
+ operator==(const decl_base&) const;
+
virtual bool
operator==(const template_parameter&) const;
virtual bool
operator==(const type_base&) const;
+ virtual bool
+ operator==(const decl_base&) const;
+
virtual bool
operator==(const template_parameter&) const;
virtual bool
operator==(const type_base&) const;
+ virtual bool
+ operator==(const class_or_union&) const;
+
virtual bool
operator==(const class_decl&) const;
virtual bool
operator==(const type_base&) const;
+ virtual bool
+ operator==(const class_or_union&) const;
+
virtual bool
operator==(const union_decl&) const;
virtual bool
operator==(const member_base& o) const;
+ virtual bool
+ operator==(const decl_base&) const;
+
virtual bool
operator==(const member_class_template&) const;
return *this == other;
}
+/// Return true if both types equals.
+///
+/// Note that this does not check the scopes of any of the types.
+///
+/// @param o the other type_decl to check against.
+///
+/// @return true iff the current isntance equals @p o
+bool
+type_decl::operator!=(const type_base&o)const
+{return !operator==(o);}
+
+/// Return true if both types equals.
+///
+/// Note that this does not check the scopes of any of the types.
+///
+/// @param o the other type_decl to check against.
+///
+/// @return true iff the current isntance equals @p o
+bool
+type_decl::operator!=(const decl_base&o)const
+{return !operator==(o);}
+
/// Inequality operator.
///
/// @param o the other type to compare against.
return operator==(t);
}
+/// Equality operator.
+///
+/// @param o the other subrange to test against.
+///
+/// @return true iff @p o equals the current instance of
+/// array_type_def::subrange_type.
+bool
+array_type_def::subrange_type::operator!=(const decl_base& o) const
+{return !operator==(o);}
+
+/// Equality operator.
+///
+/// @param o the other subrange to test against.
+///
+/// @return true iff @p o equals the current instance of
+/// array_type_def::subrange_type.
+bool
+array_type_def::subrange_type::operator!=(const type_base& o) const
+{return !operator==(o);}
+
/// Inequality operator.
///
/// @param o the other subrange to test against.
return *this == *o;
}
+/// Equality operator for class_decl.
+///
+/// Re-uses the equality operator that takes a decl_base.
+///
+/// @param other the other class_decl to compare against.
+///
+/// @return true iff the current instance equals the other one.
+bool
+class_decl::operator==(const class_or_union& other) const
+{
+ const decl_base& o = other;
+ return *this == o;
+}
+
/// Comparison operator for @ref class_decl.
///
/// @param other the instance of @ref class_decl to compare against.
{return false;}
}
+/// Equality operator of the the @ref member_class_template class.
+///
+/// @param other the other @ref member_class_template to compare against.
+///
+/// @return true iff the current instance equals @p other.
+bool
+member_class_template::operator==(const decl_base& other) const
+{
+ if (!decl_base::operator==(other))
+ return false;
+ return as_class_tdecl()->class_tdecl::operator==(other);
+}
+
/// Comparison operator for the @ref member_class_template
/// type.
///
return *this == *o;
}
+/// Equality operator for union_decl.
+///
+/// Re-uses the equality operator that takes a decl_base.
+///
+/// @param other the other union_decl to compare against.
+///
+/// @return true iff the current instance equals the other one.
+bool
+union_decl::operator==(const class_or_union&other) const
+{
+ const decl_base *o = dynamic_cast<const decl_base*>(&other);
+ return *this == *o;
+}
+
/// Comparison operator for @ref union_decl.
///
/// @param other the instance of @ref union_decl to compare against.
template_decl::~template_decl()
{}
+/// Equality operator.
+///
+/// @param o the other instance to compare against.
+///
+/// @return true iff @p equals the current instance.
+bool
+template_decl::operator==(const decl_base& o) const
+{
+ const template_decl* other = dynamic_cast<const template_decl*>(&o);
+ if (!other)
+ return false;
+ return *this == *other;
+}
+
/// Equality operator.
///
/// @param o the other instance to compare against.
runtime_type_instance(this);
}
+/// Equality operator.
+///
+/// @param other the other template type parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
bool
type_tparameter::operator==(const type_base& other) const
{
{return false;}
}
+/// Equality operator.
+///
+/// @param other the other template type parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
+bool
+type_tparameter::operator==(const type_decl& other) const
+{
+ if (!type_decl::operator==(other))
+ return false;
+
+ try
+ {
+ const type_tparameter& o = dynamic_cast<const type_tparameter&>(other);
+ return template_parameter::operator==(o);
+ }
+ catch (...)
+ {return false;}
+}
+
+/// Equality operator.
+///
+/// @param other the other template type parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
+bool
+type_tparameter::operator==(const decl_base& other) const
+{
+ if (!decl_base::operator==(other))
+ return false;
+
+ try
+ {
+ const type_tparameter& o = dynamic_cast<const type_tparameter&>(other);
+ return template_parameter::operator==(o);
+ }
+ catch (...)
+ {return false;}
+}
+
+/// Equality operator.
+///
+/// @param other the other template type parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
bool
type_tparameter::operator==(const template_parameter& other) const
{
{return false;}
}
+/// Equality operator.
+///
+/// @param other the other template type parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
bool
type_tparameter::operator==(const type_tparameter& other) const
{return *this == static_cast<const type_base&>(other);}
runtime_type_instance(this);
}
+/// Equality operator.
+///
+/// @param other the other template parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
bool
template_tparameter::operator==(const type_base& other) const
{
{return false;}
}
+/// Equality operator.
+///
+/// @param other the other template parameter to compare against.
+///
+/// @return true iff @p other equals the current instance.
+bool
+template_tparameter::operator==(const decl_base& other) const
+{
+ try
+ {
+ const template_tparameter& o =
+ dynamic_cast<const template_tparameter&>(other);
+ return (type_tparameter::operator==(o)
+ && template_decl::operator==(o));
+ }
+ catch(...)
+ {return false;}
+}
+
bool
template_tparameter::operator==(const template_parameter& o) const
{