namespace strings {
-struct StringHashFunction {
+struct CVC4_PUBLIC StringHashFunction {
size_t operator()(const ::CVC4::String& s) const {
return __gnu_cxx::hash<const char*>()(s.toString().c_str());
}
};/* struct StringHashFunction */
-}
+}/* CVC4::strings namespace */
inline std::ostream& operator <<(std::ostream& os, const String& s) CVC4_PUBLIC;
inline std::ostream& operator <<(std::ostream& os, const String& s) {
return d_str;
}
-};/* class String */
+};/* class RegExp */
/**
* Hash function for the RegExp constants.
inline std::ostream& operator <<(std::ostream& os, const RegExp& s) {
return os << s.toString();
}
+
}/* CVC4 namespace */
-#endif /* __CVC4__STRING_H */
+#endif /* __CVC4__REGEXP_H */
--- /dev/null
+%{
+#include "util/regexp.h"
+%}
+
+%rename(CVC4String) String;
+%rename(CVC4StringHashFunction) CVC4::strings::StringHashFunction;
+
+%ignore CVC4::String::String(const std::string&);
+
+%rename(assign) CVC4::String::operator=(const String&);
+%rename(getChar) CVC4::String::operator[](const unsigned int) const;
+%rename(equals) CVC4::String::operator==(const String&) const;
+%ignore CVC4::String::operator!=(const String&) const;
+%rename(less) CVC4::String::operator<(const String&) const;
+%rename(lessEqual) CVC4::String::operator<=(const String&) const;
+%rename(greater) CVC4::String::operator>(const String&) const;
+%rename(greaterEqual) CVC4::String::operator>=(const String&) const;
+
+%rename(assign) CVC4::RegExp::operator=(const RegExp&);
+%rename(equals) CVC4::RegExp::operator==(const RegExp&) const;
+%ignore CVC4::RegExp::operator!=(const RegExp&) const;
+%rename(less) CVC4::RegExp::operator<(const RegExp&) const;
+%rename(lessEqual) CVC4::RegExp::operator<=(const RegExp&) const;
+%rename(greater) CVC4::RegExp::operator>(const RegExp&) const;
+%rename(greaterEqual) CVC4::RegExp::operator>=(const RegExp&) const;
+
+%rename(apply) CVC4::strings::StringHashFunction::operator()(const ::CVC4::String&) const;
+%rename(apply) CVC4::RegExpHashFunction::operator()(const RegExp&) const;
+
+%ignore CVC4::operator<<(std::ostream&, const String&);
+%ignore CVC4::operator<<(std::ostream&, const RegExp&);
+
+%include "util/regexp.h"